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
4.4 KiB67 linesraw

T04 · One error component, no fixture text

Phase 1 · 10 findings (0 high, 9 medium, 1 low) · Depends on: nothing, can start now

Goal

Errors render as plain body text in seven places and most start with "Fixture:". Add one ErrorNotice component (icon, what happened, what to do, optional action) and use it everywhere.

Files to change

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

  • src/components/ui.tsx (new ErrorNotice)
  • src/screens/Serving.tsx
  • src/components/CloudflareDialog.tsx
  • src/screens/Models.tsx
  • src/screens/Skills.tsx
  • src/screens/Tasks.tsx / src/components/TaskEditor.tsx
  • src/screens/Setup.tsx
  • src/screens/Chat.tsx (open-website error)
  • tests/ui-fixture-host.mjs (check where the "Fixture:" prefix comes from)

Findings to fix (high and medium)

#SeverityStateIssueSuggested fix
1Mediumchat-open-website-invalidError "Enter a full http:// or https:// address." is plain black body text below the helper; field has no error statered text directly under field + red border + aria-invalid; helper below
2Mediumchat-composer-errorComposer error squeezed into the toolbar between "Auto" and Send in 11px rederror line above the composer with icon
3Mediumserving-requests-allStatus column is lowercase plain text (queued / generating / done / error); errors aren't redstatus chips: grey queued, blue generating, green done, red error
4Mediumserving-request-errorError reason shows fixture text: "Fixture: upstream response timed out after 4 seconds."strip fixture prefix; plain cause + next step
5Mediumserving-cloudflare-errorError is plain 16px black body text ("Fixture: Cloudflare could not establish…") with no error styling; buttons unchangedred error callout with icon, cause, and "Try again" as the primary
6Mediumskills-refresh-errorError is plain text at the bottom: "Fixture: skill service unavailable." — no styling, no retryerror banner under the header with Retry
7MediumGLOBALFixture text leaks into UI copy ("Fixture: …") in Serving, Cloudflare, Models, Skills errorsstrip in fixture layer; errors use one component (icon, cause, action)
8Mediumtasks-populatedFailed run shows plain black text "Fixture: the demo model returned an invalid response." under the rowred inline status "Last run failed · View" (no fixture text)
9Mediumsetup-prepare-errorError state keeps the heading "Preparing your model" (with a visible focus box around it), shows "Preparation stopped" in plain bold, and ends with fixture textheading "Couldn't prepare the model", red icon, cause, Retry; focus without visible ring on headings

Optional polish (low)

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

#SeverityStateIssueSuggested fix
1Lowchat-markdown-tableStatus column "Ready" as plain text far rightstatus chip; tighter column widths

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:

  • Every error state listed below uses ErrorNotice.
  • Find the source of "Fixture:". If it is only in the fixture host, leave the host alone but make sure production code never prints it; if production code adds it, remove it.
  • Errors are announced (role="alert" or aria-live="polite").
  • 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/:

  • chat-open-website-invalid-light.png
  • chat-markdown-table-light.png
  • chat-composer-error-light.png
  • serving-requests-all-light.png
  • serving-request-error-light.png
  • serving-cloudflare-error-light.png
  • skills-refresh-error-light.png
  • tasks-populated-light.png
  • setup-prepare-error-light.png

Done when

  • All checks pass.
  • Commit on branch fix/t04-error-notice with message T04: One error component, no fixture text.
  • 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# T04 · One error component, no fixture text
