Phase 5a-5.
- Settings → Appearance shows a preview card for each theme. The cards
are one radio group. The arrow keys move and select, and the current
card has the selection outline and a check mark (UI-047).
- Edit theme opens the theme editor as a workbench tab in the window
that opened Settings. The window shows each change at once.
- The editor shows all 51 color roles in seven groups. Each role has a
color picker, a hex field, its lowest readability result, and a reset
button. A failure shows a warning icon and its ratio, or "Too close".
- Save writes a short schema 3 theme with the built-in theme as its
base. A built-in theme does not change. Discard returns to the saved
colors, and Duplicate saves a copy.
- The editor is a built-in package, like the browser, so it uses the
editor tab code of plugins.
- 23 new catalog rows with French, Japanese, and Simplified Chinese.
- The smoke harness sends emit to every page and emit_to to the pages
with the target window label.
- Docs: UI-047, ui-design.md, and "Edit a theme" in guides/themes.md.
New tests: appearance/themeEditor and tests/unit/theme/themeEditor.spec.ts.
Six smoke tests use the cards instead of the theme menu.
Source draws search matches and selection matches with the item
selection fill, behind code. No rule checked that surface. In four core
palettes, code colors were 3.8:1 to 4.3:1 on it, and dim text in a
selected row was 4.0:1 in two light palettes.
- The text rule also checks the item selection fill over bg-elevated.
The syntax rule also checks the fill over bg (UI-046).
- The derived fill is the accent at 12%, not 20%. RuneStone, Claude,
and custom themes without their own fill use it. Sakura and the
character themes set their own fill and pass.
- Matches keep their underline, and selected rows keep their outline.
pnpm check passes. pnpm test: 446 of 446 pass. Full smoke suite: 92
passed, 2 known. Three tests failed one time while Vite compiled the
changed modules, and passed on retry and 3 of 3 times alone.
Phase 5a-4. The owner chose candidate B of each palette.
- Harvest Moon uses copper from Holo's tail as the accent, cream from
the tail tip, and red-brown surfaces.
- Crimson Pilot uses plugsuit red as the accent, orange hair, blue eyes,
and the yellow dress. Borders are a low-chroma wine. Error is a light
rose red, so it differs from the accent.
- Silver Serpent uses silver from the grey eyes as the accent, Slytherin
emerald as the second accent, and charcoal surfaces.
- All eight built-in palettes pass every readability rule. The
known-failure list in contrast.spec.ts is gone.
- characterPalettes.spec.ts measures text selection as the app draws
it, at most 65% opaque over the page (UI-029).
- Docs: UI-045, and the character references in ui-color.md.
pnpm check passes. pnpm test: 446 of 446 pass. Full smoke suite: 95
passed, 2 known.
Phase 5a-3. The owner chose candidate B of each palette.
- Menus are opaque (UI-043, replaces UI-013). With a background image,
menus are at least 92% opaque and blur the image. Submenus show as
manual popovers in the top layer, so the blur cannot clip them.
- In a light palette, the page is the lightest surface, and the side
panes have a slight tint (UI-044).
- RuneStone uses neutral surfaces and the rune cyan of the app icon.
Claude Dark uses the layout of the Claude app. Claude Light uses a
white page with brand Light panes and a darker orange for text.
Sakura uses Petal Veil for active rows.
- All five core palettes pass every readability rule. A text role keeps
the hue of its source and changes only its lightness.
- The accent-text rule also checks accent-2, because inline code in
Read uses it as text.
- The root token defaults match RuneStone Dark.
pnpm check passes. pnpm test: 447 pass, 5 todo, 0 fail. Full smoke
suite: 92 passed, 2 known. editor/markdownPaste and tables/formulas
failed one time and passed on retry. workspace/manageTemplates fails
about half of its runs, also on the previous commit: the tree menu
rebuilds when the template list reloads, and the open submenu closes.
Phase 5a-1 and 5a-2.
- roles.ts names 51 color roles. One derivation rule fills the roles
that a theme does not give, for all themes. tokens.css keeps only the
root defaults, without theme blocks.
- Each built-in theme is one data file in src/lib/theme/themes/. No code
outside the theme data names a theme ID. characterThemes.ts is gone.
- New roles: link, focus, on-accent, highlight, scrim, the syntax roles,
and 16 terminal (ANSI) roles. Stray colors in components use the roles.
- contrast.ts checks each theme against the readability rules of
docs/ui-color.md. The tests mark the known palette failures as todo,
and a second test fails when a known failure starts to pass.
- Theme files use schema 3 with a mode and an optional built-in base.
A short file gets the missing colors and fonts from the base. Schema 1
and 2 files still import. Old syntax names convert on import.
- Docs: ui-color.md, plugin-development.md (theme tokens), ui-design.md,
guides/themes.md, and UI-041 and UI-042 in design-decisions.md.
The applied colors stay the same for every built-in theme, except three
small changes: the conflict line uses the warn color, the Write
highlight uses the highlight role, and two dialog backdrops use the
scrim role.
pnpm check passes. pnpm test: 447 pass, 31 todo, 0 fail. Full smoke
suite: 93 passed, 2 known. appearance/palettes read the old syntax
names and passed 3 of 3 times after the fix. workspace/manageTemplates
failed one time and passed on retry.
Phase 4e.
- app.css holds only imports. Its rules moved into files beside their
code, in the original cascade order. Dead rules of the deleted TipTap
Writer are gone.
- workbenchKeys.ts is one table of the workbench shortcuts. Workbench
runs the commands.
- session.linkTargets is the one link resolution for the link menu and
for link opening.
- Documents is a rune module (documents.svelte.ts). Workbench reads the
tabs and the active path from it, without a copy of all buffers on
each change. The editor mount effect now copies the buffer inside
untrack, so an edit does not remount the editor.
- Unit tests can import .svelte.ts modules through a Node module hook
that compiles them with the Svelte compiler.
pnpm check, pnpm test (350 of 350), and the full smoke suite pass,
except tables/linkCaret, which failed one time under load and passed
on retry and 3 of 3 times alone.
Phase 4b. DocumentEditor.svelte replaces LiveWriter.svelte and the Monaco
EditorHost.svelte. Each open document has one CodeMirror state. Write and
Source are two compartment configurations of it, so they share the undo
history. editorStates.ts keeps the state while the tab stays open. The
Monaco model, the diff bridge, its timers, and sessions.ts are gone.
- Source: syntax colors from the theme tokens, lazy language packages,
line numbers, folding, and the current line in IDE, wrapped lines in
Writing, several carets, and bracket matching and closing.
- Lists (card 088e778b): Tab nests a list item and Shift+Tab moves it
up, in Write and Source. Both renumber the list. The source keeps
"1.". Write and Read show numbers, letters, then Roman numerals.
- Indent (card 696c30ce): a fixed 4 spaces in Write and Source.
- The code menu uses CodeMirror commands. The command palette item and
the Monaco styles, search, theme, and workers are removed.
- @codemirror/legacy-modes is pinned to 6.5.4. Version 6.5.5 uses
parser types that do not match @codemirror/language 6.12.
- 26 smoke tests use CodeMirror instead of Monaco. New tests:
editor/listNesting and the markdownLists unit tests.
- Docs: development, UI design, plugin host, user guide, and UI-040.
pnpm check, pnpm test (341 of 341), and pnpm build pass. The full smoke
suite passes, except one template test that passed on retry.
Unit tests go to tests/unit/<area>/, browser smoke tests to
tests/smoke/<area>/, and tests against a running desktop app to
tests/native/. Files named after dates, work passes, or Kanban cards get
feature names, for example editorOctober12 -> editor/footnotes.
scripts/ keeps the build, release, and package tools. Plugin repositories
import scripts/packagePlugin.mjs, and the Terminal smoke test imports
scripts/pluginMocks.mjs, which now re-exports the harness copy.
The unit tests get their own type check (tests/tsconfig.json) with Node
types. pnpm check runs it after the app check. Add @types/node and fix
the three test mocks that it reported.
Move the agent instructions from AGENTS.md to CLAUDE.md. AGENTS.md now
points to CLAUDE.md. The UI rules move to docs/ui-design.md. The version
and release policy moves to the new docs/releases.md.
Rewrite the README, the user guides, and the developer references.
Check each claim against the code. Remove old version history and
repeated warnings. Link to Gitea at git.knottywyvern.com instead of the
LAN address. Move the October 13 menu audit to the archive.