Skip to content

feat(rewrite): add Phase 3 cache browser foundation - #404

Open
mira-2026 wants to merge 1 commit into
mira/greenfield-rewrite-phase-three-cachefrom
mira/greenfield-rewrite-phase-three-cache-browser
Open

feat(rewrite): add Phase 3 cache browser foundation#404
mira-2026 wants to merge 1 commit into
mira/greenfield-rewrite-phase-three-cachefrom
mira/greenfield-rewrite-phase-three-cache-browser

Conversation

@mira-2026

@mira-2026 mira-2026 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the authenticated root placeholder with a bounded cache inventory and progressive overview foundation
  • load exact cache payloads only after selection and render only the reviewed system.host schema/source projection
  • keep status and the one active exact entry fresh through 30-second polling, remount reconciliation, precise cache.entries invalidation, and terminal fallback
  • enqueue manual refreshes with caller/auth-generation-scoped lost-response idempotency and present the validated job-run state without claiming provider completion
  • preserve explicit truncation, independent freshness/attempt state, accessible selection and virtualization, and last-known-good data through transient failures

Correctness and security

  • generic cache payloads and metadata are never rendered; system.host fails closed unless key, schema id, source, and payload all match the reviewed contract
  • fixed browser messages replace raw tRPC/transport failures, and provider failure text remains bounded/redacted by the server contract
  • exact-entry feedback clears only when the authoritative cache attempt advances to the accepted run
  • realtime callbacks stay current without resubscribing the shared SSE hub on ordinary renders
  • empty truncated snapshots are not presented as complete inventories

Behavior and regression coverage

  • route tests cover lazy exact loading, totalCount/truncated, independent fresh/failed state, safe host rendering, queued refresh, terminal idempotency replay, and authoritative feedback clearing
  • query tests cover status and exact freshness polling, remount reconciliation, cancellation, and LKG retention
  • realtime tests cover per-key coalescing, invalid identities, rerenders before the debounce, terminal resync, and periodic fallback
  • component tests cover reviewed schema/source binding, non-color selection, keyboard-reachable scrolling, and the 50-row virtualization threshold

Verification

  • bun run test:bun — 1573/1573
  • bun run test:browser — all browser partitions green
  • bun run typecheck:bun
  • bun run typecheck:browser
  • bun run lint:bun
  • bun run lint:browser
  • bun run format:check
  • bun run docs:check
  • bun run db:checkok / no_changes
  • bun run check:boundaries
  • bun run build:release
  • git diff --check

Stack and scope

  • stacked directly on locked feat(rewrite): add Phase 3 cache foundation #403 at 69bc9140fc5c0e0e0c99dff538adb6c91c6fdf25
  • root-route parity remains planned; metrics and the remaining Phase 3 overview composition stay open
  • parity bookkeeping assigns OpenClaw cron and cache.getHeartbeat to Phase 4 with their persistent Gateway dependency
  • no procedure contract, server, database, migration, deploy, restart, config, or secret change
  • rollback is removal of this single stacked commit

Risk checklist

  • No secrets, tokens, environment files, database dumps, or runtime state committed
  • Authentication-cache generation, idempotency, realtime identity, payload rendering, and error redaction were reviewed explicitly
  • Boundedness, truncation, LKG behavior, expiry, terminal replay, and route-gap reconciliation have regression coverage
  • No production or published-migration state changed

Deployment / operations

  • No deploy or restart needed
  • No config or secret changes needed
  • Rollback is removal of this single stacked commit

Notes for reviewers

  • focus on exact-entry expiry/remount reconciliation, stable shared realtime invalidation, terminal replay presentation, and fail-closed system.host rendering
  • this slice establishes the overview surface without claiming complete / parity

@mira-2026
mira-2026 requested a review from rajohan as a code owner August 8, 2026 15:07
@coderabbitai

coderabbitai Bot commented Aug 8, 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: 29 seconds

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: 54260991-0387-4c3e-84a0-e42eb67d1d62

📥 Commits

Reviewing files that changed from the base of the PR and between 69bc914 and e3b390e.

📒 Files selected for processing (24)
  • greenfield/docs/architecture/greenfield-rewrite/progress.md
  • greenfield/src/browser/api/useRealtimeQueryInvalidation.ts
  • greenfield/src/browser/application.test.tsx
  • greenfield/src/browser/cache/CacheBrowser.tsx
  • greenfield/src/browser/cache/CacheEntryDetail.tsx
  • greenfield/src/browser/cache/CacheStatusTable.test.tsx
  • greenfield/src/browser/cache/CacheStatusTable.tsx
  • greenfield/src/browser/cache/SystemHostCard.test.tsx
  • greenfield/src/browser/cache/SystemHostCard.tsx
  • greenfield/src/browser/cache/cacheMutations.test.tsx
  • greenfield/src/browser/cache/cacheMutations.ts
  • greenfield/src/browser/cache/cachePresentation.test.ts
  • greenfield/src/browser/cache/cachePresentation.ts
  • greenfield/src/browser/cache/cacheQueries.test.ts
  • greenfield/src/browser/cache/cacheQueries.ts
  • greenfield/src/browser/cache/useCacheRealtimeInvalidation.test.tsx
  • greenfield/src/browser/cache/useCacheRealtimeInvalidation.ts
  • greenfield/src/browser/overview/OverviewRoute.test.tsx
  • greenfield/src/browser/overview/OverviewRoute.tsx
  • greenfield/src/browser/routes/overview.lazy.tsx
  • greenfield/src/browser/ui/EmptyState.tsx
  • greenfield/src/browser/ui/PageState.tsx
  • greenfield/src/test/parity/fixtures/legacy-endpoints.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 changed the title mira/greenfield rewrite phase three cache browser feat(rewrite): add Phase 3 cache browser foundation Aug 8, 2026
@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: ops Operational actions, deploys, services, backups, and health labels Aug 8, 2026
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.55456% with 58 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
greenfield/src/browser/cache/CacheEntryDetail.tsx 80.24% 48 Missing ⚠️
greenfield/src/browser/cache/CacheBrowser.tsx 92.03% 9 Missing ⚠️
.../src/browser/cache/useCacheRealtimeInvalidation.ts 98.03% 1 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 area: ops Operational actions, deploys, services, backups, and health 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