2
3**Phase 1** · 10 findings (0 high, 9 medium, 1 low) · Depends on: nothing, can start now
4
5## Goal
6Errors render as plain body text in seven places and most start with "Fixture:". Add one ErrorNotice component (icon, what happened, what to do, optional action) and use it everywhere.
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/ui.tsx` (new ErrorNotice)
11- `src/screens/Serving.tsx`
12- `src/components/CloudflareDialog.tsx`
13- `src/screens/Models.tsx`
14- `src/screens/Skills.tsx`
15- `src/screens/Tasks.tsx / src/components/TaskEditor.tsx`
16- `src/screens/Setup.tsx`
17- `src/screens/Chat.tsx` (open-website error)
18- `tests/ui-fixture-host.mjs` (check where the "Fixture:" prefix comes from)
19
20## Findings to fix (high and medium)
21| # | Severity | State | Issue | Suggested fix |
22|---|---|---|---|---|
23| 1 | Medium | `chat-open-website-invalid` | Error "Enter a full http:// or https:// address." is plain black body text below the helper; field has no error state | red text directly under field + red border + aria-invalid; helper below |
24| 2 | Medium | `chat-composer-error` | Composer error squeezed into the toolbar between "Auto" and Send in 11px red | error line above the composer with icon |
25| 3 | Medium | `serving-requests-all` | Status column is lowercase plain text (queued / generating / done / error); errors aren't red | status chips: grey queued, blue generating, green done, red error |
26| 4 | Medium | `serving-request-error` | Error reason shows fixture text: "Fixture: upstream response timed out after 4 seconds." | strip fixture prefix; plain cause + next step |
27| 5 | Medium | `serving-cloudflare-error` | Error is plain 16px black body text ("Fixture: Cloudflare could not establish…") with no error styling; buttons unchanged | red error callout with icon, cause, and "Try again" as the primary |
28| 6 | Medium | `skills-refresh-error` | Error is plain text at the bottom: "Fixture: skill service unavailable." — no styling, no retry | error banner under the header with Retry |
29| 7 | Medium | `GLOBAL` | Fixture text leaks into UI copy ("Fixture: …") in Serving, Cloudflare, Models, Skills errors | strip in fixture layer; errors use one component (icon, cause, action) |
30| 8 | Medium | `tasks-populated` | Failed run shows plain black text "Fixture: the demo model returned an invalid response." under the row | red inline status "Last run failed · View" (no fixture text) |
31| 9 | Medium | `setup-prepare-error` | Error state keeps the heading "Preparing your model" (with a visible focus box around it), shows "Preparation stopped" in plain bold, and ends with fixture text | heading "Couldn't prepare the model", red icon, cause, Retry; focus without visible ring on headings |
32
33## Optional polish (low)
34Do these only if the task is otherwise done and the budget allows.
35
36| # | Severity | State | Issue | Suggested fix |
37|---|---|---|---|---|
38| 1 | Low | `chat-markdown-table` | Status column "Ready" as plain text far right | status chip; tighter column widths |
39
40## How to check
41Run these and fix anything that fails:
42- `npm run typecheck`
43- `node --test tests/` (all existing tests stay green)
44- `npm run check` (typecheck, UI audit, contrast, measure, luminance)
45- `npm run build`
46
47Task-specific checks:
48- [ ] Every error state listed below uses ErrorNotice.
49- [ ] Find the source of "Fixture:". If it is only in the fixture host, leave the host alone but make sure production code never prints it; if production code adds it, remove it.
50- [ ] Errors are announced (role="alert" or aria-live="polite").
51- [ ] Each finding above is resolved, or marked "already fixed by Txx" or "not reproducible" with a one-line reason.
52
53Screens to re-capture and compare with the audit screenshots in `docs/evidence/audit-2026-10-07/`:
54- `chat-open-website-invalid-light.png`
55- `chat-markdown-table-light.png`
56- `chat-composer-error-light.png`
57- `serving-requests-all-light.png`
58- `serving-request-error-light.png`
59- `serving-cloudflare-error-light.png`
60- `skills-refresh-error-light.png`
61- `tasks-populated-light.png`
62- `setup-prepare-error-light.png`
63
64## Done when
65- All checks pass.
66- Commit on branch `fix/t04-error-notice` with message `T04: One error component, no fixture text`.
67- 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.