Skip to content

Studio: four root causes behind nine QA bugs (#1036) - #1051

Merged
danielrispler merged 22 commits into
mainfrom
issue-1036-qa-root-causes
Dec 1, 2026
Merged

danielrispler merged 22 commits into
mainfrom
issue-1036-qa-root-causes

Conversation

@danielrispler

@danielrispler danielrispler commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Spec #1036: nine QA bugs traced to four root causes, one rule each.

1 interaction outlives its element
  panel.ts      outside press reads event.composedPath() at dispatch      (#1044)
  dom.ts        open hint closes when its trigger is off the page;
                prune re-queues every 300 ms while a hint is open         (#1044)
  map-agents.ts badge list whose badge is gone → focus to plate's open
                button (part or closed zone); none after project switch   (#1045)
2 failure drawn as a result
  transport.ts  fetch rejection → CommandError("plotkeeper is not reachable")
  notice.ts     quiet while the connection line shows; dropped on reconnect
  map-pre-flight.ts  issues: list | loading | { failed } → "Couldn't read the open issues: <reason>"  (#1046)
3 state ≠ layout
  layout.ts     listOverlaid(classes, mode): Esc closes the list only when drawn over the map
  style.css     top bar: text shrinks with "…", buttons never; connection line gives way last  (#1047)
4 unbounded untrusted text
  session_view.rs  checked_name: trim, ≤ 200 Unicode scalar values, else refuse   (#1048)
  questions.ts / decisions.ts  permission command as a block: line breaks kept, wraps,
                dock capped at 12lh with its own scroll                       (#1049)
  story.ts      rename dialog counts like the server; Save aria-disabled + note past 200;
                rename/Delete dialogs wrap and scroll old long names          (#1049)
docs            map.md (#1050), sessions.md, cards.md, plotkeeper.md

Snap harness: …Phone (390×800) and …Small (640×800) sizes; under 500 px the page draws in an iframe of that width, since headless Chrome's window is never narrower (real pointer and keys checked to land inside it).

Evidence

Every new snap check and test row ran red on the old code, then green.

  • History press (mapPanelHistory). Before: "the panel closed", select ["e1",null], hint-name-e1 open at 6,0. After: story shown, select ["e1"], no hint open.
  • Badge focus (mapBadgeList, mapBadgeSwitch). Before: "the keyboard is on the body". After: focus on Shell's .plate-open / the Terminals sheet button; untouched after a project switch.
  • Pre-flight (mapPreFlightIssuesFailed). Before: "No open issues." After: "Couldn't read the open issues: gh: not logged in", text box and Pick parts by hand enabled.
  • Esc (listEsc). Before: "the first Esc left the story open". After: one Esc closes the panel; listEscNarrow keeps the strip's layering.
  • Top bar (topBarPhone/Small/Narrow). Before: Reload, Needs you and Settings outside the window at 390 and 640. After: every button inside and hit at its centre; connection line ≥ "Lost connection…" wide in the retrying state.
  • Permission command (permissionCommand), rename cap (renameCap), old long names (longNameDialogs, …Phone): red on line counts, command outside the card, Save available, note missing, Delete dialog scrolling sideways; green after. Screenshots (local only, gitignored): local-evidence/2026-12-01-qa-root-causes/screenshots/1049-dock-permission-command.png, 1049-rename-201-emoji.png, 1049-long-name-delete-dialog.png, 1049-long-name-delete-dialog-phone.png.
  • Node: transport (TypeError → "plotkeeper is not reachable", HTTP reason kept), notice quieting and drop, listOverlaid 10-row table, issuesOf, hint table (7 rows). Rust: checked_name table (200 Hebrew+emoji ok, 201 refused, whitespace-only → empty, trimmed incl. U+0085) and a refused rename appends nothing.
  • npm run check green (1076 node, 2157 Rust); check:windows green; Windows runs green on every merge.

Tests merged: the hint tests in ui/tests/hint-redraw.test.mjs from #1044 (removed trigger, kept span, kept button, set aside) and the older "an unkeyed summary drawn again while its hint is open keeps that hint until it closes" are now rows of one table in that file, with each exact case kept.

Correctness pass

A correctness pass over the whole branch (plus standards and spec reviews) found, all fixed in 3ae5bad and checked by breaking each guarded behaviour:

  • a hint still stranded at 6,0 when a keyed trigger was replaced by a new node with the same key;
  • at 390 px the connection line was ~25 px ("L…") while it silenced the unreachable notice;
  • an unreachable notice drawn before the connection line stayed after reconnect;
  • the dialog trimmed U+0085 / U+FEFF differently from the server;
  • vacuous or missing rows: permission description, the toggle-open prune, trim-before-count, the Pre-flight failed state.

Left open on purpose:

  • a trigger kept by patch whose redraw names another hint keeps the old hint's text until the pointer leaves (fixing it reverses the unkeyed-summary rule above);
  • after a restart at 390 px with the install hint showing, Reload leaves the connection line at "plotke…" (written in plotkeeper.md; the spec rules out a second line or a menu).

Outside review

review unavailable: the Gemini quota is under its floor (5h 50% left, floor 50%)

Routing

#1044 Route outcome: strong·high claude/opus → pass | 13m
#1045 Route outcome: strong·high claude/opus → pass | 25m
#1046 Route outcome: medium·medium claude/sonnet → pass | 21m
#1047 Route outcome: medium·medium claude/sonnet → pass | 9m
#1048 Route outcome: cheap·medium opencode/deepseek-v4.1-flash-free → pass | 19m
#1049 Route outcome: medium·medium claude/sonnet → pass | 11m
#1050 Route outcome: cheap·medium opencode/deepseek-v4.1-flash-free → pass | 18m

Medium UI tickets in this run: 3 (#1046, #1047, #1049); the final review's confirmed findings fell on #1044 (strong, hint) and #1047 (medium, top bar) and on test rows across #1046 and #1049.

Merge Danger

Door: two-way

No stored data is rewritten; names over 200 in old logs still replay. The server's new refusal only affects renames from now on.

Blast Radius: page-wide

Hints everywhere (new 300 ms prune while one is open), the left panel's light dismiss, Esc ordering in the full layout, the top bar at every width, and every .ask dialog's layout. The snap harness's iframe path changes how fixtures under 500 px are drawn.

Closes #1036
Closes #1044
Closes #1045
Closes #1046
Closes #1047
Closes #1048
Closes #1049
Closes #1050

🤖 Generated with Claude Code

https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa

danielrispler and others added 22 commits December 1, 2026 21:30
…s when it couldn't read issues (#1046)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
…ger leaves the page (#1044)

The left panel's outside press reads the event's path fixed at dispatch, so a History row's press, which draws the story over the
row, no longer closes the panel. An open hint that no trigger on the page names closes; opening a hint queues a prune, which
re-queues itself while a hint shows, so a stranded hint closes within a tick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
…t's button (#1045)

A badge list open from the keyboard closes when a redraw drops its badge. The
focus then fell to the page's body; it now lands on the plate's open button,
the part's or the closed zone's sheet button, as paint() already does for a
focused badge that a spotlit chip replaced.

mapBadgeList gains both cases with real keys, a closed Terminals zone for the
zone's, and a 9 s budget for the longer script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
… alone (#1045)

The badge list's close moves the focus only while the list's project is
still the shown one, so a switch never lands it on the new map's plate of
the same id. mapBadgeSwitch covers it. paint() and listClosed() share the
plate's open-button lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
Worker: opencode/deepseek-v4.1-flash-free
…ar keeps its buttons in a narrow window (#1047)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
…he new snap fixtures keep to it (#1047)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
…te dialogs bound long names (#1049)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
Worker: opencode/deepseek-v4.1-flash-free
- A hover hint closes when its trigger is replaced by a new one with the
  same key, not only when no trigger names it; the #1044 hint tests are
  one table, with rows for that case and for an interestfor hint closed
  by the prune its toggle queues.
- The connection line gives way last in the top bar, and the bar's gaps
  tighten at phone width, so the retrying line keeps "Lost connection…"
  at 390 px; the top-bar fixture checks it.
- An unreachable error drawn before the connection line showed goes when
  the stream's state changes.
- The rename dialog trims as Rust's str::trim does (Unicode White_Space)
  before it counts; renameCap is a table with trim rows, and the Rust
  table gains a trim-then-count row.
- Pre-flight's failed read goes through issuesOf, which the node test
  drives; permissionCommand checks the description sits right under the
  command.
- UNREACHABLE lives in transport.ts; docs follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
…a `then` key (#1036)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CVqACafozqqdDZevv65PCa
@danielrispler

Copy link
Copy Markdown
Owner Author

review unavailable: the Gemini quota is under its floor (5h 50% left, floor 50%)

@danielrispler
danielrispler merged commit b725cd7 into main Dec 1, 2026
15 of 16 checks passed
@danielrispler
danielrispler deleted the issue-1036-qa-root-causes branch December 1, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment