You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
Walkthrough
The package adds theme-aware cheatsheet generation, six built-in themes, user-theme inheritance, and commands to initialise projects, generate output, and validate cheatsheets. It also updates templates, packaging, tests, documentation, CI workflows, and release automation.
Adds theme resolution, inheritance, token validation, and CSS sanitisation. Adds six built-in theme definitions and validates theme and custom CSS fields. The schema and guide describe these options.
Generation resolves theme and custom CSS data for rendering. Templates apply theme tokens and conditionally render dark-mode controls. The package adds keyboard layouts and platform key mappings. Tests cover generated output and browser interactions.
CLI, scaffolding, and validation src/koalakeys/cli.py, src/koalakeys/scaffold/*, src/koalakeys/validate_yaml.py, tests/test_cli.py, tests/test_scaffold.py
Adds init, generate, and validate commands. init writes a starter cheatsheet and can skip or replace an existing example. Validation checks styling fields and rejects non-mapping YAML documents.
Adds the koalakeys entry point and build configuration. Updates development tooling and documents installation, usage, themes, and third-party licences. Adds release automation, adjusts workflow permissions and checkout credentials, and configures browser tests for pull requests.
The Windows test failure should be fixed before merging. PowerShell users can also receive a next-step command that enters the wrong directory, and the CSS documentation needs correction.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Title check
The title is a version number and does not identify the main changes, such as the new CLI, package structure, theming support, or release workflow.
Replace the title with a concise description of the primary change, such as "Add CLI, theming, and package structure support".
Passed checks: 3 passed
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description accurately summarises the pull request changes, including theming, development tooling, packaging, release automation, documentation, and schema updates.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
uv.lock resolves the development dependency to prek==0.3.6 and records PyPI distribution URLs and hashes. This is the release flagged by Socket Security. Replace it with a vetted release and regenerate uv.lock, or remove the dependency.
Minor · Correct the current-directory statement. · README.md:95
init [path] can scaffold a directory other than the current directory. State that generate and validate use the current directory, while init uses its path argument.
🔇 Additional comments: 2
pyproject.toml: 1
3-10: LGTM!
Also applies to: 13-13, 15-20, 23-29, 34-37, 64-81
README.md-15-15: 1
15-15: Minor · Maintainability & Code Quality · Quick win
⚠️Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Split the quick-start instruction into separate steps.
The punctuation makes the command sequence unclear. LanguageTool also reports DOUBLE_PUNCTUATION on this line. Use separate sentences or an ordered list.
Source: Linters/SAST tools
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: b7a4da03-740a-43b1-bfd0-f945d6ed974f
Commits
Reviewing files that changed from the base of the PR and between 3b31401 and fb76c1a.
Files ignored due to path filters: 1
uv.lock is excluded by !**/*.lock
Files selected for processing: 2
README.md
pyproject.toml
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Files skipped from review as they are similar to previous changes: 1
src/koalakeys/templates/index/assets/index.css
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
Add the missing token reference or fix the broken link.
The link in yaml_cheatsheet_spec.md points to docs/themes/tokens.md, and that file does not exist in the checkout. The docs/ directory contains only docs/schema/cheatsheet.schema.json. Readers who follow the link reach a missing page. They cannot find the token list that the Theming section says is documented there.
Either add docs/themes/tokens.md or change the link to a document that exists. Also update the other references to the same path in src/koalakeys/themes/catppuccin.yaml:5 and src/koalakeys/templates/cheatsheets/assets/cheatsheets.css:5, so that they do not point to a missing file.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (2)
Minor · Add layout to the required top-level keys. · validate_yaml.py:17-23
src/koalakeys/validate_yaml.py:17-23 Minor · Functional Correctness · Quick win
Add layout to the required top-level keys.
validate_required_keys checks only title and shortcuts. validate_layout returns True when layout is absent. A cheatsheet without layout therefore passes validate_yaml, even though the spec lists layout as required.
Generation then continues with default values. main() calls the same validator through validate_and_lint, and get_layout_info assigns US and Darwin when layout is missing. The generated page can show the wrong keyboard and system without reporting an error. The file does not fail to generate.
Suggested fix
def validate_required_keys(data):
- required_keys = ["title", "shortcuts"]+ required_keys = ["title", "layout", "shortcuts"]
for key in required_keys:
if key not in data:
logger.error(f"Missing required top-level key: '{key}'")
return False
return True
Minor · Require both keys in a present layout object. · validate_yaml.py:68-70
src/koalakeys/validate_yaml.py:68-70 Minor · Data Integrity & Integration · Quick win
Require both keys in a present layout object.
{layout: {}} passes validate_yaml because validate_layout checks only keys that are present. This violates the schema and specification, which require both keyboard and system.
main then generates the cheatsheet. get_layout_info silently defaults the missing values to US and Darwin. This is independent of the top-level missing-layout case because the empty object takes the present-layout path.
Suggested fix
if not isinstance(data["layout"], dict):
logger.error("Layout must be a dictionary")
return False
+ required_fields = ("keyboard", "system")+ missing_fields = [field for field in required_fields if field not in data["layout"]]+ if missing_fields:+ logger.error(f"Layout must contain: {', '.join(missing_fields)}")+ return False+
valid_keyboards = ["US", "UK", "DE", "FR", "ES", "DVORAK"]
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 9f3cd244-ea59-4613-9c53-8e0eb1362511
Commits
Reviewing files that changed from the base of the PR and between aef89e4 and 872316b.
Files ignored due to path filters: 2
assets/images/KoalaKeys_Example.png is excluded by !**/*.png
assets/images/KoalaKeys_Themes.png is excluded by !**/*.png
Files selected for processing: 2
README.md
THIRD_PARTY_LICENSES.md
Files skipped from review as they are similar to previous changes: 1
README.md
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
- templates: store darkMode only on toggle click so each sheet uses its
theme default_mode until the visitor chooses
- cli: platform-specific quoting for the cd hint, mention uvx
- release-please: drop permanent release-as override
Release-As: 1.0.0
For a project named R&D, list2cmdline returns R&D without quotes. The printed cd R&D command is split at & by cmd, so it does not enter the project directory and can run an unintended command. Quote paths for the target shell and test a path containing &. (raw.githubusercontent.com)
Cover the dark-default destination with a contrasting preference.
The dark sheet passes assert self._is_dark(page) from its default alone. It can ignore the saved "true" preference without failing this assertion. The later light-sheet assertion covers the opposite-default destination, so this is an additional test-coverage improvement, not a production defect. Save "false" before revisiting the dark sheet and assert that it remains light; checking localStorage alone is not sufficient.
- quote paths with spaces or & | < > ^ ( ) , ; = on win32
- pin platform in POSIX quoting test
- test that a light choice overrides a dark-default sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Theming
Dev tooling
uvfor deps; Ruff via pre-commitmise.tomltasks: install, lint, test, validatePackaging/release
koalakeysentrypoint,uv_buildbackendDocs
THIRD_PARTY_LICENSES.md(palettes, fonts)Schema