Skip to content

fix(dashboard): re-read a root session's Overview when its work ledger moves - #26953

Merged
bolichen97 merged 1 commit into
mainfrom
fix/overview-ledger-refresh-21915
Nov 1, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/overview-ledger-refresh-21915

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A root session's side panel Overview shows a newly recorded work item as soon as the session writes it, without reopening the panel.

A template page such as goal-board keeps showing "No item on this board yet" after the Conductor records an item in the same chat. Reopening the panel shows the item, so the page and the fold are right; only the refresh is missing (seen on #21889).

Why it matters

The Overview is the conductor's live board. Anyone using Crew Mode watches it to see what the crew is doing, and today it can sit on an empty or old board for up to the 60 s fallback read (and longer while the tab is in the background), which reads as "nothing is happening".

Not a goal

  • Changing what the gateway sends or how the session page is composed.
  • Live refresh of crewmate (member) dashboards, which already re-read on member_projection / dashboard_value_written.
  • Changing the 60 s fallback read.

What changed (motivation → approach → change)

Symptom: an open Overview keeps its old board after a work-ledger write.

Root cause: a ledger write reaches the tab only as a slot_projection frame, or a slot_fold delta for a tab that applies deltas. Both handlers re-read the command-center work board but never the session page. A tab that declared the fold-watch capability also only listed mounted work boards in fold_watch, so an Overview with no work board beside it did not get the frames at all.

Change:

  • foldWatch.ts: the watch set also lists the slot of every mounted root session page.
  • useWebSocket.ts + serverState.ts (handleSlotFoldMoved): both slot frames re-read the open session page of the frame's slot and of every slot it was created under (the same team roots the work board uses, so a worker's report moves its conductor's page). Through refreshDashboardReads, so a burst keeps one read in flight; slots with no cached page are skipped. A slot_fold the work board calls stale still re-reads the page: the board's own 10 s poll can land that revision first, which says nothing about the separately cached Overview.
  • The fold-delta RFC's sentence on what the watch set holds is updated to match.

I took the client path the issue names over a new gateway frame: the slot frames already fire on exactly this write, and the page reads stay owner-checked by the existing route.

Backwards compatibility

Compatible: a tab only re-reads a page it already shows, and only lists more slots in fold_watch; the gateway accepts any slot there.

Removes nothing: the diff only adds a re-read and a watch entry.

Tests

  • src/test/useWebSocket.sessionDashboardRefresh.test.ts (new, through the real hook and socket): a slot_projection for the root re-reads its open Overview; a frame for a worker created under it does too, and one for an unrelated slot does not; a slot_fold snapshot_needed re-reads it, and so does a delta whose revision the work board already polled (red with a stale guard on the call).
  • src/hooks/websocket/foldWatch.test.ts: a mounted Overview's slot is in the watch set and leaves it on unmount; an unobserved one is not.
  • src/test/useWebSocket.ownership.test.ts: lists the new foldWatch.ts -> serverState.ts import edge (for SESSION_DASHBOARD_QUERY_PREFIX).

Red/green: with only the new tests on origin/main sources, 4 of 8 fail (the 3 hook tests and the watch-set test); all pass with the fix. The two new files pass 5 runs with --sequence.shuffle (seeds 1-5). vitest related over the changed files (537 files) passes; tsc -p tsconfig.app.json, eslint and the repo semgrep rules pass.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

N/A - unit coverage sufficient: the hook tests drive the real WebSocket handler and react-query cache, which is the whole path between the frame and the page read.

Screenshots / video

Why no screenshot: the Overview renders exactly as before; only when it re-reads changes, which the hook tests cover.

Related Issues

Closes #21915

Sibling sweep

Swept: git grep -n "SESSION_DASHBOARD_QUERY_PREFIX\|MEMBER_DASHBOARD_QUERY_PREFIX" -- website/src
Sibling: website/src/hooks/websocket/serverState.ts -- not affected -- member pages already re-read on member_projection and dashboard_value_written

Pattern harvest

Not generalizable: the one cache key a slot frame failed to reach; the other readers of slot folds (work board, cards) already re-read on it.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 1, 2026 06:36
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 7aab5faf172ae0fb83642b5e748d4d68f3122796 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The diff adds and changes no visible control, string or layout. It only changes when an Overview that is already open re-reads its data, so it needs no screenshot.

[UX-REVIEWED] 7aab5fa

Description read

[DESCRIPTION-READ] dba1fab1720aa94392314e87240880f125eff273a7ab72c7ec6246137a5c8ff9

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 7aab5faf172ae0fb83642b5e748d4d68f3122796 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the fix reuses the slot frames that already fire on a ledger write, and the existing owner-checked page read does the refresh, so the gateway contract is unchanged.

Notes

  • Adding every open Overview's slot to fold_watch makes the gateway's fold_watch_routing follow more slots for each tab. Check that the per-slot fold cost on the gateway is acceptable when many root sessions are open.

[DESIGN-REVIEWED] 7aab5fa

Description read

[DESCRIPTION-READ] bb8850cf0350e1ec5ee14185cd0e5c54b024053ff9795666d6e406fcef866218

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7aab5faf172ae0fb83642b5e748d4d68f3122796 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The re-reads come from the slot frames that already fire on a ledger write (#21915). The watch-set entry is what lets those frames reach a tab that has no work board mounted.

What this change ships

Inventory (4 items) — 4 justified

Intent: a root session's open Overview shows a newly recorded work item without the panel being reopened. This is a FIX.

  1. An open Overview re-reads after a slot_projection from its own slot or from a worker created under it — justified
  2. An open Overview re-reads after a slot_fold, including one the work board calls stale — justified
  3. A tab with only an Overview mounted now asks for that slot's fold frames — justified
  4. The fold-delta RFC's sentence on what the watch set holds now matches the code — justified

[FIRST-PRINCIPLES-REVIEWED] 7aab5fa

Description read

[DESCRIPTION-READ] e10709dacfac101f9da81e0c10fb0be3015f6f8dca52d679cc02c09f4bb460fe

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 7aab5faf172ae0fb83642b5e748d4d68f3122796 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7aab5fa

Verdict parsed from the review's SHA-scoped output markers for commit 7aab5faf172ae0fb83642b5e748d4d68f3122796.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7aab5faf172ae0fb83642b5e748d4d68f3122796 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 1, 2026 06:39
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 7aab5faf172ae0fb83642b5e748d4d68f3122796 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7aab5fa

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7aab5faf172ae0fb83642b5e748d4d68f3122796 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 1, 2026
@bolichen97
bolichen97 force-pushed the fix/overview-ledger-refresh-21915 branch from 9065ed9 to b80ea8f Compare November 1, 2026 07:22
@bolichen97

bolichen97 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: Overview refresh gated on the work board's stale outcome

  • span=0a46568073a7 Work-board freshness does not establish Overview freshness

fixed in b80ea8f: the slot_fold case now re-reads the Overview on every frame, including stale; stale is judged against the work board's cache, which its own 10 s poll can fill first, so it says nothing about the separately cached Overview.
A true duplicate costs at most one extra read, coalesced by refreshDashboardReads. slot_projection keeps its stale break: that one comes from the per-frame accepted map (slotProjection.ts), which a board poll never writes, so it marks only duplicate deliveries.
Test: "a slot_fold delta re-reads it, even when the work board already polled that revision" (red with the old guard, green now).

…r moves

A root session's side panel Overview kept its old board after the session
recorded a work item, until the panel was reopened or the 60 s fallback read.
A work-ledger write reaches the tab only as a slot_projection or slot_fold
frame, which re-read the command-center work board but never the session
page, and a tab that watches boards did not list an open Overview, so the
gateway did not even send it those frames.

The fold watch now lists the slot of every mounted session page, and both slot
frames re-read the open session page of the frame's slot and of every slot it
was created under (the same team roots the work board re-reads), through
refreshDashboardReads so a burst of frames keeps one read in flight.

Closes #21915
@bolichen97
bolichen97 force-pushed the fix/overview-ledger-refresh-21915 branch from b80ea8f to 7aab5fa Compare November 1, 2026 09:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 1, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Backend Tests (3.12, 8) and the Coverage Gate (failing closed on it) are main's red, not this PR's: test/test_sandbox_protected_name_holds.py::TestLeafOnlyPopulationIsRecorded fails the same way on main push run https://github.com/kirodotdev/KiroCrew/actions/runs/41284924233, and this diff touches only website/ and one RFC. Fix in flight: #26983. Rebasing once it lands.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 1, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: frontend fix; a root session's open Overview now re-reads when a slot_projection or slot_fold frame shows its work ledger moved, and the fold watch set includes mounted Overview pages, with tests. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/request-for-change/rfc-fold-delta-push.md.

@bolichen97
bolichen97 merged commit 0f0097d into main Nov 1, 2026
149 of 151 checks passed
@bolichen97
bolichen97 deleted the fix/overview-ledger-refresh-21915 branch November 1, 2026 11:06
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Side panel Overview does not refresh when the session writes its work ledger

2 participants