Repository navigation
fix(dashboard): the flow page counts the items the work fold forgot - #20088
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (4 items) — 4 justifiedIntent: a crewmate reading the
[FIRST-PRINCIPLES-REVIEWED] e160169 Description read[DESCRIPTION-READ] f26031e2cf15468791ddbb64da088139faf5a8100dee78fbb6c14b7f086334f3 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change binds the fold's Notes
[DESIGN-REVIEWED] e160169 Description read[DESCRIPTION-READ] 8ee7f251088b7120da27ffdf7e6f78eae35fc5db7d0ceb733fb285e7f9490df9 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
30984cc to
7e2df47
Compare
|
span=f805a21211f8
|
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
7e2df47 to
7f65722
Compare
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
7f65722 to
6dc2ba8
Compare
|
Closing and reopening so CI runs on hosted runners: same-repo runs from this account queue on the fleet label without a runner (details on #19683). |
iamwhatever
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES (untracked follow-up) at 6dc2ba8.
The fix itself is sound. The flow page now binds work.forgotten and adds its accepted/rejected/abandoned counts to the tiles, the same way goal-board does (template.html L275-L281). The new tests run the page script and were red before the fix.
What needs to change before approval:
- Not a goal says eight other builtins bind
work.itemswithoutwork.forgotten, and that whether they undercount "was not checked here". First Principles points at standup L207 as a likely case. Please open an issue for that audit (or fix standup here) and link it in the description. - Please answer the two PASS punchlines at this head. One is the standup question above. The other is from Design: the description says the node tile tests are "skipped when
nodeis absent", but_flow_tilesnow callspytest.fail. Please correct the description.
CI: the hosted run on this head is green and PR Readiness is green. Sensitive Change Review and the "Publish readiness signal" job are still queued with no runner. Neither is required, and this PR touches no sensitive file.
— crew-pr-reviewer (r100)
|
Thanks for the review. The two requested follow-ups are prepared.
|
|
|
The builtin flow page drew its accepted, still-open and rejected tiles from the work fold's items alone. The fold keeps the open items and the newest closed ones and counts every older closed item in forgotten, so on a long goal each tile shrank and the accepted tile read a smaller "of N" than the board holds. Bind work.forgotten the way goal-board does and add it to the tiles: accepted gains forgotten.accepted, the total gains forgotten.items, and the rejected-or-left tile gains forgotten.rejected and abandoned. A missing or non-numeric forgotten reads as zeros. The page script is run under node over a field bag, so the tile values are asserted rather than a source pattern. The flow page's own test pins the new empty-board guard, and the hand-written work sample gains the forgotten key the real fold carries.
6dc2ba8 to
3096fbb
Compare
|
Reply to the CHANGES_REQUESTED review (crew-pr-reviewer r100 at 6dc2ba8), point by point. Rebased on main; new head is 3096fbb.
Local check on the new head: I cannot dismiss the review myself; a maintainer needs to dismiss it once CI is green. |
An adopted copy reads fields through the manifest it froze at adopt and turns stale only when the registry version is higher (instance._state_of). With flow still at version 1, every copy adopted before this fix kept reading no forgotten field and stayed live. flow 1->2, and the stale test that #22856 added for standup and pr-watch now covers flow too.
|
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at e160169.
The flow page now binds work.forgotten and adds its accepted, rejected and abandoned counts to the tiles the way goal-board does (template.html L275-L281), and a missing or malformed value reads as zero. The manifest version bump makes adopted copies read stale, and the new tests run the page's script under node.
Our r100 points are resolved: the builtin audit is tracked in #21035, which #22856 closed after fixing standup and pr-watch, and the description now says the node tests fail rather than skip. All current-head AI lanes pass and every check on this head is green.
Minor, not blocking: the test_dashboard_template_flow.py bullet in What changed runs into the fixture bullet mid-sentence ("a dash rather - test/fixtures/..."), so that paragraph is garbled.
I read the diff and CI results; I did not run the tests locally.
— crew-pr-reviewer (r122)
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed current head e16016960a0d1a80e4ffbc2ef45d41c271534174 as Tier 2. Deep review found no blocking issue.
Security check: the matched manifest only adds a read-only count binding. It adds no permission, secret, network, or cross-session access. Auto-merge remains subject to branch protection.
Problem / Motivation
Goal: The
flowdashboard page shows true accepted, still-open and rejected counts on a long goal.The builtin
flowpage draws its three tiles from the work fold'sitemsalone (src/kiro_crew/dashboard_templates/builtin/flow/template.html, thekpi_acceptedtile:doneoverlist.length). The fold keeps the open items and the newest closed ones; every older closed item leavesitemsand is counted inwork.forgotten. So on a long goal the accepted tile reads a smaller "of N" than the board holds, and the other two tiles drop the forgotten rejected and abandoned items.goal-boardandkirocrew-conductoralready bindforgottenand add it; this page does not.Why it matters
A crewmate opens
flowto see how far a goal has got. Once more closed items exist than the fold keeps, the accepted tile stops growing with the work and the three tiles no longer add up to the board.Not a goal
goal-board,kirocrew-conductoror any other builtin page. Eight other builtins bindwork.itemswithoutwork.forgotten(office,org-chart,pr-watch,project-report,roadmap,standup,swimlane,timeline); their audit was tracked in #21035, which fix(dashboard): standup and pr-watch count the items the work fold forgot #22856 closed by fixingstandupandpr-watch.created_atandclosed_at, and a forgotten item no longer carries them.What changed (motivation → approach → change)
Symptom: the accepted tile reads
2 of 3for a board of 3 listed items plus 4 forgotten ones (3 of them accepted); it should read5 of 7. Cause: the page never boundwork.forgotten. Change:flow/manifest.jsonbinds{"fold": "work", "path": "forgotten"}exactly asgoal-board/manifest.jsondoes. The loader requires a page to bind exactly its manifest's fields, soflow/template.htmlalso gains the hiddendata-dashboard-field="forgotten"cell.flow/template.htmlgains aforgotten()reader that mirrorsgoal-board's: a missing,null, string, array, negative or non-numeric value reads as zero.goal-board'sdrawLoopdoes: accepted = listed accepted +forgotten.accepted, total = listed +forgotten.items, and "rejected or left" = listed +forgotten.rejected+forgotten.abandoned. The "still open" tile is unchanged in value, because a forgotten item is always closed. All three tiles now test the same total for "no board yet", so an empty board still draws a dash.test/test_dashboard_templates_builtin.pygainsTestFlowCountsTheItemsTheFoldForgot: one case pins the binding againstgoal-board's, and the rest RUN the page's script undernodeover a field bag and read the tiles (helpers_flow_tiles,_flow_item, a minimal DOM in_FLOW_DOM;_flow_tilescallspytest.failwhennodeis absent, so it fails rather than skips). CI runs this file in thebackend-testjob's eight Linux shards and thebackend-test-windowsjob's eight Windows shards; the Linux runners providenode, andsetup-windows-testsverifies Node and installs Node 24 on self-hosted Windows runners.test/test_dashboard_template_flow.pyupdates its pin of the empty-board guard (list.length ? done : nullbecomestotal ? done : null). The behaviour it protects, a dash rather -test/fixtures/dashboard_templates/sample_work-kanban.json: no change needed any more. fix(dashboard): standup and pr-watch count the items the work fold forgot #22856 already added theforgottenkey the real fold carries, so the rebase on main dropped this PR's copy of it.capture; the capture already carries the key.Rejected alternative: pin the new arithmetic as source text only, the way
test_dashboard_template_goal-board.pypins its own. A source pattern is satisfied by a page that never adds the count, so the script is run instead.Backwards compatibility
Compatible: the new field is read-only and optional. A gateway whose fold has no
forgottengives zeros, and the tiles read exactly as before; the manifestversiongoes from 1 to 2, so a flow page adopted before this fix readsstaleand the operator can re-adopt it (an adopted copy reads fields through the manifest it froze at adopt). #22856 did the same forstandupandpr-watch;test/test_dashboard_templates_forgotten_footer.py::TestAnAdoptedCopyOfTheOldFooterTurnsStalenow coversflowtoo, red at version 1 and green at 2.Removes nothing: the change adds one bound field and adds counts to three tiles.
Tests
Red on
origin/mainsource (3 of 3 runs,-n0), the new class:The other five cases of the class (missing or odd
forgottenreads as zeros) pass on both sides: they pin that a board without the field renders as before.Green on the fix: the new class passed on 3 consecutive runs, and
test/test_dashboard_templates_builtin.pypassed on 3 consecutive runs at-n0. Every test file that loads a builtin template or reads the sample fixture also passes in one-n0run, as do the wait-discipline, flake-pattern, pid-reader and tmpdir ratchets.Mutants, each failing only its own case: dropping
done += gone.acceptedfails the accepted-tile case; dropping the manifest binding while the page still binds the cell makesload_templaterefuse the page.The new cases patch no module global and write no file.
In short: the page's script is run over a board with forgotten items and the tiles read the whole board; red before, green after.
Manual verification
Not rendered in a browser. The three tiles' text and bar width are asserted by running the page's own script under
nodeover a field bag.Screenshots / video
Why no screenshot: layout, labels and styling are unchanged. Only the numbers in three tiles change, and only on a board whose work fold has forgotten closed items; the test asserts those values by executing the page's script.
Related Issues
Fixes #20023
Follow-up to #19068 and #19902.
Pattern harvest
Rule candidate: review-prompt
Pattern: a builtin page that draws a whole-board count from
work.itemswithout addingwork.forgotten.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)