Repository navigation
Read the team dossier once per board open, not on every poll - #1902
Conversation
The five-second refresh (ThinkFlowLab#1814) is wanted, but it carried the whole team dossier with it: project-team builds its answer by reading persona and memory files, so every tick re-read and re-sent up to ~16 KB for an answer only an edit changes. readProjectBoard now takes the answer the open already read, and the overlay hands it back on every later read, so a tick asks project-team zero times. A refused dossier is no longer fatal: the rows, the done group and the tasks draw with an empty team block, and the empty-Project answer stays reserved for a Project that really is absent.
280c3eb to
473da95
Compare
|
Verdict requested for this tip: 280c3eb (tree e7bf737ce295da54a14fbc742de15f3db2ea8290, base 2ec1687) @Birfy review request #1900: the five-second board refresh is wanted (#1814), but it carried the whole team dossier with it —
Red first on Owner: Dev |
|
Verdict requested for this tip: 280c3eb (tree e7bf737ce295da54a14fbc742de15f3db2ea8290, base 2ec1687) @Birfy review request — #1900 (the board re-read the whole team dossier on every 5s poll). The PR body carries the red-first run, the full What to look at:
Owner: Dev |
|
New tip for this review: 473da95 (tree e7bf737ce295da54a14fbc742de15f3db2ea8290, base 2ec1687) @Birfy review request The head moved once after the first request ( At Owner: Dev2 |
Fixes #1900
Owner: Dev2
Written-by: Dev-2
Reviewer: Reviewer
Claim-Id: d9bb0a24e4624ac898fbf8fbc4edf49d
Base: 2ec1687
Tip SHA: 473da95 (the pushed head; the push path rebuilt it from local commit
e644d21184ec,same tree
e7bf737c, so the two commits carry identical content)Tree: e7bf737ce295da54a14fbc742de15f3db2ea8290
Diff: 10 files, +283/−46
What changed
readProjectBoardasked forproject-teaminside the samePromise.allas the three answers thatactually change, and the board's five-second refresh calls it again on every tick. The dossier is
built on the host by reading persona and memory files (
readFileSync/readdirSyncon the requestpath), so an open board paid that every 5 s to receive an answer that had not changed.
core/src/client/project-board.js:readProjectBoard(read, wanted, knownTeam)— whenknownTeamis given the dossier is that valueand no
project-teamcall is made; when it isundefinedthe read happens once, as before. Onthe first read the call is wrapped in
.catch(() => null), so a failing dossier no longer takesthe whole read with it.
ProjectBoardOverlaykeeps the answer inteamand hands it back on every later read, so thepoll re-reads only
project-read,project-boardandtasks. The dossier is read again on thenext board open, which is what the issue asks for; nothing is cached across opens.
The empty-Project answer is untouched:
project-board.jsstill returns it only when the projectreally is absent. A dossier that refuses yields
team: { rows: [] }with rows,doneand tasksstill drawn.
Regenerated, not hand-edited:
core/client.js(node core/scripts/build-client.mjs) andpatches/ds-bot/0008-client-bundle.patch(node scripts/ds-bot-patches.mjs generate, which rewrotethe
0008hunks and their headers); the two whole-file mirrors underpatches/ds-bot/files/followtheir sources.
docs/subsystems/core-client.mdhas the one line the arch-docs gate asks for, andchangelog.d/1900-team-dossier-off-the-poll.fixed.mdis the fragment.Red first
Commit
6d886eaeis tests only, on the unchanged source (2ec16870). At that commitcore/test/project-board-panels.test.js+core/test/project-board-view.test.js:The two behavioural failures, verbatim:
(
#1814's case is the poll contract this change has to keep; it now counts the three poll reads andnot four. The third failure is the panels file as a whole: the counting stub sees
project-teamasked twice for two reads.)
At the tip
e644d211, the same two files:# tests 42 / # pass 42 / # fail 0.Verification at the tip
Ran:ate644d21184ec(treee7bf737c, the pushed head473da95758has the same tree),git status --porcelainempty before and after:project-board-panels+project-board-view42/42)arch-docs: OK (10 changed file(s))build-client.mjs --check: clean (the generated bundle matches its sources)What I did not run
npm run verify: the plugin suites (plugins/social|tree|timeline|workflow), the.github/scriptssuite, interop and live-e2e were not run for this tip — the change is client-onlyand the Lead's instruction for this ticket was
core+check/canonical+build-client --check.CI runs the full
verify.Checkpoint
{ "pr": 1902, "claim": "Dev2", "issue": 1900, "summary": "readProjectBoard now takes the dossier answer the board already read, so the five-second refresh no longer asks project-team on every tick. ProjectBoardOverlay keeps that answer and hands it back on later reads; the dossier is read again on the next board open. A refused dossier is no longer fatal: the team half becomes null and rows, the done group and task texts still draw. The two client test files cover the once-per-open read, the non-fatal refusal and the real timer tick count. core/client.js and the 0008 patch chain were regenerated from source.", "files": [ "core/src/client/project-board.js", "core/test/project-board-panels.test.js", "core/test/project-board-view.test.js", "core/client.js", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/project-board.js", "docs/subsystems/core-client.md", "changelog.d/1900-team-dossier-off-the-poll.fixed.md" ], "checks": { "ran": "CI at tip 473da957: tests-ok, merge-gate, package, plugins tree/social/timeline/workflow, Node 24, judge (14/14 green)", "result": "green", "at": "473da95758cffadb45666c885b87d0906556a79c" }, "next": "enqueue for merge — no review left" }