Skip to content

fix(dashboard): standup and pr-watch count the items the work fold forgot - #22856

Merged
bolichen97 merged 2 commits into
mainfrom
fix/templates-forgotten-21035
Oct 22, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
fix/templates-forgotten-21035

Conversation

@buluoray

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The standup and pr-watch dashboard pages say how many items are on the board, and the number is the whole board.

Both pages end with "N item(s) on the board". N was the length of the work fold's items list. That list is bounded: the fold keeps the open items and the newest closed ones, and every older closed item leaves items and is counted in work.forgotten. On a long goal the footer stops growing with the work. Example: 3 listed items plus 4 forgotten ones read "3 on the board" instead of "7".

#21035 asked for an audit of eight built-in pages that bind items without forgotten. Only these two claim a whole-board count that the bounded list cannot give.

Why it matters

A crewmate opens either page to see how big the work is. Once more closed items exist than the fold keeps, the footer quietly undercounts, and nothing on the page says so.

Not a goal

  • No change to the work fold or to how it forgets items.
  • No change to the standup columns (Finished, Claimed done, Still moving, Stuck). The page answers "what changed since you last looked", and a forgotten item closed before the newest closed items the fold still keeps. A test pins that the columns do not move.
  • No change to roadmap or swimlane: their footers count what is drawn ("item(s) drawn", "item(s) in all lanes"), and the lanes only hold listed items.
  • No change to office, org-chart, project-report or timeline: they read the workstreams fold, which never forgets a task. Each board row carries whole-board total / accepted / open, and boards past the cap are counted in omitted, which all four already show.
  • No change to the flow page, which open PR fix(dashboard): the flow page counts the items the work fold forgot #20088 handles.

What changed (motivation → approach → change)

Symptom: "N on the board" undercounts on a long goal. Cause: neither page binds work.forgotten. Change:

  • standup/manifest.json and pr-watch/manifest.json bind {"fold": "work", "path": "forgotten"}, the same binding goal-board uses. The loader requires a page to bind exactly its manifest's fields, so each template gains a hidden data-dashboard-field="forgotten" cell.
  • Each template gains a forgottenItems() reader. A missing, null, string, array, negative or non-numeric value reads as zero, matching goal-board's reader.
  • The footer's items cell is now items.length + forgottenItems(), the same sum goal-board writes into its own items cell.
  • test/fixtures/dashboard_templates/sample_work-kanban.json gains the forgotten key the real fold carries (byte-identical to the hunk in fix(dashboard): the flow page counts the items the work fold forgot #20088, so the two merge cleanly). The pod capture already has it.

The reader shape and the run-the-script-under-node test approach follow #20088 by @javenciu, credited with a Co-authored-by trailer.

Backwards compatibility

Compatible: the new field is read-only and optional. A fold with no forgotten gives zero, and the footer reads exactly as before. Manifest versions are unchanged, as they were for goal-board and kirocrew-conductor.

Removes nothing: the change adds one bound field per page and adds a count to one cell.

Tests

New test/test_dashboard_templates_forgotten_footer.py. It RUNS each page's own script under node over a field bag and reads the footer cell back:

  • TestTheFooterCountsTheWholeBoard::test_it_binds_forgotten_the_way_goal_board_binds_it[standup|pr-watch]
  • TestTheFooterCountsTheWholeBoard::test_the_footer_adds_the_forgotten_items[standup|pr-watch]: 3 listed + 4 forgotten reads 7.
  • TestTheFooterCountsTheWholeBoard::test_a_missing_or_odd_forgotten_reads_as_zero[...]: six odd values, each reads 3.
  • TestTheStandupColumnsStayOnTheListedItems::test_the_columns_do_not_change_with_forgotten: columns stay 1 / 0 / 2 / 0.

Red on origin/main source (3 of 3 runs, -n0): 4 failed, 13 passed (the binding and footer cases, per page). Mutants: dropping only + forgottenItems() from either page fails only that page's footer case. Green on the fix: 17 passed on 3 consecutive runs. All test/test_dashboard_template_*.py and test/test_dashboard_templates*.py files: 884 passed at -n0.

Manual verification

Not rendered in a browser. The footer value is asserted by running each page's script under node.

Screenshots / video

Why no screenshot: layout, labels and styling are unchanged, and only the number in one footer cell changes on a board whose work fold has forgotten closed items.

Related Issues

Closes #21035

Related: #20088 (the same fix for the flow page).

Pattern harvest

Rule candidate: review-prompt
Pattern: a builtin page that labels a count as the whole board ("on the board") but computes it from the work fold's bounded items without adding work.forgotten.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

Decision for the owner

The decision is which of the eight pages in #21035 should count the work fold's forgotten items. This draft changes only the two pages whose footer says "on the board" (standup, pr-watch) and leaves the standup columns on the listed items, because the other six either label the count as what is drawn or read the workstreams fold, which never forgets.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

The version bump contradicts the description, and the new spec paragraph repeats the one above it. Neither blocks.

Notes

  • Item 4 — undeclared: the description says "Manifest versions are unchanged, as they were for goal-board and kirocrew-conductor", but the diff raises "version": 1 → 2 (standup) and 2 → 3 (pr-watch). Every copy adopted before this change will now show stale. The bump uses the existing _state_of stale mechanism, so it is a real cause and not new surface. Only the description's sentence is wrong.
  • Item 5 — duplicate of docs/system-specs/modules/dashboard-instances.md (the paragraph just above the one added): that paragraph already says "a template shipping a new version makes every copy of it stale". Subtraction: delete the added "The corollary binds whoever edits a shipped page…" paragraph.

What this change ships

Inventory (6 items) — 4 justified

Intent: make the standup and pr-watch footers count every item on the board, including the ones the work fold forgot. FIX.

  1. The standup footer's "on the board" count adds the forgotten closed items — justified
  2. The pr-watch footer's "on the board" count adds the forgotten closed items — justified
  3. Both pages bind work.forgotten through a hidden field cell — justified
  4. Adopted standup and pr-watch copies now read stale (manifest versions raised) — undeclared
  5. The dashboard-instances spec gains a "raise the version" paragraph — undeclared
  6. The kanban fixture gains the real fold's forgotten key — justified

[FIRST-PRINCIPLES-REVIEWED] f4cbdaf

Description read

[DESCRIPTION-READ] 65c8026eb5645f13e810e0471a53df47941a722193c1d4737601d218272de48f

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the footer now uses the same items + forgotten.items sum that goal-board already uses, and adopted copies are told to update through the existing stale mechanism.

Notes

  • The description no longer matches the diff. ## Backwards compatibility says "Manifest versions are unchanged", but the diff raises standup 1→2 and pr-watch 2→3. Every crewmate's adopted copy of these pages will now show stale, which users will see. Fix that line, or add a short PR comment, so whoever merges knows about the stale flip.
  • The new corollary in dashboard-instances.md says to raise a page's version for any fix its copies should pick up. That rule also covers the goal-board/kirocrew-conductor edits cited as the "unchanged" precedent. Copies adopted before those edits may still show live with old behaviour. That belongs in a follow-up, not this PR.

[DESIGN-REVIEWED] f4cbdaf

Description read

[DESCRIPTION-READ] 7a8082d65ce2aa601add387f24ec39dbee2a90cc98bca4d2ffc68a621d18da60

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] f4cbdaf

Verdict parsed from the review's SHA-scoped output markers for commit f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598.

False positive or not applicable? A repository writer can comment:
/ai-review override fable f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f4cbdaf

False positive or not applicable? A repository writer can comment:
/ai-review override gpt f4cbdaf99f9a60b72e67ce6cc5f1953cb4598598: <one-sentence reason>

@buluoray
buluoray force-pushed the fix/templates-forgotten-21035 branch from 12c1d04 to 00dfa46 Compare October 21, 2026 18:44
@buluoray
buluoray marked this pull request as ready for review October 21, 2026 19:36
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 21, 2026 19:36
@buluoray
buluoray requested a review from iamwhatever October 21, 2026 19:36
@buluoray
buluoray enabled auto-merge (squash) October 21, 2026 19:36
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 21, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOLD

The counting change is correct, but neither built-in template manifest raises its version. Adopted Dashboard instances keep a copied template and become stale only when the manifest version increases. Existing adopted standup and pr-watch pages will therefore keep the old undercount while still showing LIVE.

Please bump both template versions, or make the compatibility contract explicit and provide an automatic upgrade path. A bug fix should not silently reach only new adoptions and default instances.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 21, 2026
buluoray and others added 2 commits October 22, 2026 12:00
…rgot

Both pages end with "N item(s) on the board", but N was the length of the
work fold's bounded `items` list. The fold keeps the open items and the
newest closed ones and counts every older closed item in `forgotten`, so on
a long goal the footer stopped growing with the board.

Both pages now bind `work.forgotten` exactly as goal-board does and add
`forgotten.items` to the footer cell. A missing or malformed value reads as
zero. The standup columns are left on the listed items on purpose: the page
answers "what changed since you last looked", and a forgotten item closed
before the newest closed items the fold keeps.

Audit of the other six pages named in #21035: roadmap and swimlane label the
count as what is drawn; office, org-chart, project-report and timeline read
the workstreams fold, which never forgets a task and reports whole-board
totals per board, so none of them needs a change.

Closes #21035

Co-authored-by: Javen Cinocca <129346815+javenciu@users.noreply.github.com>
…pies turn stale

An adopted copy turns stale only when the registry version is higher than the
one it froze at adopt (instance._state_of). Without a bump the forgotten-items
footer fix reached new adoptions only. standup 1->2, pr-watch 2->3; a test
adopts each page, sets the copy back to the pre-fix version and asserts stale;
the spec states the bump rule.
@buluoray
buluoray force-pushed the fix/templates-forgotten-21035 branch from 00dfa46 to f4cbdaf Compare October 22, 2026 12:01
@buluoray

buluoray commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: disposition of @bolichen97's HOLD on 00dfa46.

Accepted, fixed in f4cbdaf. The claim holds in source: instance._state_of returns stale only when catalog.load_one(id).version > copied_version, so with both manifests unchanged an adopted standup or pr-watch copy kept the old footer and read live.

  • standup/manifest.json version 1 -> 2, pr-watch/manifest.json version 2 -> 3. This follows the precedent in fix(dashboard): declare and enforce nested shapes for agentic fields #17998, which raised pr-watch 1 -> 2 for a page fix.
  • New test TestAnAdoptedCopyOfTheOldFooterTurnsStale::test_a_pre_fix_copy_reads_stale[standup|pr-watch] in test/test_dashboard_templates_forgotten_footer.py: adopts each shipped page through the real store, sets the stored copy back to its pre-fix template version, and asserts read() is stale. Reverting only the two version bumps turns both cases red (checked locally); with the bump, that file plus test_dashboard_templates_builtin.py pass (94).
  • docs/system-specs/modules/dashboard-instances.md now states the rule: a change a copy should pick up raises the manifest version, because an unbumped fix reaches new adoptions only.

The branch was also rebased onto current main (still 2 commits). Re-requesting your review.

@buluoray
buluoray requested a review from bolichen97 October 22, 2026 12:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 22, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to ship. My earlier hold is resolved on this head.

Head reviewed: f4cbdaf.

What changed my mind: both manifests now raise their version (standup 1 to 2, pr-watch 2 to 3). An adopted copy turns stale only when the registry version is higher than its copied version, so existing standup and pr-watch pages will now offer the fix instead of reading live with the old count.

What I verified:

  • The footer sum is items.length + forgottenItems(), the same sum goal-board uses. The reader rejects missing, null, string, array, negative and numeric string values.
  • The new forgotten binding matches goal-board in type, fold and path, and each page has the hidden cell the loader needs.
  • I ran test/test_dashboard_templates_forgotten_footer.py and test/test_dashboard_templates_builtin.py at this head: 94 passed.
  • Mutation check: I removed + forgottenItems() from pr-watch and set standup back to version 1. The pr-watch footer case and the standup stale case both failed, so the tests guard both changes.
  • The fixture hunk is byte-identical to the one in #20088, so the two PRs merge in either order.
  • Main does not already contain this change, and this branch is based on the current main tip.

One should-fix, in the PR body only:
🟡 The Backwards compatibility section still says "Manifest versions are unchanged". The second commit raises both versions, and every existing adopted copy of these two pages will now show stale. Please update that sentence to say so, and add TestAnAdoptedCopyOfTheOldFooterTurnsStale to the Tests list.

Remaining before merge: CI is still running on this head, and a maintainer approves because the change edits template manifest files.

@buluoray

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: @bolichen97 thanks for re-checking. Your comment on f4cbdaf99f says the hold is resolved, but the earlier CHANGES_REQUESTED on 00dfa46811 still blocks merge. Only you can clear it: could you submit an Approve (or dismiss your own earlier review) when you have a moment? We will not dismiss it for you.

@bolichen97
bolichen97 dismissed their stale review October 22, 2026 13:29

Our earlier findings are addressed at the current head; see the latest review.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 22, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving head f4cbdaf.

Gates checked on this head:

  • readiness label is passed and the PR Readiness status is green.
  • No required check is red or pending.
  • All AI review lanes and the Sensitive Change Review report success with no blocking finding.
  • My earlier change request was addressed and dismissed; no other change request is open.
  • The linked issue is tier T1, the PR has 7 files, base is main, no merge conflict.

Thanks for the fix.

@bolichen97
bolichen97 merged commit de0c774 into main Oct 22, 2026
108 checks passed
@bolichen97
bolichen97 deleted the fix/templates-forgotten-21035 branch October 22, 2026 15:08
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 22, 2026
iamwhatever pushed a commit that referenced this pull request Oct 22, 2026
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.
javenciu added a commit that referenced this pull request Oct 23, 2026
…20088)

* fix(dashboard): the flow page counts the items the work fold forgot

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.

* fix(dashboard): raise the flow version so adopted copies turn stale

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.

---------

Co-authored-by: EC2 Default User <ec2-user@ip-172-31-10-71.ec2.internal>
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.

Audit built-in dashboard templates for forgotten work items

2 participants