Skip to content

[Graphite MQ] Draft PR GROUP:spec_3ed000 (PRs 4168, 4170, 4211, 4227, 4228, 4243)#4244

Closed
graphite-app[bot] wants to merge 6 commits intomainfrom
gtmq_spec_3ed000_1771543082327-a476ef45-c7b6-4061-beea-4993989fefc4
Closed

[Graphite MQ] Draft PR GROUP:spec_3ed000 (PRs 4168, 4170, 4211, 4227, 4228, 4243)#4244
graphite-app[bot] wants to merge 6 commits intomainfrom
gtmq_spec_3ed000_1771543082327-a476ef45-c7b6-4061-beea-4993989fefc4

Conversation

@graphite-app
Copy link
Contributor

@graphite-app graphite-app bot commented Feb 19, 2026

This draft PR was created by the Graphite merge queue.
Trunk will be fast forwarded to the HEAD of this PR when CI passes, and the original PRs will be closed.

The following PRs are included in this draft PR:

jog1t and others added 6 commits February 19, 2026 23:17
# Description

Added Ladle component development environment to the frontend. This PR:

1. Adds Ladle as a dependency to the frontend package
2. Creates a Docker setup for building and serving the Ladle environment
3. Configures Railway deployment files for PR and staging environments
4. Adds a sample workflow component story
5. Updates `.gitignore` to exclude the Ladle build directory
6. Adds npm scripts for Ladle development and building

Ladle provides an isolated environment for developing and testing UI components, making it easier to build and maintain a consistent component library.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

Tested locally by running the Ladle development server and verifying that components can be viewed and interacted with in isolation.

## Checklist:

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

Added a workflow visualization component using XYFlow to render workflow history data as interactive node graphs. This implementation includes:

- Custom node types for different workflow entry types (step, loop, sleep, message, etc.)
- Support for nested structures like loops and parallel branches
- Visual indicators for node status (completed, running, failed, retrying)
- Duration display and timing gaps between nodes
- Dark theme styling for all XYFlow components

The implementation includes example data for various workflow patterns (linear, loops, joins, races) and Ladle stories to showcase each node type and complete workflow examples.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

Tested through Ladle stories that demonstrate:
- Individual node types with different statuses
- Simple linear workflows
- Workflows with loops
- Workflows with parallel branches (join)
- Workflows with racing branches
- Complex workflows with multiple patterns
- In-progress, retrying, and failed workflows

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

Implemented the database inspector feature for actors, allowing users to browse and query SQLite databases within the actor inspector UI. This feature enables viewing table schemas, browsing data with pagination, and exploring foreign key relationships.

The implementation includes:
- New database table component with column resizing and sorting capabilities
- Database schema retrieval API in the actor inspector
- Table row pagination with configurable limits
- Foreign key relationship visualization
- UI integration in the actor details panel

This feature requires RivetKit version 2.0.42 or higher, which includes the new actor inspector protocol v3 with database inspection capabilities.

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

Tested with various SQLite database schemas and data types, including tables with foreign key relationships. Verified pagination works correctly with large datasets and that the UI properly handles different column types.

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

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

- [x] New feature (non-breaking change which adds functionality)
- [x] 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:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] New and existing unit tests pass locally with my changes
…#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

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] 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?

Please describe the tests that you ran to verify your changes.

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
@railway-app
Copy link

railway-app bot commented Feb 19, 2026

This PR was not deployed automatically as @graphite-app[bot] does not have access to the Railway project.

In order to get automatic PR deploys, please add @graphite-app[bot] to your workspace on Railway.

@claude
Copy link

claude bot commented Feb 19, 2026

PR Review: Graphite MQ Group (PRs #4168, #4170, #4211, #4227, #4228, #4243)

This is a large batch covering: Ladle component environment, XYFlow workflow visualization, database inspector, inspector app separation, inspector-from-manager serving, and a setupDatabase merge fix. Overall the work is solid, but there are a few issues worth addressing before merging.


Critical

Absolute symlink committed to version control (frontend/apps/inspector/public)

The symlink target is an absolute path on a specific developer's machine:

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

This will silently break builds on every other machine (and in CI). It should be a relative symlink (../../public from frontend/apps/inspector/) or the path should be resolved differently in the Vite config.


Significant

Duplicate DbMutex class (src/db/mod.ts and src/db/drizzle/mod.ts)

Two independent implementations of the same class were added. The version in drizzle/mod.ts has separate acquire/release methods plus run, while mod.ts only has run. They should be consolidated into a single shared utility (e.g., src/db/mutex.ts) to avoid drift.

Incomplete column metadata in getDatabaseSchema() (src/inspector/actor-inspector.ts)

Column info is derived from SELECT * FROM table LIMIT 1, which means:

  • Tables with zero rows will appear to have no columns
  • All column types are returned as ""
  • notnull, pk, and dflt_value are always zero/null/hardcoded

SQLite provides PRAGMA table_info("tablename") and PRAGMA foreign_key_list("tablename") which give accurate, complete metadata without needing sample data. Given the frontend types already have notnull: boolean and pk: boolean | null, this data can easily be wired up.

Extraction target is unscopable (src/inspector/serve-ui.ts)

The tarball always extracts to os.tmpdir() + "/rivetkit-inspector". Two issues:

  1. Multiple processes (or different versions of the package) will share the same extraction directory, potentially serving stale files.
  2. If extraction fails mid-way, a partial directory remains at that path. On the next attempt extractionPromise is already set (to a rejected promise), so the function will keep returning that error until the process restarts.

Suggested mitigations: include the package version in the dest path (e.g., rivetkit-inspector-{version}), and clear extractionPromise on failure to allow retries.


Minor

Commented-out code left in (frontend/src/components/actors/actor-traces.tsx)

The ToggleGroup block is commented out with a JSX comment. This should either be removed or tracked in an issue; dead code in JSX makes it hard to know if it's intentional or forgotten.

Missing newline at end of file (src/utils/node.ts)

The diff shows \ No newline at end of file for the getNodeUrl addition at the end of the file.

Leading blank line in new file (src/inspector/serve-ui.ts)

There's an extra blank line before the first import statement.

Indentation in new files (tsup.browser.config.ts, src/inspector/mod.browser.ts)

These new files use 4-space indentation. The project convention (per rustfmt.toml and the rest of the TypeScript files) is tabs.


Observations (not blocking)

getInspectorProtocolVersion jump from 2 to 3 (actor-inspector-context.tsx)

The previous code mapped "traces" → 3, "queue" → 4. This PR collapses that to just "database" → 3. If there are old clients that reported version 4 in the field, the mapping change might cause incorrect downgrade behavior. Worth a quick sanity check that the version ladder is intentional.

#activeKeepAwakeCount fix in actor/instance/mod.ts

The increment before action dispatch and decrement in the finally block is a good fix for actions preventing premature actor sleep. The guard that clamps the count to 0 with a warning is a nice defensive addition.

instanceof Promise → thenable duck-type check

Switching from instanceof Promise to checking typeof maybeThenable.then === 'function' is correct and handles cross-realm promises (e.g., from vm contexts or different global objects).

Inspector now served locally at /ui/

Removing the dependency on inspect.rivet.dev simplifies the local dev story. The redirect from /ui/ui/ is a nice UX touch for SPA base-path handling.

XYFlow workflow visualizer refactor

The 1882-line component replaced by ~100 lines + dedicated layout/node files is a big improvement for maintainability.

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.

2 participants