phase: 93_theme_semantic_completion
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:
+22
-4
@@ -402,10 +402,15 @@ class UiSettings(Base):
|
||||
2026-09-09): every column is nullable, and a NULL (or empty) column
|
||||
means "use the default" — the env value for the three strings
|
||||
(``settings.app_name`` etc.), the built-in palette
|
||||
(:data:`app.core.theming.BUILTIN_COLORS`) for the nine identity
|
||||
colors (B1: no env fallback for colors). :func:`app.core.theming.
|
||||
effective_settings` resolves the effective 12 values both the
|
||||
``GET /api/ui-settings`` and ``GET /api/config`` endpoints serve.
|
||||
(:data:`app.core.theming.BUILTIN_COLORS`) for the 17 palette colors
|
||||
(B1: no env fallback for colors) — the 9 identity colors AND the
|
||||
8 semantic state colors (phase 93, task 01; B3 REVISED, owner
|
||||
permission 2026-09-10, TODO.md L3 — the ``--ok-*`` / ``--err-*`` /
|
||||
``--accent-*`` families join the storable palette; PLAN.md is being
|
||||
redone by the owner, the decision is recorded in the phase 93
|
||||
overview). :func:`app.core.theming.effective_settings` resolves the
|
||||
effective 20 values both the ``GET /api/ui-settings`` and
|
||||
``GET /api/config`` endpoints serve.
|
||||
"""
|
||||
|
||||
__tablename__ = "ui_settings"
|
||||
@@ -428,3 +433,16 @@ class UiSettings(Base):
|
||||
brand: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
brand_soft: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
brand_ink: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
# --- The 8 semantic state colors (phase 93, B3 revised; NULL = the
|
||||
# built-in — B1), #rrggbb. Column names mirror the CSS variable
|
||||
# names (``--ok-bg`` etc. in ``frontend/assets/styles.css``
|
||||
# :root — the drift test in tests/unit/test_theming.py keeps
|
||||
# the two in lockstep). ---
|
||||
ok_bg: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
ok_ink: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
err_bg: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
err_ink: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
err_line: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
accent_bg: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
accent_ink: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
accent_line: Mapped[str | None] = mapped_column(String(7), nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user