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 }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Home reads sys_inbox_message twice — the bell's poll and useHomeInbox each issue their own query #4225
So a Home page load issues both, and the bell's copy repeats every 10 seconds.
Why it exists
Pre-existing, and a side effect of the fix sequence rather than of any one change. #4199 un-gated the bell's inbox poll so the Notifications tab would fill in off-app — correctly — but did not merge it with Home's existing read. #4197 then shared the other two feeds (approvals and sys_activity) through hooks/sharedUserFeeds.ts; the inbox read was deliberately left out because the two consumers ask genuinely different questions there, unlike the other two feeds where the queries were byte-identical.
Observation-class, not a defect
Both consumers show correct data today. Nothing is stale, nothing disagrees — the badge's unread arithmetic lives entirely on the bell's side, and Home's card only lists titles. The cost is one extra round trip per Home load plus a 10s poll that partly overlaps it. Filing it so the duplication is recorded rather than rediscovered, not because a user is currently hitting a bug.
Why it is not a trivial merge
Home's rows are a strict prefix of the bell's superset (same object, same filter, same ordering, smaller $top), so one read could serve both. But:
the bell additionally reads sys_notification_receipt and joins it for is_read; Home needs none of that;
the bell maps to a row shape carrying notification_id / receipt_id for mark-read, Home to {id, title, actionUrl, createdAt} with a title-dedupe pass;
$top differs (20 vs limit), so a shared store would have to hold the superset and let Home slice — which is exactly the shape sharedUserFeeds already uses for activity, where Home filters the bell's rows at its own call site.
That last point is the suggested route: extend sharedUserFeeds with an inbox feed holding the bell's 20 merged rows, have Home derive its five from them. The merge is mechanical but it touches mark-read, so it deserves its own change and its own tests rather than riding along.
Pointers
packages/app-shell/src/layout/AppHeader.tsx — the polled read (the effect documented "Poll the signed-in user's in-app inbox (ADR-0030 L5)")
packages/app-shell/src/hooks/useHomeInbox.ts — the one-shot read
Anchors verified live: two independent sys_inbox_message readers — packages/app-shell/src/hooks/useHomeInbox.ts:100 (dataSource.find) and packages/app-shell/src/layout/AppHeader.tsx:364 (the bell's poll, with its scoping docblock at :320/:345). Held: duplicate-read efficiency observation, no wrong answer produced; consolidating onto one shared subscription is the fix shape and belongs with whoever next touches the inbox surface (the bell/inbox family already has queued kin — ui#4074's hardcoded entries and the #4110/#4197 gate work in flight — so dedup at promotion time matters).
Both duplicate reads verified on main: the bell's polled sys_inbox_message read in AppHeader.tsx (documented at :209/:286), the one-shot in useHomeInbox.ts:64, and sharedUserFeeds.ts still carries no inbox feed (its only "inbox" mention is the approvals-inbox docblock line at :21; last commit on the hooks is #4223 itself). Cost profile unchanged — one extra round trip per Home load plus overlap with a 10s poll, correctness unaffected on both consumers.
One new adjacency since filing worth the eventual implementer's attention: ui#4230 (bell panel dead again on console 09987b68) and ui#4235 (HOME header renders a second inbox polling sys_inbox_message instead of /api/v1/notifications) are both live on this same surface — any sharedUserFeeds inbox-feed merge should land after those settle which source the bell reads, or it risks unifying onto the wrong query. Restart condition: promote when the bell's source question (ui#4230/ui#4235) is resolved; the merge route the card sketches is then mechanical-with-tests.
Activity
os-zhuang commentedon Aug 11, 2026
Findings triage (first grade; premise check @
origin/main6314e87): HOLD —findingstands.Anchors verified live: two independent
sys_inbox_messagereaders —packages/app-shell/src/hooks/useHomeInbox.ts:100(dataSource.find) andpackages/app-shell/src/layout/AppHeader.tsx:364(the bell's poll, with its scoping docblock at:320/:345). Held: duplicate-read efficiency observation, no wrong answer produced; consolidating onto one shared subscription is the fix shape and belongs with whoever next touches the inbox surface (the bell/inbox family already has queued kin — ui#4074's hardcoded entries and the #4110/#4197 gate work in flight — so dedup at promotion time matters).本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
os-zhuang commentedon Aug 11, 2026
Findings cadence re-check @
origin/main6d01319: HOLD —findingstands, premise live.Both duplicate reads verified on main: the bell's polled
sys_inbox_messageread inAppHeader.tsx(documented at:209/:286), the one-shot inuseHomeInbox.ts:64, andsharedUserFeeds.tsstill carries no inbox feed (its only "inbox" mention is the approvals-inbox docblock line at:21; last commit on the hooks is #4223 itself). Cost profile unchanged — one extra round trip per Home load plus overlap with a 10s poll, correctness unaffected on both consumers.One new adjacency since filing worth the eventual implementer's attention: ui#4230 (bell panel dead again on console
09987b68) and ui#4235 (HOME header renders a second inbox pollingsys_inbox_messageinstead of/api/v1/notifications) are both live on this same surface — anysharedUserFeedsinbox-feed merge should land after those settle which source the bell reads, or it risks unifying onto the wrong query. Restart condition: promote when the bell's source question (ui#4230/ui#4235) is resolved; the merge route the card sketches is then mechanical-with-tests.本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
yinlianghui commentedon Aug 11, 2026
PROMOTE + CLAIM — session
session_017Qqyix2QcnpUC9XeYVDzx3(objectui whole-repo PM seat)。Branch:claude/issue-4225-shared-inbox-feed。升级依据,两条都按本卡分诊自己写下的机械条件触发:
/api/v1/notificationsreturns 10 rows (#4110 / #4156 back on console 09987b68) #4230 已裁定(表读为 ADR-0030 sanctioned;旧 pin 缺陷是 isApp 门,fix(app-shell): the bell polls the inbox on every console surface, not only inside an app (#4110) #4199 已修)、The console HOME header renders a second, different inbox polling the wrong source —sys_inbox_messageinstead of/api/v1/notifications, no badge, "You're all caught up" with 9 unread #4235 已交付 branch (a)(保源修条件,PR fix(app-shell): Home's action centre needs an ANSWER before it says "all caught up" (#4235) #4315;成员读权限由 objectstack#7586 当日授予)。统一查询的形状已知:sys_inbox_message+sys_notification_receipt连接,'mine' 视图语义。useHomeInboxnever joinssys_notification_receipt#4316 证伪:"两个消费者都正确"不再成立——useHomeInbox不连 receipts,已读消息仍算"需要你关注"(假阳性,铃铛的镜像)。本卡从效率观察升格为承载 Home's action centre counts ALREADY-READ messages as needing attention —useHomeInboxnever joinssys_notification_receipt#4316 修复的执行卡。派发范围:
sharedUserFeeds.ts扩展 receipts-joined inbox feed;bell 的 poll 与useHomeInbox都从共享 feed 派生(消灭双读 + 10s poll 重叠);Fixes #4316(read-state 到达 home);rider:isMissingResource×3 副本合并回单点。守护:PR #4284 的铃铛 Unread/All 绊线套件与 #4315 的 unansweredInbox 套件必须原样绿——两侧消费者的行为契约已被钉死,这正是"合并不许重破任一消费者"警告的执法形态。Generated by Claude Code
yinlianghui commentedon Aug 11, 2026
ACCEPT + 代决(裁 A) — PM review of record (session
session_017Qqyix2QcnpUC9XeYVDzx3)。PR #4327 验收要点:
useHomeInboxnever joinssys_notification_receipt#4316(已读不再计入"需要关注"),isMissingResource ×3 收敛为唯一导出。SharedFeedStatus(fix(console): an unloadable app list is UNKNOWN, not "no default app"; wire the Applications page's writes (#4233) #4300/The console HOME header renders a second, different inbox polling the wrong source —sys_inbox_messageinstead of/api/v1/notifications, no badge, "You're all caught up" with 9 unread #4235 的四词原样),语义细节讲究(markUnavailable=ready 因为"没有该对象"是答案;loading 只从 idle 宣告,10s tick 不闪)。$top5→20 与 9→5 中,"9 行"断言从来不真——fake adapter 无视$top,生产永远显示 5,该断言量的是夹具伪影;B 案自相矛盾已被实测(未合并形状恢复则 10 个新 pin 红)。该套件的真正主题(The console HOME header renders a second, different inbox polling the wrong source —sys_inbox_messageinstead of/api/v1/notifications, no badge, "You're all caught up" with 9 unread #4235 的七个状态/错误契约)零改动全绿,test(app-shell): pin the bell panel's Unread/All render oracle — #4230's console predates #4199 (#4230) #4284 字节未动 30/30。修正测试自身的假话不算破坏守卫。Flipping ready + auto-merge;#4327 落地后本卡关闭(PR 为 Part of)。
Generated by Claude Code
yinlianghui commentedon Aug 11, 2026
CLOSED — 共享 inbox feed 已落地 (session
session_017Qqyix2QcnpUC9XeYVDzx3)。PR #4327 合入 main(
bed18a5c2):sharedUserFeeds增加 receipts 连接的 inbox feed,bell 与 Home 双消费者同源派生(bell 的 129 行私有轮询 effect 删除),同时修复 #4316(已读消息不再计入"需要关注")。本卡当年的 observation 定级("两个消费者都正确")已被 #4316 证伪,按分诊自记的重启条件(铃铛源问题解决即升级)升级执行。随行:store 补齐 bell 独有的三个韧性属性(隐藏页节流/可见即刷/失败退避)与四词状态方言,全 feed 受益;isMissingResource三副本收敛。余波:#4329(Home 徽标计截断列表 vs bell 计全量——现在是 two-line fix)留 finding 池待分诊。
Generated by Claude Code
fix(app-shell): one inbox feed for the bell and Home — already-read m…
fix(app-shell): give missing-resource retirement a bounded recovery (o…
feat(app-shell): render `global:search` and `global:notifications` in…
feat(app-shell): render `global:search` and `global:notifications` in…
perf(app-shell): scope the inbox receipt read to the listed messages …
perf(app-shell): scope the inbox receipt read to the listed messages …