phase: 93_theme_semantic_completion
Build and Push Containers / build-and-push-app (push) Successful in 1m56s
Build and Push Containers / build-and-push-db (push) Successful in 11s

All verification is complete. Final report:

**Phase 93 — Theme semantic completion: FINAL VERIFICATION PASS — ALL GREEN**

- Verified full implementation in tree: migration `0016` (8 nullable semantic columns, applied at head), 17-var `BUILTIN_COLORS`/`COLOR_FIELDS`/`effective_settings`, API validation, `#view-theme` State-colors fieldset (17 pickers), `theme.js` FIELDS/PAIRS (5→8), `.page-head` surface panel (6 shell views + doc-edit + shared.html; login card / document sticky header audited as already-surfaced), mock_llm `content: None` fix
- Fixed 2 pre-existing defects (both fail identically on baseline `d4f38ad`, proven via worktree A/B): `test_nav_rename_sources` — expected nav tail missing the phase-91 "Theme" link; `test_stale_ui_copy` — now truncates `saved_chats` before/after (house `test_suggestion_chips` pattern) so the seed-chip contract is deterministic on the shared dev DB (owner's 22 saved chats triggered phase-80 last-3-questions)
- Tests: `uv run pytest --cov=app --cov-report=term-missing` → **1868 passed, app/ 99%** (>90% ✓); `uv run ruff check .` → clean; `uv run pyright` → **0 errors**
- E2E: dedicated `uv run pytest tests/e2e/test_theme_semantic_completion.py -v --no-cov` → **8/8 in isolation** (all-gray 17-color theme: zero residual color on saved-result/Stale/Revoked/Local/tool-call elements, text labels intact, gray heads non-transparent, pre-paint tag, Reset → byte-identical no-tag); 15 theme/header/nav/responsive suites green in isolation; full 85-file combined run: only the 2 fixed pre-existing failures + 1 combined-run artifact (`test_sync_upload_progress`, green in isolation)
- Completion criteria: (1) monochrome E2E ✓ (2) default byte-identical, no `#bor-theme` tag ✓ (3) all page heads on solid surface ✓ (4) suite/coverage/lint/E2E green ✓ (5) phases 01–92 no behavior change ✓ (6) commit left to harness per protocol
- Notable: cleaned stray uvicorn leftovers from prior implementation pass (owner's `--reload` dev server untouched); no deviations from the phase design
- Next pending phase: `94_ls_tree_drilldown`
This commit is contained in:
2026-09-10 16:43:08 -04:00
parent d4f38ad3ce
commit 9188be259b
44 changed files with 3019 additions and 196 deletions
+63 -6
View File
@@ -1054,13 +1054,15 @@
</fieldset>
<fieldset class="theme-group">
<!-- The five text/background pairs are checked against
<!-- The eight text/background pairs (the five identity
pairs + the three semantic ink-on-bg pairs from the
State colors fieldset below) are checked against
WCAG 2.1 AA (4.5:1) as the owner picks (theme.js —
the app/core/theming.py docstring is the authoritative
pair table); failures list in #theme-contrast as a
warning and never block a save. -->
the app/core/theming.py docstring is the
authoritative pair table); failures list in
#theme-contrast as a warning and never block a save. -->
<legend class="theme-group-title">
Palette — five pairs checked against WCAG 2.1 AA (4.5:1)
Palette — eight pairs checked against WCAG 2.1 AA (4.5:1)
</legend>
<div class="theme-colors">
<div class="theme-color">
@@ -1102,6 +1104,61 @@
</div>
</fieldset>
<!-- Phase 93 (task 02): the 8 semantic state colors (B3
revised — owner permission 2026-09-10, TODO.md L3):
the success / error / notice families join the
storable palette (17 variables total). Their three
ink-on-bg pairs are part of the same WCAG 2.1 AA
(4.5:1) check as the identity pairs (theme.js PAIRS);
the two *_line borders are decorative (no contrast
duty — the same rule as --line / --grid-line). Every
state element keeps its TEXT label, so a monochrome
theme conveys state by words, not color (B5). The
inputs ship the BUILT-IN values (app/core/theming.py
BUILTIN_COLORS) — theme.js re-populates them with the
EFFECTIVE values on mount. -->
<fieldset class="theme-group">
<legend class="theme-group-title">State colors</legend>
<p class="theme-note">
The success, error, and notice states the interface
paints with — state text + color, never color alone.
</p>
<div class="theme-colors">
<div class="theme-color">
<label for="theme-ok-bg">Success background (--ok-bg)</label>
<input id="theme-ok-bg" name="ok_bg" type="color" value="#10241b">
</div>
<div class="theme-color">
<label for="theme-ok-ink">Success text (--ok-ink)</label>
<input id="theme-ok-ink" name="ok_ink" type="color" value="#6ee7a8">
</div>
<div class="theme-color">
<label for="theme-err-bg">Error pill background (--err-bg)</label>
<input id="theme-err-bg" name="err_bg" type="color" value="#2d0a0a">
</div>
<div class="theme-color">
<label for="theme-err-ink">Error pill text (--err-ink)</label>
<input id="theme-err-ink" name="err_ink" type="color" value="#fca5a5">
</div>
<div class="theme-color">
<label for="theme-err-line">Error pill border (--err-line)</label>
<input id="theme-err-line" name="err_line" type="color" value="#ef4444">
</div>
<div class="theme-color">
<label for="theme-accent-bg">Notice background (--accent-bg)</label>
<input id="theme-accent-bg" name="accent_bg" type="color" value="#2b2110">
</div>
<div class="theme-color">
<label for="theme-accent-ink">Notice text (--accent-ink)</label>
<input id="theme-accent-ink" name="accent_ink" type="color" value="#fbbf24">
</div>
<div class="theme-color">
<label for="theme-accent-line">Notice border (--accent-line)</label>
<input id="theme-accent-line" name="accent_line" type="color" value="#f59e0b">
</div>
</div>
</fieldset>
<!-- Save (primary) + Reset to defaults (secondary). Both
type="button" (no real submit); task 05 runs the §7.4
never-stale lifecycle ("Saving…" while the PUT is out,
@@ -1115,7 +1172,7 @@
<!-- task 05 owns all three lines: #theme-error (the server's
422 detail — the fields are kept on failure), #theme-result
("Theme saved." / "Reset to the built-in theme."),
#theme-contrast (the WCAG warnings for the five pairs —
#theme-contrast (the WCAG warnings for the eight pairs —
warning-only, the owner can still save). -->
<p class="theme-error" id="theme-error" role="alert" hidden></p>
<p class="theme-result" id="theme-result" role="status" aria-live="polite" hidden></p>