phase: 100_page_width_consistency
**Phase 100 — final verification pass: all green.** - Verified the shipped CSS contract directly: `--chat-column: 72rem` in `:root`; 0 literal `max-width: 46rem`; no `@media (min-width: 1500px)` block; exactly 4 token-capped reading columns; tuning/theme/doc-edit shells cap-free, structurally `.sources-shell`; `mock_llm.py` diff is comment-only. - Defect found & fixed (phase-93 suite): `test_theme_semantic_completion.py::test_reset_removes_tag_byte_identical` raced theme.js's post-PUT refetch — it asserted the `#bor-theme` tag was gone right after the result line, but tag removal lands in the reconcile after the re-fetch (failed ~1 in 5 runs after `test_chat_rag`, reproduced). Fixed with an auto-waiting `expect(...).to_have_count(0)` (settled-state wait, the file's existing house pattern). 6/6 clean on the repro loop after. - Tests/lint/coverage: `uv run pytest --cov=app --cov-report=term-missing` → 2052 passed, **99%** on `app/`; `uv run ruff check .` + `uv run pyright` → 0 errors. - E2E in isolation (all passed): `test_wide_desktop_column.py` 3 (the phase suite — chat==tuning==theme==RAG ±4px at 1280 & 1920, ≈1152px; shared ≈1152px; standalone doc ≈1112px; modal unchanged ≈1100px; 360px overflow-free), `test_ui_customization` 4, `test_admin_theme_tab` 5, `test_document_viewer` 7, `test_save_share_ux` 5, `test_sticky_navbar` 3, `test_markdown_tables` 6, `test_responsive_polish` 7, `test_chat_rag` 3, `test_theme_semantic_completion` 8. - Completion criteria: ① measured 72rem everywhere (≥~1200px, ±4px) + full-width below + 360px clean — **PASS** (E2E); ② zero 46rem rules / no 1500px block / four token selectors — **PASS** (grep + unit pins); ③ B4 byte-identical no-op + mobile squeeze — **PASS** (theme + responsive suites green); ④ full suite / coverage / lint — **PASS**; ⑤ atomic commit — left to the harness per executor protocol (all changes in the working tree, uncommitted). - Deviations: none from phase decisions; only change in this pass is the race fix above (test-only, behavior unchanged). - Next pending phase: `98_sync_summary_visibility` (numeric order in `todo/`; also pending: 99, 101–105).
This commit is contained in:
@@ -327,7 +327,8 @@ Implements just enough of the aipi surface:
|
||||
a deliberately wide 5-column table — byte-stable, so the story E2E
|
||||
can assert the rendered ``<table class="md-table">`` shape, the
|
||||
escaped XSS line, and the wrapper's horizontal scroll inside the
|
||||
46rem column. Checked BEFORE the ``DEFLECT_MODE`` branch (a
|
||||
72rem container column (phase 100). Checked BEFORE the
|
||||
``DEFLECT_MODE`` branch (a
|
||||
deflection prompt never carries the marker, same reasoning as
|
||||
``SUMMARY_MODE``), so a marker question always gets the table
|
||||
answer; the E2E asks it against an on-topic fixture (HIGH gate) and
|
||||
@@ -584,7 +585,8 @@ TABLE_TRIGGER = "show me a table"
|
||||
#: The fixed table answer (phase 44) — byte-stable on purpose: the story
|
||||
#: E2E asserts the rendered table shape, the escaped ``<img onerror>``
|
||||
#: line (the XSS payload must survive the mock byte-for-byte), and the
|
||||
#: wide table's ``scrollWidth > clientWidth`` inside the 46rem column.
|
||||
#: wide table's ``scrollWidth > clientWidth`` inside the 72rem container
|
||||
#: column (phase 100).
|
||||
#: Phase 74 (chat history, TODO L4): a user message containing this
|
||||
#: substring (case-insensitive) gets the deterministic HISTORY ECHO
|
||||
#: (``_history_echo`` below — see the module docstring): the prior-turn
|
||||
@@ -1653,7 +1655,8 @@ def compose_answer(body: dict[str, Any]) -> str:
|
||||
# <img onerror> XSS probe line (it must survive the mock
|
||||
# byte-for-byte so the E2E can prove the renderer neutralizes
|
||||
# it), and a wide 5-column table (guarantees scrollWidth >
|
||||
# clientWidth inside the 46rem column). Byte-stable. Checked
|
||||
# clientWidth inside the 72rem container column, phase 100).
|
||||
# Byte-stable. Checked
|
||||
# BEFORE the DEFLECT_MODE branch: a deflection prompt never
|
||||
# carries the marker (it lives in the user message, same
|
||||
# reasoning as SUMMARY_MODE), so a marker question always gets
|
||||
|
||||
Reference in New Issue
Block a user