okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
2.9 KiB52 linesraw

T18 · Preview panel: remaining findings

Phase 3 · 7 findings (0 high, 3 medium, 4 low) · Depends on: nothing, can start now

Goal

Stop the tab strip overflowing and give every file type the same zoom and paging controls.

Files to change

These are the likely files. Read them before editing, and change others only if the fix needs it.

  • src/components/ArtifactPanel.tsx
  • src/components/PdfPreview.tsx
  • src/components/TablePreview.tsx
  • src/components/ChatMedia.tsx
  • src/lib/preview-tabs.ts

Findings to fix (high and medium)

#SeverityStateIssueSuggested fix
1Mediumpreview-*Tab strip truncates ("fieldnotes-cover.svg" clipped by the full-screen button) and doesn't scroll to the active tab — in preview-code the first tab is pushed offoverflow scroll with fade + scroll active tab into view (scrollLeft, not scrollIntoView)
2Mediumpreview-*Opening the panel squeezes the chat to ~470px; composer wraps to two rowsresizable split with min chat width ~560px; or panel as overlay below 1280px
3Mediumpreview-pdf-*Mixed zoom controls: segmented Fit/100% for images, a dropdown for PDF; Previous/Next as large pill buttonsone zoom control pattern; icon buttons for paging

Optional polish (low)

Do these only if the task is otherwise done and the budget allows.

#SeverityStateIssueSuggested fix
1Lowpreview-pdf-actualAt 100% the PDF page overflows horizontally with text cut off and no horizontal scrollbarallow horizontal scroll / pan
2Lowpreview-full-screen"Page text" disclosure dumps the PDF's text as one run-on paragraphpreserve line breaks or hide
3Lowpreview-*Header label "Example · Website" etc.file name + type; drop "Example"
4Lowpreview-tableFilter field and table card are misaligned (filter overhangs right edge)align to table width

How to check

Run these and fix anything that fails:

  • npm run typecheck
  • node --test tests/ (all existing tests stay green)
  • npm run check (typecheck, UI audit, contrast, measure, luminance)
  • npm run build

Task-specific checks:

  • One shared toolbar component for zoom and paging is used by every preview type.
  • Each finding above is resolved, or marked "already fixed by Txx" or "not reproducible" with a one-line reason.

Screens to re-capture and compare with the audit screenshots in docs/evidence/audit-2026-10-07/:

  • preview-pdf-actual-light.png
  • preview-full-screen-light.png
  • preview-table-light.png

Done when

  • All checks pass.
  • Commit on branch fix/t18-preview-panel with message T18: Preview panel: remaining findings.
  • Append a short entry to audit-fixes/PROGRESS.md: what changed, which findings were fixed, skipped or not reproducible, and anything the reviewer should look at.
1# T18 · Preview panel: remaining findings
2
3**Phase 3** · 7 findings (0 high, 3 medium, 4 low) · Depends on: nothing, can start now
4
5## Goal
6Stop the tab strip overflowing and give every file type the same zoom and paging controls.
7
8## Files to change
9These are the likely files. Read them before editing, and change others only if the fix needs it.
10- `src/components/ArtifactPanel.tsx`
11- `src/components/PdfPreview.tsx`
12- `src/components/TablePreview.tsx`
13- `src/components/ChatMedia.tsx`
14- `src/lib/preview-tabs.ts`
15
16## Findings to fix (high and medium)
17| # | Severity | State | Issue | Suggested fix |
18|---|---|---|---|---|
19| 1 | Medium | `preview-*` | Tab strip truncates ("fieldnotes-cover.svg" clipped by the full-screen button) and doesn't scroll to the active tab — in preview-code the first tab is pushed off | overflow scroll with fade + scroll active tab into view (scrollLeft, not scrollIntoView) |
20| 2 | Medium | `preview-*` | Opening the panel squeezes the chat to ~470px; composer wraps to two rows | resizable split with min chat width ~560px; or panel as overlay below 1280px |
21| 3 | Medium | `preview-pdf-*` | Mixed zoom controls: segmented Fit/100% for images, a dropdown for PDF; Previous/Next as large pill buttons | one zoom control pattern; icon buttons for paging |
22
23## Optional polish (low)
24Do these only if the task is otherwise done and the budget allows.
25
26| # | Severity | State | Issue | Suggested fix |
27|---|---|---|---|---|
28| 1 | Low | `preview-pdf-actual` | At 100% the PDF page overflows horizontally with text cut off and no horizontal scrollbar | allow horizontal scroll / pan |
29| 2 | Low | `preview-full-screen` | "Page text" disclosure dumps the PDF's text as one run-on paragraph | preserve line breaks or hide |
30| 3 | Low | `preview-*` | Header label "Example · Website" etc. | file name + type; drop "Example" |
31| 4 | Low | `preview-table` | Filter field and table card are misaligned (filter overhangs right edge) | align to table width |
32
33## How to check
34Run these and fix anything that fails:
35- `npm run typecheck`
36- `node --test tests/` (all existing tests stay green)
37- `npm run check` (typecheck, UI audit, contrast, measure, luminance)
38- `npm run build`
39
40Task-specific checks:
41- [ ] One shared toolbar component for zoom and paging is used by every preview type.
42- [ ] Each finding above is resolved, or marked "already fixed by Txx" or "not reproducible" with a one-line reason.
43
44Screens to re-capture and compare with the audit screenshots in `docs/evidence/audit-2026-10-07/`:
45- `preview-pdf-actual-light.png`
46- `preview-full-screen-light.png`
47- `preview-table-light.png`
48
49## Done when
50- All checks pass.
51- Commit on branch `fix/t18-preview-panel` with message `T18: Preview panel: remaining findings`.
52- Append a short entry to `audit-fixes/PROGRESS.md`: what changed, which findings were fixed, skipped or not reproducible, and anything the reviewer should look at.