feat(rewrite): add Phase 3 monitoring browser readers - #399
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (27)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
## Summary - add an authenticated global notification center with a reusable shared Headless UI popover, authoritative unread badge, safe notification text, validated report/incident links, filters, and accessible focus recovery - materialize a named newest 100-row notification window through TanStack DB while retaining global counts and the continuation cursor in Query cache; load older filtered keyset pages only on demand - add cache-first exact actions, confirmed bounded bulk actions, durable realtime invalidation/resync fallback, and fail-closed authenticated cache ownership across logout, relogin, cross-tab identity changes, and password-driven session rotation ## Behavior and regression coverage - the bell uses the server-owned global unread count rather than the number of locally loaded rows and retains cached rows/counts through transient refresh failures - all/read/unread and severity filters apply consistently; older history is navigable one bounded page at a time with stable forward/back focus and identity deduplication against the newest window - title and message content remain inert React text; destination priority is explicit `linkUrl`, then report, then incident - exact mark-read/delete operations repair known cache state before refresh and remove stale rows on `NOT_FOUND`, including when the follow-up refresh fails - mark-all-read and clear-read repeat identical filters sequentially until `remaining=false`, disclose partial failures, reject zero-progress continuation, and enforce a defensive 32-batch browser ceiling - `monitoring.notifications` uses the shared serialized/coalesced invalidation boundary, terminal-resync recovery, and 30-second fallback refresh without overlapping refreshes - logout, relogin, cross-tab session changes, and rotated password sessions gate private UI while collections, queries, mutations, and realtime ownership reset; stale session work is aborted and cannot publish into the replacement cache - the shared Popover component covers keyboard opening, Escape dismissal, and trigger focus restoration for later shell features ## Verification - [x] Repository lint: `cd greenfield && bun run lint` - [x] Repository formatting: `cd greenfield && bun run format:check` - [ ] Frontend build: `bun run build:frontend` — legacy frontend is outside this isolated greenfield slice; `cd greenfield && bun run build:browser` and the clean-source release build are green - [ ] Frontend tests/coverage: `bun run test:frontend:coverage` — legacy frontend is outside this slice; the complete greenfield browser suite ran below - [ ] Backend build: `bun run build:backend` — no server implementation changes; greenfield process artifacts were built by the release gate - [ ] Backend tests/coverage: `bun run test:backend:coverage` — legacy backend is outside this slice; the complete greenfield Bun suite ran below - [x] Focused notification/auth/security regression suite: 77/77 - [ ] Manual UI/API smoke check, if relevant — inactive pre-cutover slice; deterministic authenticated browser tests exercise the visible, keyboard, cache, mutation, and realtime workflows Additional greenfield gates: - `bun run typecheck` - `bun run check:boundaries` - `bun run docs:check` - `bun run db:check` - `bun run test:browser` — 141/141, 755 assertions - `bun run test:bun` — 1,410/1,410, 6,876 assertions - `bun run build:release` — clean-source release for `1dc765dfc9753cadfb3cd246a4daa7ae02c3fee3` ## Risk checklist - [x] No secrets, tokens, `.env` files, database dumps, or runtime state committed - [x] Auth, session ownership, realtime, mutation cancellation, and private cache transitions were reviewed carefully - [x] Notification browser calls remain behind authenticated capability-enforced server contracts and validated client boundaries - [x] Migrations or data-shape changes include a rollout/rollback note, if relevant — none in this slice - [x] Runtime/reconnect behavior preserves bounded ordering, idempotency, cancellation, and recovery - [x] UI changes include screenshots or a short description of visible changes — the authenticated shell gains a notification bell and keyboard-accessible filtered panel with bounded history and actions ## Deployment / operations - [x] No deploy/restart needed - [ ] Deploy/restart needed after merge: none; the greenfield stack remains inactive until supervised cutover - [ ] Config/secrets changes needed: none - [x] Rollback path verified: revert this PR's three commits before cutover and rebuild the unpublished greenfield release ## Notes for reviewers - focus on authenticated cache ownership, session A→B transitions, newest-window/history separation, partial bulk failure behavior, exact-action cache repair, and keyboard focus through realtime/history changes - the notification panel deliberately uses a shared Popover primitive for later shell features - stack base: #399 at locked head `a8b4b414cc561cb67f0febb6120e0381468e829e`
Summary
/reportsreader with bounded summary pages, status/free-form kind/source filters, exact large-document loading, safe Markdown rendering, and confirmed deletion/incidentsreader as a hidden deep-link target with lifecycle/severity filters, a selectable virtualized TanStack Table, and exact detail loadingBehavior and regression coverage
NOT_FOUNDand boundedPRECONDITION_FAILEDoutcomes do not expose server text, and a failed post-delete refresh cannot resurrect the row/incidentsis intentionally registered and titled inside the authenticated shell while absent from main navigation; Reports links to it, and monitoring notification deep links can target the persistent incident generation rather than an arbitrary report observationmonitoring.reportsandmonitoring.incidentsuse coalesced invalidation, terminal-resync recovery, and a 30-second fallback refreshVerification
cd greenfield && bun run lintcd greenfield && bun run format:checkbun run build:frontend— legacy frontend is outside this isolated greenfield slice;cd greenfield && bun run build:browserand the release build are greenbun run test:frontend:coverage— legacy frontend is outside this slice; the complete greenfield browser and coverage suites ran belowbun run build:backend— no backend behavior changes; the greenfield process artifacts were built by the release gatebun run test:backend:coverage— legacy backend is outside this slice; the complete greenfield Bun suite ran belowAdditional greenfield gates:
bun run typecheckbun run check:boundariesbun run docs:checkbun run db:checkbun scripts/runTestSuite.ts src/test/parity/parityInventory.test.ts— 4/4bun run test:browser— 84/84, 344 assertionsbun run test:coverage— 1,492 tests, 0 failures, 92.31% line coverage (37,971/41,134)bun run build:release— clean-source release fora8b4b414cc561cb67f0febb6120e0381468e829eRisk checklist
.envfiles, database dumps, or runtime state committed/reportsgains a filterable list/detail workspace;/incidentsgains a hidden filterable table/detail workspaceDeployment / operations
Notes for reviewers
/incidentsis intentionally hidden from main navigation but reachable from Reports and durable monitoring notification links488425875a815b1806f77a0ba75342937c2d8e13