Repository navigation
Conversation
The page's Edit view edits a theme's theme.json in CodeMirror 5, next to
one rendered screen:
- The preview follows the typing: unsaved text is rendered from a draft
(a copy of the theme made of links, "<theme>~draft"), so the theme is
untouched until Save. About 2.5 seconds behind on an RG35XX-H.
- Suggestions for keys (with their types), the values a key takes, {tags}
and [capabilities], read from pugwash's own code by theme_server/
schema.py (Region's _verify_* calls, load_regions, set_data), so they
match what PortMaster accepts.
- Checks as you type: JSON mistakes in plain words, unknown keys with
"did you mean", wrong value types, colors not in #pallet, missing images
and fonts, unknown #element:/parent names, and the render's own errors.
- Clicking a region box jumps to its place in theme.json, and the cursor in
a region lights up its box.
- Save (Ctrl+S) keeps the previous file as theme.json.bak and refuses to
overwrite a theme.json changed on disk without asking. The built-in
default theme is read-only: "Copy to a new theme" copies any theme (and
the unsaved changes) into the themes folder.
On a device it saves into PortMaster/themes, and copies show up in the
theme list. Tried on muOS (exFAT SD card) as well as locally.
CodeMirror 5.65.18 (MIT) is vendored as static/codemirror/ with its
LICENSE; the server only serves a fixed list of static files.
The checks found typos in the default theme that PortMaster has always
ignored: "barwidth" (bar-width) on the keyboard, "list-spacer" in
filter_list, "align": "midcenter" and "parent": "element:background".
They're left as they are (fixing them changes how it looks), the unknown
keys pinned in tests/test_theme_editor.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
Python 3.13 reports a trailing comma as "Illegal trailing comma" at the comma, where older versions said "Expecting property name" at the } after it. The exact-position tests use a missing comma, which every version reports the same; the trailing comma test takes either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The page's Edit view edits a theme's theme.json in CodeMirror 5, next to one rendered screen:
On a device it saves into PortMaster/themes, and copies show up in the theme list. Tried on muOS (exFAT SD card) as well as locally.
CodeMirror 5.65.18 (MIT) is vendored as static/codemirror/ with its LICENSE; the server only serves a fixed list of static files.
The checks found typos in the default theme that PortMaster has always ignored: "barwidth" (bar-width) on the keyboard, "list-spacer" in filter_list, "align": "midcenter" and "parent": "element:background". They're left as they are (fixing them changes how it looks), the unknown keys pinned in tests/test_theme_editor.py.