Skip to content

Read a room board's drawn done rows as a lower bound - #2058

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-room-rail-bound
Nov 1, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-room-rail-bound

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2048

Written-by: Dev-1
Owner: Dev-1
Reviewer: Birfy
Claim-Id: 1bb5154906c840448e0f4b00473c3864
Branch: dev/1-room-rail-bound
Base: 70ca435
Tip SHA: 94bb765

What happens today

A room's board (scope.kind === 'group') cuts the archive page per room, but BoardView's rail decided the hedge from the Bot's own drawn done count against a full page (archiveFull && count.done >= ARCHIVE_SHOWN). So a Bot that drew 18 of one room page's 20 finished rows printed 18/18: a total the page never established, because the room's archive holds more done cards than the 20 drawn. That is #2045's complaint, still open on the room arm.

The change

core/src/client/kanban.js — the rail's capped branch is now archiveFull && (scope?.kind === 'group' ? count.done > 0 : count.done >= ARCHIVE_SHOWN). On a group board the page is cut across the room, so any done row a Bot drew is a lower bound and the rail hedges to N+ done; the Bot arm keeps its own rule, because there the page is that Bot's whole finished list. A short page still reads its exact counts, and the Done heading, DONE_MAX and the host path are untouched.

core/test/kanban.test.js — two cases: the room-share lower bound (18 of 20 on a cut page → 18+ done, a smaller share → 2+ done, with 1/1 and 2/2 short-page assertions), and a nail on the Bot arm (20+ done for the Bot whose own page is full, 0/20 for a Bot with twenty active cards), which goes red if the two arms are conflated.

docs/subsystems/core-client.md — the kanban row's rail sentence; changelog.d/2048-room-rail-bound.fixed.md carries the user-facing note. core/client.js and the patches/ds-bot/ mirrors are regenerated by build-client / generate, never hand-edited.

Red first

On 70ca435e with the base kanban.js in place and only core/test/kanban.test.js changed (cd core && node --import ./test/harness-resolve.mjs --test test/kanban.test.js): 13 tests / 12 pass / 1 fail, three runs identical.

  • #2045: a Bot whose share of a full group page is drawn reads as a lower bound, not a total → eighteen of a cut page is at least eighteen, never a total, expected: '18+ done', actual: '18/18'.
  • #2045: the rail hedge follows the Bot's drawn done rows, not its total is green before and after by design: it nails the Bot arm that must not move, and it goes red ('0+ done' !== '0/20') if the group rule is applied to it.

Verified

TZ=UTC ARCH_DOCS_BASE=70ca435e npm run verify → exit 0: core 2505/2505 (the base has 2503; this branch adds the two #2048 tests), social 541, tree 127, timeline 135, workflow 336, .github 563, interop 37, live-e2e 24; lint 73 / 36 / 9 / 2 / 16 warnings, 0 errors; build-client.mjs --check 0; four ok lines from two commands — ds-bot-patches check prints three (ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70, 10 patches apply cleanly in order, core/ equals ds-bot/ + patches/ds-bot/) and ds-bot-patches canonical prints one (patches/ds-bot/ is what generate writes, so a second generate is a no-op); arch-docs: OK (8 changed file(s)).

Which tree the checks ran on

Verify ran at local commit 562aa5118bf1fb850da1a261a9e228248e962956 (tree 2363ed14fb8e2a72ee8973492cb069fbcf202d19), single parent 70ca435e. The pushed head is rebuilt from that same tree by the push path, so the tip's tree is identical although its sha differs.

Replay onto main

main moved to 70ca435e (#2051, the Inbox Done group) after this branch was cut, and #2051 edits the same core/client.js, patches/ds-bot/0008-client-bundle.patch and docs/subsystems/core-client.md row block. The branch is one rebased commit on 70ca435e (no merge commit): both sides' core-client.md lines are kept, patches/ds-bot/ was reset to 70ca435e and rebuilt with build-client + generate (check → ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/; canonical → a second generate is a no-op; build-client --check → 0), and red first re-ran on the new base as 13 / 12 / 1 ×3 with the same failure. The full verify above is that tree.

Not run

The smoke test (nothing under core/index.js or core/src/host/ changed) and the packaged Desktop install path.

Checkpoint

{
"pr": 2058,
"claim": "Dev-1",
"issue": 2048,
"summary": "A room's board cuts the archive page per room, but the rail took each Bot's own drawn done count as the rule, so a Bot that drew 18 of the page's 20 finished rows printed 18/18, a total the page never established. On a group board the rail now hedges to N+ done whenever that Bot drew any done row on a full page, while the Bot board keeps its own rule (its own page full at ARCHIVE_SHOWN), so #2047's 20 newest / 20+ done stay. A page under the limit still reads exact counts; DONE_MAX and the host path are unchanged. Two tests cover both arms, and the room case fails without the change.",
"files": [
"changelog.d/2048-room-rail-bound.fixed.md",
"core/client.js",
"core/src/client/kanban.js",
"core/test/kanban.test.js",
"docs/subsystems/core-client.md",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/src/client/kanban.js",
"patches/ds-bot/files/test/kanban.test.js"
],
"checks": {
"ran": "local, on the pushed tree: full TZ=UTC ARCH_DOCS_BASE=70ca435e npm run verify (exit 0), build-client --check, ds-bot-patches check + canonical, kanban 13/13 (12/13 red first)",
"result": "green",
"at": "562aa5118bf1fb850da1a261a9e228248e962956"
},
"next": "none \u2014 ready for review: CI at the rebased tip, then enqueue"
}

@Birfy
Birfy added this pull request to the merge queue Nov 1, 2026
…#2048)

A group board cuts the archive page across the room, so a Bot with 18 of the
newest 20 finished cards holds a slice of its history, not its total, and the
rail printed `18/18`. When the page is full, any Bot whose finished rows are
drawn from it now reads `N+ done`; a page under the limit still reads its
exact counts. The Bot board keeps its own rule (a Bot's own page full at
ARCHIVE_SHOWN), because there the page is that Bot's whole finished list.
@HugoXK
HugoXK force-pushed the dev/1-room-rail-bound branch from ecebd1f to 94bb765 Compare November 1, 2026 16:04
Merged via the queue into ThinkFlowLab:main with commit b99e6c9 Nov 1, 2026
2 checks passed
@Birfy
Birfy deleted the dev/1-room-rail-bound branch November 1, 2026 16:06
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.

A room board's rail prints a Bot's drawn done rows as its total

2 participants