Skip to content

refactor(inspector): separate inspector app from dashboard#4227

Open
jog1t wants to merge 1 commit into02-16-feat_add_database_inspectorfrom
02-18-refactor_inspector_separate_inspector_app_from_dashboard
Open

refactor(inspector): separate inspector app from dashboard#4227
jog1t wants to merge 1 commit into02-16-feat_add_database_inspectorfrom
02-18-refactor_inspector_separate_inspector_app_from_dashboard

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Feb 18, 2026

Description

Created a dedicated Inspector app in the frontend directory structure. This change moves the Inspector functionality from being embedded in the main frontend application to its own standalone app, allowing for better separation of concerns and more focused development.

The new Inspector app includes:

  • A complete application structure with its own routing, components, and configuration
  • Dedicated HTML entry point and styling
  • Inspector-specific context providers and data handling
  • UI components for connecting to and interacting with local RivetKit instances

This refactoring removes Inspector-related code from the main frontend codebase, including context providers, routes, and UI components that were previously shared.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

The Inspector app has been tested by verifying it can:

  • Connect to local RivetKit instances
  • Display actor information
  • Handle connection status appropriately
  • Maintain all previous functionality in its new standalone form

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link

railway-app bot commented Feb 18, 2026

🚅 Deployed to the rivet-pr-4227 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Feb 19, 2026 at 12:01 am
mcp-hub ✅ Success (View Logs) Web Feb 18, 2026 at 11:54 pm
frontend-inspector ❌ Build Failed (View Logs) Web Feb 18, 2026 at 11:54 pm
frontend-cloud ❌ Build Failed (View Logs) Web Feb 18, 2026 at 11:53 pm
ladle ❌ Build Failed (View Logs) Web Feb 18, 2026 at 11:53 pm

@jog1t jog1t marked this pull request as ready for review February 18, 2026 23:52
Copy link
Contributor Author

jog1t commented Feb 18, 2026

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


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 18, 2026

Graphite Automations

"Test" took an action on this PR • (02/18/26)

1 assignee was added to this PR based on Kacper Wojciechowski's automation.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 18, 2026

More templates

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4227

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4227

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4227

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4227

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4227

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4227

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4227

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4227

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4227

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4227

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4227

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4227

commit: 84d3f2b

@@ -0,0 +1 @@
/Users/kwojciechowski/Documents/Projects/rivet.gg/rivet/frontend/public No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains an absolute path to a local machine (/Users/kwojciechowski/Documents/Projects/rivet.gg/rivet/frontend/public). This will break for:

  • Other developers checking out the code
  • CI/CD pipelines
  • Production deployments

Fix: Use a relative path for the symlink instead:

ln -s ../../public frontend/apps/inspector/public

Or configure the build tool to handle the public directory appropriately rather than committing a symlink.

Suggested change
/Users/kwojciechowski/Documents/Projects/rivet.gg/rivet/frontend/public
../../public

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@claude
Copy link

claude bot commented Feb 18, 2026

PR Review: refactor(inspector): separate inspector app from dashboard

The overall direction of this refactor is sound — separating the Inspector into its own standalone app improves separation of concerns and makes each app independently configurable. Here are the issues I found:


Critical

Broken absolute symlink committed to the repo

frontend/apps/inspector/public is a symlink pointing to an absolute local path:

/Users/kwojciechowski/Documents/Projects/rivet.gg/rivet/frontend/public

This is a developer's local machine path and will be broken in every other environment (CI, other contributors, production builds). Replace this with a relative symlink (e.g., ../../../public) or copy/reference the assets another way.


Bugs

Disconnected state calls disconnect() instead of reconnecting

In frontend/apps/inspector/src/app/layout.tsx, the ConnectionStatus component renders a "Reconnect" tooltip when the status is "disconnected", but the button's onClick calls disconnect():

// status === "disconnected"
<Button onClick={() => disconnect()}>  // should reconnect, not disconnect
  <Icon icon={faLink} />
</Button>

The tooltip says "Reconnect" but the action disconnects further. This needs a reconnect() or connect() call from useInspectorContext.

Modal enum mismatch in _context.tsx

The search schema modal enum in frontend/apps/inspector/src/routes/_context.tsx does not include "create-actor":

modal: z.enum(["go-to-actor", "feedback", "create-ns", "create-project", "billing"])
  .or(z.string()).optional()

But the Modals component checks search.modal === "create-actor". While .or(z.string()) makes this technically work, the enum is misleading and "create-actor" should be added to it. Additionally, "create-ns", "create-project", and "billing" appear to be dashboard-specific modals with no corresponding dialog in this component — they should be removed from the inspector's enum.


Code Quality

HTTP instead of HTTPS for external links

frontend/apps/inspector/src/app/layout.tsx has two links using http://:

<a href="http://www.rivet.dev/discord" ...>Discord</a>
<a href="http://github.com/rivet-dev/rivet" ...>GitHub</a>

These should use https://.

Deprecated domain in alt text

frontend/apps/inspector/src/app/layout.tsx Logo component uses alt="Rivet.gg". The rivet.gg domain is deprecated per project conventions — update to "Rivet" or "rivet.dev".

Typo: missing apostrophe

frontend/apps/inspector/src/app/layout.tsx sidebar link reads Whats new? — should be What's new?.

Trailing whitespace in className strings

Several className values have a leading space that could be cleaned up (minor):

  • " border text-sm p-2 rounded-md flex items-center bg-stripes" (reconnecting and connected state divs)

Minor

Missing package.json for the new app

No package.json appears in the diff for frontend/apps/inspector/. If this is a standalone Vite app it typically needs its own package.json for scripts (dev, build, preview).

vite.inspector.config.ts in frontend root is now just a re-export

The file now re-exports from ./apps/inspector/vite.config. This works as a compatibility shim but consider whether it's still needed or can be removed along with any scripts that reference it directly.


What's working well

  • The cache module in frontend/apps/inspector/src/app/data-providers/cache.ts cleanly mirrors the pattern from the main app's cache.
  • The _context.tsx route correctly handles URL normalization (getInspectorClientEndpoint) and redirect logic.
  • Removing inspector concerns from frontend/src/ is clean — the ts-pattern match exhaustiveness changes in vite-env.d.ts correctly narrow __APP_TYPE__ to "engine" | "cloud".

The symlink issue should be fixed before merge as it will break CI/builds for anyone else on the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments