Skip to content

feat(rewrite): add Phase 3 monitoring browser readers - #399

Merged
rajohan merged 1 commit into
mira/greenfield-rewrite-phase-three-monitoringfrom
mira/greenfield-rewrite-phase-three-monitoring-browser
Aug 24, 2026
Merged

feat(rewrite): add Phase 3 monitoring browser readers#399
rajohan merged 1 commit into
mira/greenfield-rewrite-phase-three-monitoringfrom
mira/greenfield-rewrite-phase-three-monitoring-browser

Conversation

@mira-2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an authenticated /reports reader with bounded summary pages, status/free-form kind/source filters, exact large-document loading, safe Markdown rendering, and confirmed deletion
  • add the net-new authenticated /incidents reader as a hidden deep-link target with lifecycle/severity filters, a selectable virtualized TanStack Table, and exact detail loading
  • wire lazy report/incident browser contracts, precise Query cache roots, durable realtime invalidation/resync fallback, reviewed frontend parity, and Phase 3 progress evidence

Behavior and regression coverage

  • report and incident lists use server-owned keyset pagination with cancellation signals and identity deduplication across overlapping pages
  • validated UUIDv7 search state loads exact detail independently of first-page or list availability; malformed deep links issue no detail request
  • report bodies are fetched only after explicit selection or a valid deep link, so list calls never carry the potentially large Markdown document
  • the existing shared Markdown renderer keeps raw HTML inert
  • successful report deletion removes the record from every cached filtered page before refresh; fixed NOT_FOUND and bounded PRECONDITION_FAILED outcomes do not expose server text, and a failed post-delete refresh cannot resurrect the row
  • /incidents is 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 observation
  • monitoring.reports and monitoring.incidents use coalesced invalidation, terminal-resync recovery, and a 30-second fallback refresh
  • the incident table uses the shared virtualizer at 50 rows and gives recurring generations distinct accessible button names
  • cached list/detail data remains usable during transient refetch failures

Verification

  • Repository lint: cd greenfield && bun run lint
  • 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 release build are green
  • Frontend tests/coverage: bun run test:frontend:coverage — legacy frontend is outside this slice; the complete greenfield browser and coverage suites ran below
  • Backend build: bun run build:backend — no backend behavior changes; the 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
  • Focused regression tests: monitoring route/query/realtime/virtualization suite (17/17)
  • Manual UI/API smoke check, if relevant — inactive pre-cutover slice; deterministic authenticated route tests exercise the visible workflows

Additional greenfield gates:

  • bun run typecheck
  • bun run check:boundaries
  • bun run docs:check
  • bun run db:check
  • bun scripts/runTestSuite.ts src/test/parity/parityInventory.test.ts — 4/4
  • bun run test:browser — 84/84, 344 assertions
  • bun run test:coverage — 1,492 tests, 0 failures, 92.31% line coverage (37,971/41,134)
  • bun run build:release — clean-source release for a8b4b414cc561cb67f0febb6120e0381468e829e

Risk checklist

  • No secrets, tokens, .env files, database dumps, or runtime state committed
  • Auth, Gateway, terminal, file, Docker, or settings changes were reviewed carefully
  • New/changed API routes enforce the expected authentication and validation
  • Migrations or data-shape changes include a rollout/rollback note, if relevant — none in this slice
  • Runtime/reconnect behavior preserves ordering, idempotency, and recovery
  • UI changes include screenshots or a short description of visible changes — /reports gains a filterable list/detail workspace; /incidents gains a hidden filterable table/detail workspace

Deployment / operations

  • No deploy/restart needed
  • Deploy/restart needed after merge: none; the greenfield stack remains inactive until supervised cutover
  • Config/secrets changes needed: none
  • Rollback path verified: revert the single browser commit before cutover and rebuild the unpublished greenfield release

Notes for reviewers

  • focus on large-detail isolation, deep-link/list independence, post-delete cache behavior, accessible virtualization, and terminal realtime recovery
  • /incidents is intentionally hidden from main navigation but reachable from Reports and durable monitoring notification links
  • stack base: feat(rewrite): add Phase 3 monitoring ingestion and catalogs #398 at locked head 488425875a815b1806f77a0ba75342937c2d8e13

@mira-2026
mira-2026 requested a review from rajohan as a code owner August 7, 2026 19:39
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@mira-2026, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 52489bb5-a146-451b-8e2b-a0980866c91a

📥 Commits

Reviewing files that changed from the base of the PR and between 4884258 and a8b4b41.

📒 Files selected for processing (27)
  • greenfield/docs/architecture/greenfield-rewrite/progress.md
  • greenfield/src/browser/api/trpcClient.test.ts
  • greenfield/src/browser/api/trpcClient.ts
  • greenfield/src/browser/layout/DashboardShell.tsx
  • greenfield/src/browser/lib/dashboardRoutes.ts
  • greenfield/src/browser/monitoring/IncidentBrowser.tsx
  • greenfield/src/browser/monitoring/IncidentTable.test.tsx
  • greenfield/src/browser/monitoring/IncidentTable.tsx
  • greenfield/src/browser/monitoring/IncidentsRoute.tsx
  • greenfield/src/browser/monitoring/MonitoringRoutes.test.tsx
  • greenfield/src/browser/monitoring/MonitoringSelectionList.tsx
  • greenfield/src/browser/monitoring/ReportBrowser.tsx
  • greenfield/src/browser/monitoring/ReportsRoute.tsx
  • greenfield/src/browser/monitoring/incidentPresentation.ts
  • greenfield/src/browser/monitoring/monitoringMutations.ts
  • greenfield/src/browser/monitoring/monitoringQueries.test.ts
  • greenfield/src/browser/monitoring/monitoringQueries.ts
  • greenfield/src/browser/monitoring/monitoringRouteSearch.ts
  • greenfield/src/browser/monitoring/useMonitoringRealtimeInvalidation.test.tsx
  • greenfield/src/browser/monitoring/useMonitoringRealtimeInvalidation.ts
  • greenfield/src/browser/router.tsx
  • greenfield/src/browser/routes/incidents.lazy.tsx
  • greenfield/src/browser/routes/reports.lazy.tsx
  • greenfield/src/browser/tasks/useTaskRealtimeInvalidation.test.tsx
  • greenfield/src/browser/test/realtime.ts
  • greenfield/src/test/parity/fixtures/frontend-routes.json
  • greenfield/src/test/parity/parityInventory.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mira-2026 mira-2026 added status: needs-review Ready for human or agent review type: feature Adds user-visible functionality type: tests Adds or updates automated tests/coverage type: documentation Documentation, README, comments, and operational notes area: frontend Frontend UI, client state, routing, and browser behavior area: notifications Notification ingestion, bell UI, and alert maintenance labels Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

@rajohan
rajohan merged commit 662091d into main Aug 24, 2026
9 checks passed
@rajohan
rajohan deleted the mira/greenfield-rewrite-phase-three-monitoring-browser branch August 24, 2026 03:59
rajohan added a commit that referenced this pull request Aug 24, 2026
## 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Frontend UI, client state, routing, and browser behavior area: notifications Notification ingestion, bell UI, and alert maintenance status: needs-review Ready for human or agent review type: documentation Documentation, README, comments, and operational notes type: feature Adds user-visible functionality type: tests Adds or updates automated tests/coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants