Skip to content

feat(greenfield): add reports overview - #407

Open
mira-2026 wants to merge 1 commit into
mira/greenfield-rewrite-phase-three-system-metricsfrom
mira/greenfield-rewrite-phase-three-core-overview
Open

feat(greenfield): add reports overview#407
mira-2026 wants to merge 1 commit into
mira/greenfield-rewrite-phase-three-system-metricsfrom
mira/greenfield-rewrite-phase-three-core-overview

Conversation

@mira-2026

@mira-2026 mira-2026 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a read-only reports overview card to the authenticated root route
  • fetch exactly one newest-50 summary page under a dedicated report cache key
  • show bounded warning/error counts and the latest canonical report without loading Markdown bodies or metadata
  • reuse durable report realtime invalidation with the existing 30-second fallback and retained-data error handling
  • centralize shared report status/kind presentation and add an accessible Storybook surface

Behavior and regression coverage

  • Root loading, empty, safe initial error, explicit retry, retained-data refresh failure, and realtime refresh are covered.
  • The overview query is isolated from the paginated /reports catalog, so older cached pages cannot widen root refresh work.
  • Tests lock the exact { limit: 50 } request, bounded count wording, latest status/time, and the accessible /reports link.
  • / remains intentionally planned; this slice does not claim job/cron or later privileged-card parity.

Verification

  • Full Bun suite/timing inventory: bun run test:timings:update — 1594 passed
  • Full browser suite/timing inventory: bun run test:timings:update:browser — 293 passed
  • Storybook browser tests: bun run storybook:test — 172 passed across 51 files
  • Coverage: bun run test:coverage — 91.69% (required 85%)
  • TypeScript: bun run typecheck
  • Lint: bun run lint
  • Formatting: bun run format:check
  • Source boundaries: bun run check:boundaries
  • Generated docs: bun run docs:check
  • Database schema: bun run db:check
  • Production dependency audit: bun audit --production
  • Storybook production build: bun run storybook:build
  • Clean-tree release build at a8f362397cc3d0fe16984586b169c481ad4bd628: bun run build:release

Risk checklist

  • No secrets, tokens, .env files, database dumps, or runtime state committed
  • Authentication and authorization boundaries are unchanged; the card uses the existing authenticated reports:read procedure
  • No API, database, migration, dependency, configuration, or privileged-operation changes
  • UI change is documented by OverviewReportsCard Storybook states and interaction/a11y tests

Deployment / operations

  • No deploy/restart needed for this stacked review slice
  • Rollback is the isolated feat(greenfield): add reports overview commit

Notes for reviewers

  • Stacked on feat(greenfield): add system metrics overview #406; review this PR against mira/greenfield-rewrite-phase-three-system-metrics.
  • Focus on bounded first-page query semantics, retained validated data during refresh failure, and the explicit non-claim of full root parity.

@mira-2026
mira-2026 requested a review from rajohan as a code owner August 9, 2026 01:24
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a reports summary card to the overview dashboard.
    • Displays recent report details, status counts, warning/error totals, timestamps, and report navigation.
    • Added loading, empty, error, retry, and background refresh states.
    • Updates the overview when new reports become available.
  • Documentation

    • Documented the reports overview implementation and remaining planned areas.
  • Tests

    • Added coverage for report summaries, navigation, loading, refresh, error recovery, and empty states.
    • Added Storybook examples for populated and empty report views.

Walkthrough

The overview route now loads the newest 50 report summaries, displays report status and counts, refreshes after realtime events, and handles loading and errors. Shared presentation helpers, route tests, Storybook stories, progress documentation, and timing data were added or updated.

Changes

Reports overview

Layer / File(s) Summary
Report query and presentation contracts
greenfield/src/browser/monitoring/...
Added shared report labels, status variants, a 50-item overview query, isolated caching, abort handling, and query tests.
Overview reports card
greenfield/src/browser/overview/OverviewReportsCard.tsx, greenfield/src/browser/overview/OverviewReportsCard.test.tsx, greenfield/src/browser/overview/stories/...
Added report counts, latest-report details, empty-state handling, continuation messaging, navigation, tests, and stories.
Realtime overview section
greenfield/src/browser/overview/OverviewReportsSection.tsx, greenfield/src/browser/overview/OverviewReportsSection.test.tsx
Added report loading, realtime invalidation, retry handling, partial-error alerts, and stale-data retention.
Overview route integration and project records
greenfield/src/browser/overview/OverviewRoute.tsx, greenfield/src/browser/overview/OverviewRoute.test.tsx, greenfield/docs/architecture/greenfield-rewrite/progress.md, greenfield/.bun-*.json
Mounted the reports section, added route transport fixtures and assertions, recorded progress, and updated test timing data.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OverviewRoute
  participant OverviewReportsSection
  participant reports.list
  participant ReportsRealtime
  participant OverviewReportsCard
  OverviewRoute->>OverviewReportsSection: Render reports overview
  OverviewReportsSection->>reports.list: Fetch newest 50 summaries
  reports.list-->>OverviewReportsSection: Return summaries and pagination state
  OverviewReportsSection->>OverviewReportsCard: Render report data
  ReportsRealtime-->>OverviewReportsSection: Emit report event
  OverviewReportsSection->>reports.list: Refresh overview query
  reports.list-->>OverviewReportsSection: Return updated data or error
  OverviewReportsSection->>OverviewReportsCard: Render refreshed or retained data
Loading

Possibly related PRs

Suggested labels: type: feature, area: frontend

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: adding the reports overview feature to greenfield.
Description check ✅ Passed The description covers the required summary, behavior, verification, risk, deployment, and reviewer-note sections with concrete details.

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 labels Aug 9, 2026
@mira-2026 mira-2026 changed the title mira/greenfield rewrite phase three core overview feat(greenfield): add reports overview Aug 9, 2026
@mira-2026 mira-2026 added type: documentation Documentation, README, comments, and operational notes area: frontend Frontend UI, client state, routing, and browser behavior labels Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.70968% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...field/src/browser/overview/OverviewReportsCard.tsx 86.08% 16 Missing ⚠️
...ld/src/browser/overview/OverviewReportsSection.tsx 89.58% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

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 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.

1 participant