Repository navigation
feat(team-inbox): surface channel mention notifications - #2151
Merged
Merged
Conversation
Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
Pre-commit hook ran. Total eslint: 0, total circular: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Independent channel messages store explicit mentions but never reach Team Inbox: the desktop only understands session-comment targets, receipts and navigation. A private-channel membership change also needs to invalidate any retained notification snapshot before a new read succeeds. Native acceptance additionally found that automatic reads overwrote manual unread operations and successful background list reloads hid failed-write notices.
Solution
Consume the capability-gated unified Inbox RPCs from org2AI/ORGII-cloud-infra#151. Represent channel messages as explicit typed targets with source-qualified IDs, retain the shared mention row/detail/native notification tracker and badge, and route the existing Open action into the correct cloud channel. Route per-item and mark-all receipts to the unified backend counts. Older endpoints keep the existing session-only APIs.
Observe the existing channel message and ACL invalidations through scalar subscriptions. ACL revisions replace the coordinator scope, cancel stale requests and clear cached rows before revalidation. Retain the existing bounded, single-flight coordinator and refresh floor; no new polling or Agent execution path is introduced. ORG2 #2150, now merged into develop, supplies the channel member picker and recipient transport.
Native acceptance fixes keep automatic reads tied to opening a selection, preserve explicit unread through snapshot refreshes, and separate scoped action failures from page hydration. Channel details use a channel-specific subtitle. No historical data cleanup is needed.
Potential risks
Requires backend migration 0037 for channel notifications to appear; no production schema or deployment is changed here. Restart clients after backend rollout to refresh endpoint capabilities. Old endpoints remain supported, and reverting this desktop commit restores the previous consumer without deleting receipts.
The Open action opens the corresponding channel; scrolling a long transcript to the exact historical message is not added. The exact mentioned body appears in the Inbox detail. Real Realtime and covered lifecycle acceptance now passed on two isolated native instances. Full performance remains blocked by measured retained WebKit allocation (about 394–420 MiB allocated in WebKit Malloc) and activity peaks; JS/DOM ownership profiling and long-duration/large replay workloads remain open. OS notification-center delivery, physical two-machine topology and hosted auth refresh are not claimed. Original 164-item consistency and large-history WebKit issues are outside this PR.
Verification
Integrated develop
84760ccec1after fix(team-chat): preserve explicit human mention semantics #2150 merged, without conflicts.pnpm test src/modules/MainApp/TeamInbox src/features/Org2Cloud/teamInboxMentionsClient.test.ts src/features/Org2Cloud/org2CloudCapabilities.test.ts src/features/Org2Cloud/org2CloudRealtimeClient.test.ts src/features/Org2Cloud/org2CloudRealtimeRecovery.test.ts src/features/Org2Cloud/org2CloudRealtimeSignalCoalescer.test.ts src/features/Org2Cloud/useOrg2CloudRealtime.test.ts src/features/DiscussionChannels/ChannelPanelView src/features/Org2Cloud/SessionConversation src/features/Org2Cloud/channels: 72 files / 603 tests passed.pnpm typecheck:fastandgit diff --checkpassed on the integrated tree.pnpm test src/modules/MainApp/TeamInbox src/features/Org2Cloud/teamInboxMentionsClient.test.ts src/features/Org2Cloud/org2CloudCapabilities.test.ts: 30 files, 231 tests passed.After narrowing channel subscriptions,
pnpm test src/modules/MainApp/TeamInbox/__tests__/useTeamInboxDataSource.test.ts: 7 tests passed; finalpnpm typecheck:fastand changed TypeScript ESLint passed.New regression coverage: mixed-source transport, capability fallback, typed receipts, identity collisions, ACL scope eviction, channel signal refresh, rendered channel detail and shared Open control, cloud-channel navigation without creating an Agent session.
Pre-commit lint-staged, oxlint, ESLint/Prettier and staged TypeScript checks passed.
git diff --checkpassed. Structural inspection found no raw button/input or clickable-element bypasses in changed production TSX.Companion backend: fresh local migrations/reapply and authenticated PostgreSQL regression suite passed, including private ACL, unloaded mark-all, message deletion, profile/org erasure and legacy behavior.
Native CUA acceptance on two isolated macOS instances with a production fix(team-chat): preserve explicit human mention semantics #2150 + feat(team-inbox): surface channel mention notifications #2151 frontend and the new fixes, real local PostgREST/SQL and fixture auth: A→B and B→A explicit mentions, ordinary-message exclusion, unread badge/body, Open channel, read/unread/mark-all, refresh and restart passed. Private-member removal removed the open detail on refresh; an outsider could neither list nor mutate it. Eight concurrent HTTP read retries preserved one timestamp. Four intended channel messages and zero cloud sessions were verified.
Injected HTTP 503 reproduced the missing failure notice; after the fix, the notice remained and a successful retry cleared it while preserving unread. Four new regression cases failed before their fixes and now pass.
pnpm buildpassed for the integrated acceptance frontend.Native screenshots/AX were reviewed for empty, read, unread and failed-write states in this task; no screenshot binary is attached. English acceptance record explains the exact environment and limitations. The later real Realtime acceptance uses official Supabase Realtime and supersedes those transport gaps.
Architecture layers 1–10 assessed; UI audit: 0 fix, 3 keep with reason, 0 abstract. Performance verdict remains blocked for the measured retained-memory issue; idle/background and covered Realtime lifecycle measurements are now recorded.
Follow-up native acceptance: real A→B/B→A broadcasts, same-account read/unread push, Realtime outage catch-up, hidden return after 1,000 writes, unloaded mark-all, private ACL eviction while detail remained open, cold restart and repeated detail cycles passed. Final ledger: 1,024 deliberate channel messages, zero cloud sessions; full authenticated pagination returned 1,021 unique authorized/read messages.
Healthy visible idle (59.9 s) used 0.050% aggregate CPU for both native/WebKit cohorts and issued zero HTTP requests. Hidden idle (65.1 s) issued no HTTP/WebSocket traffic. Resource phase data and memory limitations are included in the acceptance record; no full-performance pass is claimed.
Extended suite:
pnpm test src/modules/MainApp/TeamInbox src/features/Org2Cloud/teamInboxMentionsClient.test.ts src/features/Org2Cloud/org2CloudCapabilities.test.ts src/features/Org2Cloud/org2CloudRealtimeClient.test.ts src/features/Org2Cloud/org2CloudRealtimeRecovery.test.ts src/features/Org2Cloud/org2CloudRealtimeSignalCoalescer.test.ts src/features/Org2Cloud/useOrg2CloudRealtime.test.ts— 34 files / 265 tests passed.pnpm check:i18n:contractsandpnpm check:typed-lintalso passed after fixing the two previous CI findings.