Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: ec4ccab8d07f491eb506ffe0f6bbcb7a
Branch: dev/3-board-bot-switch-archive
Base: 5b862c6
At: 2026-11-01T17:55:34Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
What happens today
Click another Bot in the board's rail and its Done column empties, although that Bot has finished cards and its archive page holds them.
core/src/client/kanban.js on 5b862c6e:
:170—const key = scope?.kind === 'group' ? \group:${scope.roomId}` : 'own'`. Every Bot scope produces the same key, so moving from Bot A to Bot B does not change it.:198— the board effect's dependency array is[key]alone, so switching Bots does not re-run it: no new read is issued.:179—const archiveQuery = scope?.kind === 'bot' ? { botId: scope.botId } : queryis evaluated once per (non-re-)run, so it keeps the previous Bot'sbotId.:190— the archive page read therefore asks for the old Bot's page; the 15 s poll inside the same effect keeps doing so.:207—const done = scope?.kind === 'group' ? archive : archive.filter(task => !scope?.botId || task.ownerBotId === scope.botId)filters that old page by the new scope, so nothing survives: the Done column renders empty until the user happens to switch back or reload.
The room scope is the reason this reads as "Done is fine"; it is /group:<roomId> and does re-run. Only the Bot-to-Bot switch is broken.
Reproduction (red first, on live main 5b862c6e)
Harness-level, after a Bot board and a second Bot with one done card in its archive page:
- Render the board with scope
{ kind: 'bot', botId: 'a' }whose archive page returns a done card owned bya; the Done column draws it. - Re-render with scope
{ kind: 'bot', botId: 'b' }, whose archive page ({ botId: 'b', archive: true, limit: 20 }) returns a done card owned byb. - Today: zero done cards are drawn — the effect did not re-run, and what it holds was read for
aand is then filtered byb. - Expected: the Done column draws
b's done card. The read is issued with{ botId: 'b', archive: true, limit: 20 }.
The control that must stay green: the same sequence for a → b → a, and a group scope ({ kind: 'group', roomId }) that still reads its archive on entering the room.
Red first, measured on live main 5b862c6e
With only the new test file in place (source untouched), three runs read # tests 15 / pass 14 / fail 1, failing exactly P-360: switching the rail re-reads the archive, and the new Bot draws its own Done page on switching to Writer asks for Writer's archive page — archiveReads() is ['a'] where ['a','s'] is required, i.e. clicking Bot B issues no new archive read at all. The case drives a real stateful hook runtime (hook slots per component path, effect re-run only when deps change, setter-driven re-render, fake 15 s clock) rather than the top-of-file stub that never re-runs an effect (#1810).
Mutations that must go red on top of the fix: the key reverted to 'own' (three runs 15/14/1, same failure), and the archive query read from a ref holding the new scope while the dependency array keeps the old key (same failure — no re-read on a switch).
Expected behaviour and scope
- The board effect re-runs when the Bot changes; the archive read names the Bot now being shown; the Done column reflects that Bot's finished cards.
- Scope:
core/src/client/kanban.js(the key, one line plus comment),core/test/kanban.test.js,core/client.jsand the matchingpatches/ds-bot/mirror (0008,files/src/client,files/test) regenerated by the script rather than hand-edited, one line indocs/subsystems/core-client.mdnext to the P-364 note, and onechangelog.d/fragment. - Out of scope:
kanban.js:401's Done total (#2069), the Done page's pagination (P-361), the silent read failure (P-370), and the Done column's missing finish time (#2066). Separate issues; do not widen this one.
Dedupe
Searched live main 5b862c6e and the closed issues for board/archive/Done switching: #2045 and #2048 (closed, the archive page printed as the Done total), #2063 (closed, a room rail counting only its archive page), #2066 (open, the Done column not showing when a card finished), #1793/#818 (retired Bot, archived section border — unrelated). Nothing open covers a Bot switch leaving the Done column empty.
Acceptance
- A failing test first, on
5b862c6e, whose failure names this behaviour (not an import error). - Two mutation arms: reverting the key to
'own'must turn the new test red; keeping the key fixed but leaving the archive query closed over the previous scope must turn it red too. TZ=UTC ARCH_DOCS_BASE=5b862c6e npm run verifygreen,build-client --check0,ds-bot-patches checkclean (core/equalsds-bot/plus patches),changelog.mjs checkgreen.
Activity
HugoXK commentedon Nov 1, 2026
Claim-Id: ec4ccab8d07f491eb506ffe0f6bbcb7a
Branch: dev/3-board-bot-switch-archive
Base: 5b862c6
Owner: Dev-3
Reviewer: Birfy
Written-by: FlyBot Lead
Claimed-by: FlyBot Dev-3
Scope is
core/src/client/kanban.js:170(the board effect's key must name the Bot), withcore/test/kanban.test.js,core/client.js, thepatches/ds-bot/mirror regenerated by the script, one line indocs/subsystems/core-client.mdnext to the P-364 note, and onechangelog.d/fragment.Not in scope:
kanban.js:401's Done total (#2069), Done-column pagination (P-361), the silent board read failure (P-370), the Done column's missing finish time (#2066).Red first is already measured on
5b862c6e(three runs# tests 15 / pass 14 / fail 1, failingP-360: switching the rail re-reads the archive, and the new Bot draws its own Done pageonswitching to Writer asks for Writer's archive page,archiveReads()['a']vs['a','s']); two mutation arms go red on top of the fix. The pull request follows from the branch above.HugoXK commentedon Nov 1, 2026
Release
Written-by: FlyBot Lead
Released: ec4ccab8d07f491eb506ffe0f6bbcb7a
Reason: landed on main (PR merged)
At: 2026-11-01T18:17:58Z