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
3.0 KiB57 linesraw

T05 · Show numbers when they matter

Phase 1 · 6 findings (2 high, 2 medium, 2 low) · Depends on: T01

Goal

The composer stats show "—" while generating, Monitor reads 0.0 tok/s at rest, percentages have no labels, and memory can read 20.0 / 16 GB. Show live values, label every unit, and catch impossible ones.

Files to change

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

  • src/components/ChatToolbar.tsx
  • src/lib/chat-metrics.ts
  • src/components/ContextRing.tsx
  • src/components/TelemetryPopover.tsx
  • src/screens/Monitor.tsx
  • src/lib/hardware-summary.ts
  • server/monitor.mjs, server/hardware.mjs

Findings to fix (high and medium)

#SeverityStateIssueSuggested fix
1Mediumchat-emptyStats row idle: "— tokens/s · 0 total tokens · ◌ —"hide until first reply
2Highchat-generatingStats row shows "— tokens/s · — total tokens" WHILE generating — the one moment speed mattersshow live tok/s during stream
3Mediumchat-showcase-code"21%" in stats row unlabeled"21% of context"
4Highmonitor-generating"System memory 20.0 / 16 GB" — used exceeds total, shown without warningcap/flag; if real, show "Over by 4 GB · swapping" in red

Optional polish (low)

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

#SeverityStateIssueSuggested fix
1Lowchat-generatingSidebar model dot turns blue during generation, no label/tooltip; "Serving 1" badge unexplainedtooltip "Generating"; badge → "1 request"
2Lowmonitor-*Header right icon (image glyph) has no labeltooltip "Save snapshot" or text button

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:

  • While generating, the stats row shows live tok/s. When idle it shows the last reply (e.g. "43.8 tok/s · last reply") or is hidden.
  • Every percentage has a label ("21% of context").
  • Used memory can never exceed total. Clamp it and log a warning, and make both free-memory figures come from one source.
  • Add unit tests for the clamping and idle formatting.
  • 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-empty-light.png
  • chat-generating-light.png
  • chat-showcase-code-light.png
  • monitor-generating-light.png

Done when

  • All checks pass.
  • Commit on branch fix/t05-live-numbers with message T05: Show numbers when they matter.
  • 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# T05 · Show numbers when they matter
2
3**Phase 1** · 6 findings (2 high, 2 medium, 2 low) · Depends on: T01
4
5## Goal
6The composer stats show "—" while generating, Monitor reads 0.0 tok/s at rest, percentages have no labels, and memory can read 20.0 / 16 GB. Show live values, label every unit, and catch impossible ones.
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/ChatToolbar.tsx`
11- `src/lib/chat-metrics.ts`
12- `src/components/ContextRing.tsx`
13- `src/components/TelemetryPopover.tsx`
14- `src/screens/Monitor.tsx`
15- `src/lib/hardware-summary.ts`
16- `server/monitor.mjs, server/hardware.mjs`
17
18## Findings to fix (high and medium)
19| # | Severity | State | Issue | Suggested fix |
20|---|---|---|---|---|
21| 1 | Medium | `chat-empty` | Stats row idle: "— tokens/s · 0 total tokens · ◌ —" | hide until first reply |
22| 2 | High | `chat-generating` | Stats row shows "— tokens/s · — total tokens" WHILE generating — the one moment speed matters | show live tok/s during stream |
23| 3 | Medium | `chat-showcase-code` | "21%" in stats row unlabeled | "21% of context" |
24| 4 | High | `monitor-generating` | "System memory 20.0 / 16 GB" — used exceeds total, shown without warning | cap/flag; if real, show "Over by 4 GB · swapping" in red |
25
26## Optional polish (low)
27Do these only if the task is otherwise done and the budget allows.
28
29| # | Severity | State | Issue | Suggested fix |
30|---|---|---|---|---|
31| 1 | Low | `chat-generating` | Sidebar model dot turns blue during generation, no label/tooltip; "Serving 1" badge unexplained | tooltip "Generating"; badge → "1 request" |
32| 2 | Low | `monitor-*` | Header right icon (image glyph) has no label | tooltip "Save snapshot" or text button |
33
34## How to check
35Run these and fix anything that fails:
36- `npm run typecheck`
37- `node --test tests/` (all existing tests stay green)
38- `npm run check` (typecheck, UI audit, contrast, measure, luminance)
39- `npm run build`
40
41Task-specific checks:
42- [ ] While generating, the stats row shows live tok/s. When idle it shows the last reply (e.g. "43.8 tok/s · last reply") or is hidden.
43- [ ] Every percentage has a label ("21% of context").
44- [ ] Used memory can never exceed total. Clamp it and log a warning, and make both free-memory figures come from one source.
45- [ ] Add unit tests for the clamping and idle formatting.
46- [ ] Each finding above is resolved, or marked "already fixed by Txx" or "not reproducible" with a one-line reason.
47
48Screens to re-capture and compare with the audit screenshots in `docs/evidence/audit-2026-10-07/`:
49- `chat-empty-light.png`
50- `chat-generating-light.png`
51- `chat-showcase-code-light.png`
52- `monitor-generating-light.png`
53
54## Done when
55- All checks pass.
56- Commit on branch `fix/t05-live-numbers` with message `T05: Show numbers when they matter`.
57- 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.