Repository navigation
fix(client): re-read the board when the rail switches Bots - #2072
Merged
Merged
Conversation
The board's load effect was keyed by the scope kind alone, so every Bot scope shared the key `own` and switching the rail kept the first Bot's archive page and its poll. The Done column of the newly selected Bot then filtered that page by its own id, so it read empty until the dialog was reopened, while the heading still said the page was that Bot's history. The key now names the Bot, so a switch re-reads the new Bot's archive.
Collaborator
|
Verdict: PASS at 11c3c80 Ran at this tip: Review points:
Limit of this run: the affected core suite only (the full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Dev-3
Fixes #2070
Owner: Dev-3
Reviewer: Birfy
Claim-Id: ec4ccab8d07f491eb506ffe0f6bbcb7a
Branch: dev/3-board-bot-switch-archive
Base: 5b862c6
Tip SHA: 11c3c80
What changed
A Bot board's load effect was keyed by the scope kind alone — every Bot scope shared the key
own— so switching the rail from one Bot to another never re-ran it. The new Bot's Done column then filtered the previous Bot's archive page by its own id and drew nothing, while the 15 s poll kept refilling the old Bot's cards; the column stayed empty until the dialog was reopened.The key now names the Bot (
bot:<id>, one line plus a comment), so a switch re-reads the new Bot's active list and its 20-card archive page. Nothing else inkanban.jsmoved: the:401sum row belongs to #2069 and is not touched.Red first
One test added to
core/test/kanban.test.js:P-360: switching the rail re-reads the archive, and the new Bot draws its own Done page. On live main5b862c6ewith no source change it ran three times:# tests 15 / # pass 14 / # fail 1each time. Failure:switching to Writer asks for Writer's archive page,archiveReads()actual['a']vs expected['a','s']— clicking Writer issued no new archive read. With the fix:15/15/0three times.Two mutation arms, three runs each: key back to
'own'→15/14/1;archiveQueryfrom the new scope with the effect deps still[key]→15/14/1, same failure message.Verification at the tip
Tip SHA: 11c3c80
Ran:
TZ=UTC ARCH_DOCS_BASE=5b862c6e5ecdd0a472826162ebb2abab63b91544 npm run verify— core 2529, social 541, tree 127, timeline 135, workflow 336,.github/scripts563, interop 37, live-e2e 24 (4292 tests, 0 fail); core lint 73 warnings / 0 errors;arch-docs: OK (8 changed file(s));ok 10 patches apply cleanly in order;ok core/ equals ds-bot/ + patches/ds-bot/;ok patches/ds-bot/ is what generate writes (generate is a no-op);changelog: 48 fragment(s) … are well formed;node scripts/build-client.mjs --checkexit 0.Also:
node scripts/ds-bot-patches.mjs generatetwice, the second run leavesgit status --porcelainempty.Not run (and why): the smoke test (no
index.jsorsrc/host/change) and the package job's pack check / typecheck / actionlint, which exist in CI only.Checkpoint
{ "pr": 2072, "claim": "Dev-3", "issue": 2070, "summary": "A Bot board's load effect shared one key across every Bot scope, so switching the rail never re-read the new Bot: its Done column filtered the previous Bot's archive page by its own id, drew nothing, and the poll refilled the old Bot's cards. The key now names the Bot, so a switch re-reads that Bot's active list and its 20-card archive page. A new test drives the dialog through a stateful hook runtime: A to B re-reads and draws B's 20 finished cards, and B back to A re-reads A, while the group board keeps its existing readings.", "files": [ "core/src/client/kanban.js", "core/test/kanban.test.js", "core/client.js", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/kanban.js", "patches/ds-bot/files/test/kanban.test.js", "docs/subsystems/core-client.md", "changelog.d/2070-kanban-rail-switch.fixed.md" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=5b862c6e5ecdd0a472826162ebb2abab63b91544 npm run verify; node scripts/ds-bot-patches.mjs generate (twice); node .github/scripts/changelog.mjs check", "result": "green", "at": "11c3c80103f2e7183dd10abc5a419bb02769d5d6" }, "next": "none — ready for review" }