refactor: inspector tabs bundled with actor#4670
refactor: inspector tabs bundled with actor#4670jog1t wants to merge 1 commit into04-15-refactor_rivetkit_move_devtools_to_local_scriptfrom
Conversation
|
🚅 Deployed to the rivet-pr-4670 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Review: refactor: inspector tabs bundled with actorThis PR introduces a postMessage-based iframe architecture for inspector tabs, where each tab (workflow, database, state, queue, connections, metadata) is built as a separate Vite bundle and rendered inside a sandboxed iframe. The shell communicates with iframes via a structured message protocol to bridge the inspector API and sync query cache. This is a well-thought-out architectural change. Bugs / CorrectnessDead code: The
In
In
SecurityCSP In Per CLAUDE.md the dashboard is at Action dispatch via dynamic key access In Code Quality
The Inline comment about console is slightly imprecise The comment says "console stays inline: ActorWorkerContextProvider uses TanStack Router context unavailable in iframes" -- the actual dependency is SummaryThe core architecture is solid: structured message protocol with origin allowlisting, query cache hydration via BroadcastChannel, iframe lifecycle deferred to first tab activation, and an explicit action allowlist at the bridge boundary. Main actionable items:
|
1fe66d4 to
a190d13
Compare
986ef51 to
5a4e315
Compare
a190d13 to
f7625ea
Compare
5a4e315 to
d5a6b40
Compare
d5a6b40 to
b5b770f
Compare
f7625ea to
4d42d30
Compare
PR Review:
|
| Severity | Issue |
|---|---|
| Critical | Inspector-tabs bundle is never built (no build script/task) |
| Critical | @tanstack/query-core version mismatch breaks BroadcastChannel sync |
| Medium | Dead entries/console/ files that cannot be built |
| Medium | Incorrect queryKey as string[] cast in tab-context.tsx |
| Medium | isInitialized exported but never consumed (no loading state) |
| Medium | sendAction posts to "*" before shell origin is established |
| Medium | getQueryCacheSnapshot uses fragile string-include actorId filter |
| Minor | dashboard.rivet.dev vs hub.rivet.dev in CSP/allowlist |
| Minor | broadcastQueryClient remount without cleanup guard |
| Minor | Misleading try/catch for same-origin contentDocument access |
| Minor | JSX indentation inside IframeTabBridgeProvider |
The overall architecture (iframe tabs, postMessage bridge, BroadcastChannel cache sync) is sound. The two critical issues (missing build step and query-core version mismatch) need to be resolved before this can ship correctly.

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: