Repository navigation
fix(app-shell): a hidden tab polls the bell and approvals feeds every three minutes - #28133
Conversation
… three minutes The foreground cadence of both shared feeds moved to 60 s, which left the hidden cadence (also 60 s) no slower than a visible tab for the first ten hidden minutes. HIDDEN_POLL_MS goes to 180 s; the ten-minute full stop and the one read per feed on return are unchanged. The inbox arrival notifier header and the pending bell-cadence changeset now state the real behaviour. Claude-Session: https://claude.ai/code/session_01Utp6CXAofd4m4ymS3HqKt5 Co-authored-by: Claude <noreply@anthropic.com>
|
domain:ui#4 · os-bill · session_01Utp6CXAofd4m4ymS3HqKt5 Preview review (proxy for epic:#26676#1) · e802b06 · PASS Run under ruling 6520722066 on #26676, on this PR's head (not 1. Hidden: 180 s cadence, at most 4 reads per feed in the first 10 minutes, none after: PASS.
2. Becoming visible: one read per feed: PASS.
3. Control, visible: about 60 s: PASS.
Method. Headless Chromium does not change Evidence. requests log (every Notes, not REWORK. No approvals badge is drawn (none pending for the seeded admin); the approvals request was seen on every tick. No Review taken 2026-10-30T14:08Z. |
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh Contract-review-claim: session_01Utp6CbDAucNyQ4UtzCJKyh · head e802b06 · 2026-10-30T14:13Z In-seat review: the diff touches no contract face ( Generated by Claude Code |
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh Contract reviewServed-tier: Face: none of the four contract faces. The PR body and the new changeset say ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNot owed: the PR touches no schema, governed rule text or narrowing face. The design choice was the maintainer's (ruling B), and the diff carries out exactly items 1 to 5. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
Requested by Bill · project thread
维护者速读
sharedUserFeeds.ts的HIDDEN_POLL_MS及其注释;sharedUserFeeds.hiddenStop-12439.test.tsx新增的 "reads at most 4 times" 用例;.changeset/27626-record-open-requests.md那一句的改正。pnpm --dir ui exec vitest run packages/app-shell/src/hooks/__tests__/sharedUserFeeds.hiddenStop-12439.test.tsx,预期 5 条全部通过。Fixes #28084
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6522899149 (maintainer, letter B)
What changes
All in
ui/packages/app-shell/src/hooks/(app-shell is private; it ships inside@object-ui/console), plus changesets:HIDDEN_POLL_MS60_000 to 180_000 insharedUserFeeds.ts. A hidden tab now polls the inbox and approvals feeds every 3 minutes against the 1-minute foreground. Its docblock is rewritten: slower-when-hidden is the rule since Three datasource-admin routes answer 503 naming the wrong service (carried out of #3973 so it is not buried) #4225; the scheduler reads visibility when it arms, so the foreground tick already armed at the moment of hiding still fires once; the objectui#12439 full stop afterHIDDEN_POLL_STOP_MS(10 minutes) is unchanged. The module header's "A forgotten tab goes quiet" section names the new cadence.useInboxArrivalNotifier.tsheader: a desktop notification can be "up to about three minutes late" (was "about a minute")..changeset/27626-record-open-requests.md(unreleased): "still stop in a hidden tab" is corrected in place to "every three minutes while the tab is hidden (and not at all once it has been hidden for ten minutes)"..changeset/28084-hidden-tab-bell-cadence.md(@object-ui/app-shell: patch).No i18n key, no export from a published package, no metadata change.
Tests
sharedUserFeeds.hiddenStop-12439.test.tsx, fake timers plusvisibilitychange: both feeds mounted in a visible tab, the tab hidden 30 s in. Each feed reads once at the already-armed foreground tick, then nothing until each full 180 s has passed, then one read: 4 reads per feed in the 10 hidden minutes (10 at the old cadence), nothing after the 10th minute, no timer left armed, and exactly one read per feed on return.HIDDEN_POLL_MSas 180_000 (sharedUserFeeds.hiddenStop-12439,sharedInboxFeed.cadence-7249); their arithmetic already derives from the constant.Readings (head e802b06)
pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build: lock VERDICT command-exit 0.sharedUserFeeds.hiddenStop-12439,hiddenTabPollStop-12439,sharedInboxFeed.cadence-7249): Test Files 3 passed (3), Tests 15 passed (15), VERDICT command-exit 0.scripts/ablation-replace.mjs, anchorconst HIDDEN_POLL_MS = 180_000;replaced by60_000(anchor 1 to 0, blob 3ebb502c to 74dfdfe3): Tests 3 failed, 7 passed of the two feed files, VERDICT command-exit 1. Red: the new case ('expected { approvals: 3, inbox: 3 } to deeply equal { approvals: 1, inbox: 1 }'), the cut-off case ('expected { approvals: 10, inbox: 10 } to deeply equal { approvals: 4, inbox: 4 }') and the 7249 hidden throttle ('expected 4 to be 2'). Restored: blob == HEAD 3ebb502c,git diff HEADempty. Tests importsrc, so no dist rebuild.pnpm --dir ui exec vitest run packages/app-shell/src/hooks/: Test Files 84 passed (84), Tests 715 passed (715).pnpm --filter @object-ui/app-shell run type-check(tsc --noEmit and tsconfig.test.json): exit 0.node scripts/pm/dispatch-gates.mjs --commandsderived 34 families; all 34 run and recorded, 33 exit 0 (includingcheck-sdui-manifest,vitest run scripts/,check:type-check-coverage,check:type-check-debt,check:nul-bytes);--ranreconciliation: 34 derived, 34 run, 0 NOT-MEASURED. One red, by design:check-empty-changeset --base origin/mainexit 1 on.changeset/27626-record-open-requests.md(see the note below).pnpm --dir ui run check:new-line-citations: 0 new citations.Pending release note corrected in place (confirmation for
check-empty-changeset)check-empty-changesetstays red on this PR, and that is the intended outcome. This PR rewrites one sentence of.changeset/27626-record-open-requests.md, a pending note that another PR (#27907) added. The sentence said the feeds "still stop in a hidden tab". Onmainthey stop only after 10 continuous hidden minutes, and after this PR they poll every three minutes before that. This is the gate's DELIBERATE CORRECTION class, not a filename collision. Restoring the base text would publish a false sentence. The correction was ordered by the maintainer's ruling 6522899149 on #28084 (execution parameter 3). Only that one clause changed. The note's other bullets and its front matter are unchanged.Acceptance notes
setUserFeedPushChannelOpen) is untouched: while a host reports an open channel neither feed polls, hidden or not. No host opens one today.Generated by Claude Code