phase: 165_prose_word_wrap
All verification complete. Final report:
**Phase 165 — Prose word wrap (final verification pass)**
- Verified: `PROSE_FORMATS={txt,text}` + `isProseDoc` (single-site, image arm wins); `renderDocument` three-way branch (md → `.doc-md`, prose → `.doc-prose` text node, else `pre.doc-raw` byte-identical); `.doc-prose` CSS = 72rem column, `pre-wrap` + `overflow-wrap: anywhere`, tokens only, zero literals; `[data-view="pages"]` hide list includes `.doc-prose` as one grouped declaration; phase-116 scrollbar rules intact and modal-scoped; no `innerHTML` in the prose path.
- Tests/lint (all 100% green):
- `uv run pytest` → **3854 passed** (unit + integration)
- `uv run pytest --cov=app --cov-report=term-missing` → **TOTAL 99%** (>90%)
- `uv run ruff check .` → All checks passed; `uv run pyright` → **0 errors**
- `uv run pytest tests/e2e/test_prose_word_wrap.py -v --no-cov` → **5 passed** (isolation)
- Isolation regressions: document_viewer 8, image_documents 4, pdf_pages_in_sources 4, pdf_strip_additive_selfheal 5, edit_summaries 4, summary_in_viewer 4, chat_answer_clusters 4, garbage_pdf 3, pdf_support 6, sticky_navbar 3, smoke 3 — all passed
- Completion criteria: image description wraps, full text, both surfaces ✔; `.txt` wraps same way ✔; `py`/`json`/code keep `pre.doc-raw` + horizontal overflow + themed modal scrollbar (E2E negative control + pins) ✔; no innerHTML, AA `--ink`/`--surface` pair ✔; full gates green ✔; commit + phase-dir move are harness-owned (not executed per pipeline rules).
- Documentation: README already updated by task 03 (viewer section + image-docs section); full README/AGENTS.md review found no further inconsistencies — **verified consistent, no changes needed**.
- Notable deviations: `.doc-prose` omits `font-family: inherit` from 00_phase D2's snippet — task 01's authoritative "exact property set" excludes it and `div` inherits fonts anyway (behavior identical). PDF deferral (A4) intact: `format == "pdf"` stays in `.doc-raw`, owner call recorded.
- Next pending phase: `166_hide_empty_answer_bubble`.
This commit is contained in:
@@ -135,7 +135,14 @@ restores on a refresh — but a shared chat never shows it.
|
||||
### RAG / Knowledge base (`/sources.html`)
|
||||
|
||||
The indexed document list. The *Path* column opens each document in the same
|
||||
**almost-fullscreen modal**. Document rows carry a *Created* date and folder
|
||||
**almost-fullscreen modal** (and `/document.html` renders it through the one
|
||||
shared core). Content renders by kind (phase 165): markdown becomes a
|
||||
rendered document, an image's description or a plain-text (`.txt`) body
|
||||
renders as **wrapping prose** in the 72rem reading column, and code and
|
||||
code-ish formats keep the monospace block with a horizontal scroller
|
||||
(long lines never wrap in code — locked; the themed modal scrollbar of
|
||||
phase 116 keeps applying to whatever still scrolls). Document rows carry
|
||||
a *Created* date and folder
|
||||
rows an *Updated* date (phase 106) — sourced at sync time (git commit dates
|
||||
for git sources, restored metadata for archive uploads, file mtime otherwise;
|
||||
unresolvable or future dates fall back to today) — and the admin can correct a
|
||||
@@ -705,7 +712,9 @@ first-class document:
|
||||
- **Retrieved & displayed.** Image docs appear in the Sources catalog
|
||||
with a small lazy-loaded thumbnail (progressive enhancement — a fetch
|
||||
failure falls back to the doc icon), the document viewer renders the
|
||||
image with the description below it, and a cited image doc renders
|
||||
image with the description below it as **wrapping prose** (phase 165 —
|
||||
the full description reads by scrolling down, never sideways), and a
|
||||
cited image doc renders
|
||||
**in the chat's sources images row** (phase 130: its own
|
||||
`.msg-meta.msg-images` cluster below the chips row — no chip for an
|
||||
image doc, the figure is the citation; alt text = the description;
|
||||
|
||||
Reference in New Issue
Block a user