You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Map panel does not follow the whiteboard ticket in play or a newly created one #306
The map panel does not follow the whiteboard. While working a whiteboard ticket, or after creating a new one during the session, the panel stays on the active map, so the ticket is invisible until the user presses the Whiteboard row by hand.
Repro (real case)
In powertrading-workspace: resolved whiteboard ticket #153, then created whiteboard ticket #154 (gh issue create with label trailhead:whiteboard). The panel stayed on active map #3, which excludes trailhead:whiteboard tickets by construction. #154 was visible only in the Dashboard view.
Cause
In plugins/trailhead/hooks/mod/map-pane.tsx the isDashboard atom becomes true only from pressDashboard/setDashboard (a click). No hook sets it when the session's work-state has map: null, nor after a gh issue create --label trailhead:whiteboard.
Expected behaviour
When the session takes a whiteboard ticket (work-state with map: null, read on session.start, turn.complete and after a Bash call running trailhead-work-state.js), the panel switches to the Dashboard/whiteboard view, once per ticket. If the user goes back to the map by hand, it is not forced again.
When a tracker write creates a whiteboard ticket (gh issue create with trailhead:whiteboard) and the active view is a map, the panel signals it: either switch to the whiteboard, or show a hint/toast like "new whiteboard ticket #n: open Whiteboard". The UX is to be chosen in discussion.
On Resolve of a whiteboard ticket (work-state cleared) the view stays on the whiteboard, so the next frontier is visible.
Acceptance
plugins/trailhead/hooks/mod/README.md (Map panel section) documents the auto-follow behaviour.
Tests in plugins/trailhead/tests/: a mocked work-state with map: null, and a tool.call of gh issue create with the whiteboard label.
Scope confirmed as written. Closed choice for point 2 (a whiteboard ticket created while the panel shows a map): toast hint, e.g. new whiteboard ticket #n: open Whiteboard; the view stays on the map (no auto-switch), so a user looking at the map is not pulled away.
Points 1 and 3 as in the ticket: auto-switch to the whiteboard view once per whiteboard ticket in play (no re-force after a manual return to the map), and stay on the whiteboard after Resolve.
Root cause (falsifiable hypothesis, confirmed): nothing derives the panel's isDashboard view from the work-state, and nothing inspects a gh issue create for the whiteboard label. Two independent sub-causes:
In plugins/trailhead/hooks/mod/map-pane.tsx, isDashboard has four writers (viewMap -> false, setDashboard reached only from the pressDashboard buttons, restoreAfterClear, one reset to false); none is driven by workState. viewTarget is viewed ?? active, so a work-state with map: null does not move the view either.
The GH_ISSUE_WRITEtool.call handler only requests a refresh; it reads neither the command's labels nor its output, so it cannot hint a new whiteboard ticket.
Falsification test (run): two probe tests on the mod test rig (claude plugin test plugins/trailhead): (a) own work-state map: null, ticket: 301 + turn.complete + a trailhead-work-state.js Bash call, expecting the whiteboard view; (b) gh issue create --label trailhead:whiteboard, expecting one toast. Unpatched: both red (870 pass, 2 fail; panel stayed on map #198, toasts empty). One-variable intervention (set isDashboard when workState.map === null on turn.complete): (a) green, (b) still red, so the two gaps are independent (both must be fixed). Probes removed.
Fix constraints found: follow only this session's own, non-orphaned whiteboard ticket; remember the followed ticket in module state (atoms reset on /clear) so a manual return to the map is not forced again; read the work-state after the band's refresh (the helper-call trigger lives in register.tsx); parse the new issue number from the gh issue create stdout URL, toast only while a map is shown.
W1 fixed (0aeb792): the whiteboard label was missed when not on the same segment as issue create (backslash continuation, a separator or newline inside a quoted title/body).
I1 fixed (0aeb792): a label flag inside a quoted argument gave a false positive; the attached -lLABEL form was missed. Now a quote-aware segment split; failing cases added first (1b70501).
I2 accepted: the Bash result shape (result.stdout, string, or text) follows the host types; a mismatch can only drop the toast, never show a wrong one; settled by acceptance testing.
I3 accepted: debug became a function declaration because the mod loader refused the file when $ was passed to a const arrow from a function exported to another file's hook.
Review notes: hook order holds (followWhiteboard runs after the awaited work-state refresh at session start, turn end and after the helper call); once-per-ticket memo survives /clear; Resolve leaves view and memo untouched; a failed create raises no toast.
Goal-backward verification
status: met
Own whiteboard ticket in play switches the panel to the whiteboard once per ticket, not re-forced after a manual return to the map, also across /clear: met (nextFollow in whiteboard-follow.ts, followWhiteboard in map-pane.tsx, called from register.tsx after the refresh; integration tests).
Whiteboard ticket created while a map is shown raises a toast naming #n, no switch; none on the whiteboard view, on error or without the label: met (hintWhiteboard in the GH_ISSUE_WRITE handler; tests).
Resolve keeps the whiteboard view: met (null state changes nothing; test).
README Map panel section documents the auto-follow: met (26a13a1).
Tests with a mocked map: null work-state and a gh issue create whiteboard tool.call: met.
Tests: claude plugin test plugins/trailhead 591 pass, 0 fail; claude plugin validate passed; scripts/test.js (npm test) 65 ok, 0 failed on the first fix round.
Cause: nothing derived the panel's whiteboard view from the work-state, and the tracker-write hook never inspected a gh issue create for the whiteboard label.
Fix:
9551794whiteboard-follow.ts (new, pure): once-per-ticket follow rule, whiteboard-create detection, created issue number, hint text; tests in whiteboard-follow.test.ts.
cd4768fmap-pane.tsx + register.tsx: followWhiteboard runs after the work-state refresh (session start, turn end, helper call) and switches to the whiteboard view for this session's own whiteboard ticket, once per ticket (memo survives /clear); a whiteboard ticket created while a map is shown raises the toast new whiteboard ticket #n: open Whiteboard; integration tests in map-pane-ui.test.ts.
26a13a1README.md: Map panel section documents the behaviour.
Activity
ToRvaLDz commentedon Oct 22, 2026
DISCUSS
Scope confirmed as written. Closed choice for point 2 (a whiteboard ticket created while the panel shows a map): toast hint, e.g.
new whiteboard ticket #n: open Whiteboard; the view stays on the map (no auto-switch), so a user looking at the map is not pulled away.Points 1 and 3 as in the ticket: auto-switch to the whiteboard view once per whiteboard ticket in play (no re-force after a manual return to the map), and stay on the whiteboard after Resolve.
ToRvaLDz commentedon Oct 22, 2026
REPRO
.trailhead/active-map= N) and the map panel open on it.trailhead-work-state.js set ... --map none --ticket W(work-statemap: null).trailhead:whiteboard).gh issue create ... --label trailhead:whiteboardwhile the panel shows a map.Real case:
powertrading-workspace, whiteboard #153 resolved then #154 created; the panel stayed on map #3.ToRvaLDz commentedon Oct 22, 2026
DIAGNOSIS
Root cause (falsifiable hypothesis, confirmed): nothing derives the panel's
isDashboardview from the work-state, and nothing inspects agh issue createfor the whiteboard label. Two independent sub-causes:plugins/trailhead/hooks/mod/map-pane.tsx,isDashboardhas four writers (viewMap-> false,setDashboardreached only from thepressDashboardbuttons,restoreAfterClear, one reset to false); none is driven byworkState.viewTargetisviewed ?? active, so a work-state withmap: nulldoes not move the view either.GH_ISSUE_WRITEtool.callhandler only requests a refresh; it reads neither the command's labels nor its output, so it cannot hint a new whiteboard ticket.Falsification test (run): two probe tests on the mod test rig (
claude plugin test plugins/trailhead): (a) own work-statemap: null, ticket: 301+turn.complete+ atrailhead-work-state.jsBash call, expecting the whiteboard view; (b)gh issue create --label trailhead:whiteboard, expecting one toast. Unpatched: both red (870 pass, 2 fail; panel stayed on map #198, toasts empty). One-variable intervention (setisDashboardwhenworkState.map === nullonturn.complete): (a) green, (b) still red, so the two gaps are independent (both must be fixed). Probes removed.Fix constraints found: follow only this session's own, non-orphaned whiteboard ticket; remember the followed ticket in module state (atoms reset on /clear) so a manual return to the map is not forced again; read the work-state after the band's refresh (the helper-call trigger lives in
register.tsx); parse the new issue number from thegh issue createstdout URL, toast only while a map is shown.ToRvaLDz commentedon Oct 22, 2026
VERIFY
status: clean
critical: 0 · warning: 1 · info: 3
Findings ledger:
issue create(backslash continuation, a separator or newline inside a quoted title/body).-lLABELform was missed. Now a quote-aware segment split; failing cases added first (1b70501).result.stdout, string, ortext) follows the host types; a mismatch can only drop the toast, never show a wrong one; settled by acceptance testing.debugbecame a function declaration because the mod loader refused the file when$was passed to a const arrow from a function exported to another file's hook.Review notes: hook order holds (
followWhiteboardruns after the awaited work-state refresh at session start, turn end and after the helper call); once-per-ticket memo survives /clear; Resolve leaves view and memo untouched; a failed create raises no toast.Goal-backward verification
status: met
nextFollowinwhiteboard-follow.ts,followWhiteboardinmap-pane.tsx, called fromregister.tsxafter the refresh; integration tests).hintWhiteboardin theGH_ISSUE_WRITEhandler; tests).map: nullwork-state and agh issue createwhiteboardtool.call: met.Tests:
claude plugin test plugins/trailhead591 pass, 0 fail;claude plugin validatepassed;scripts/test.js(npm test) 65 ok, 0 failed on the first fix round.feat(mod): add the pure rules for following the whiteboard
fix(mod): make the map panel follow the whiteboard ticket in play
docs(mod): document the panel following the whiteboard
test(mod): add failing cases for multi-line and quoted label commands
fix(mod): read the whiteboard label in continued and quoted commands
ToRvaLDz commentedon Oct 22, 2026
Resolved
Cause: nothing derived the panel's whiteboard view from the work-state, and the tracker-write hook never inspected a
gh issue createfor the whiteboard label.Fix:
whiteboard-follow.ts(new, pure): once-per-ticket follow rule, whiteboard-create detection, created issue number, hint text; tests inwhiteboard-follow.test.ts.map-pane.tsx+register.tsx:followWhiteboardruns after the work-state refresh (session start, turn end, helper call) and switches to the whiteboard view for this session's own whiteboard ticket, once per ticket (memo survives /clear); a whiteboard ticket created while a map is shown raises the toastnew whiteboard ticket #n: open Whiteboard; integration tests inmap-pane-ui.test.ts.README.md: Map panel section documents the behaviour.-lLABEL), from review findings W1/I1.Findings ledger: #306 (comment)
Acceptance testing: waived by the user (unconfirmed in the real panel; the automated rig drives the same hooks on both surfaces, 591 pass).