refactor(inspector): serve inspector from manager (localhost:6420/ui)#4228
Conversation
|
🚅 Deployed to the rivet-pr-4228 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.
How to use the Graphite Merge QueueAdd 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 Automations"Test" took an action on this PR • (02/18/26)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |
| onNotFound: async (_path, c) => { | ||
| await serveStatic({ root, path: "index.html" })( | ||
| c, | ||
| next, | ||
| ); | ||
| }, |
There was a problem hiding this comment.
The onNotFound handler does not return the result of the serveStatic call, which will cause the SPA fallback routing to fail. When a non-existent route like /ui/some/route is accessed, the handler will serve nothing instead of the index.html file.
Fix:
onNotFound: async (_path, c) => {
return serveStatic({ root, path: "index.html" })(
c,
next,
);
},| onNotFound: async (_path, c) => { | |
| await serveStatic({ root, path: "index.html" })( | |
| c, | |
| next, | |
| ); | |
| }, | |
| onNotFound: async (_path, c) => { | |
| return serveStatic({ root, path: "index.html" })( | |
| c, | |
| next, | |
| ); | |
| }, |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
PR Review: refactor(inspector): serve inspector from manager (localhost:6420/ui)This PR is a solid improvement to the developer experience by co-locating the inspector UI with the manager server. The approach is sound overall. Here are my findings: Bugs / Correctness Issues1. Stale files from version upgrades in The tarball is always extracted to a fixed path ( Consider including a content hash in the tmpdir name, or deleting and recreating the directory before extraction: ```ts 2. Failed extraction is permanently cached in If extraction fails (e.g., tarball not found), ```ts Behavioral / UX Concerns3. Inspector URL hardcodes ```ts The old code used 4. Lazy extraction causes a slow first request The tarball is extracted on the first Code Quality5. Double blank line in ```ts Minor, but inconsistent with surrounding style. 6. Missing newline at end of The diff shows 7. Indentation inconsistency in new files
Build / CI8. CI workflow uses ```yaml
Using 9. All Minor Notes
|
| const { id, promise } = actionsManager.current.createResolver< | ||
| unknown[] | ||
| >({ | ||
| name: "getDatabaseTableRows", | ||
| timeoutMs: 10_000, | ||
| }); |
There was a problem hiding this comment.
The formatting of the createResolver function call was changed, which doesn't match Biome's expected formatting style. Run 'pnpm lint --fix' to automatically fix the formatting.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
| const loopName = | ||
| nameRegistry[segment.loop] ?? `loop-${segment.loop}`; |
There was a problem hiding this comment.
The variable assignment was reformatted with a line break that doesn't match Biome's expected style. Run 'pnpm lint --fix' to automatically fix the formatting.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
| const allCompleted = | ||
| history.length > 0 && | ||
| history.every((h) => h.entry.status === "completed"); |
There was a problem hiding this comment.
The variable assignment was reformatted with line breaks that don't match Biome's expected style. Run 'pnpm lint --fix' to automatically fix the formatting.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
1c9cb1e to
4a58c66
Compare
4a58c66 to
6a877f5
Compare
d4eab78 to
76f77cc
Compare
76f77cc to
8648aed
Compare
84d3f2b to
7c3c423
Compare
Merge activity
|
…#4228) # Description This PR adds support for serving the inspector UI directly from the Rivet manager server, making it accessible at `/ui/` instead of requiring a separate deployment. This simplifies the inspector setup and improves the developer experience. Key changes: - Added a new endpoint in the manager router to serve the inspector UI static files - Created a script to package the inspector UI into a tarball for distribution - Updated the inspector URL generation to use the local `/ui/` path - Added browser-safe exports for the inspector client code - Fixed imports in the frontend to use the new browser-safe paths - Updated the build configuration to properly handle browser vs. Node.js code ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? The changes have been tested by: - Building the inspector UI and verifying it can be served from the manager - Testing the browser-safe exports to ensure they work correctly in frontend code - Verifying the inspector functionality works with the new URL structure ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes

Description
This PR adds support for serving the inspector UI directly from the Rivet manager server, making it accessible at
/ui/instead of requiring a separate deployment. This simplifies the inspector setup and improves the developer experience.Key changes:
/ui/pathType of change
How Has This Been Tested?
The changes have been tested by:
Checklist: