Skip to content

feat(rivetkit): rerun workflows from inspector#4533

Merged
NathanFlurry merged 5 commits intomainfrom
workflow-step-resume
Mar 31, 2026
Merged

feat(rivetkit): rerun workflows from inspector#4533
NathanFlurry merged 5 commits intomainfrom
workflow-step-resume

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

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 railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4533 March 30, 2026 20:37 Destroyed
@railway-app
Copy link
Copy Markdown

railway-app bot commented Mar 30, 2026

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

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web Mar 31, 2026 at 1:13 am
website 😴 Sleeping (View Logs) Web Mar 30, 2026 at 11:33 pm
frontend-cloud 😴 Sleeping (View Logs) Web Mar 30, 2026 at 11:31 pm
frontend-inspector 😴 Sleeping (View Logs) Web Mar 30, 2026 at 11:30 pm
mcp-hub ✅ Success (View Logs) Web Mar 30, 2026 at 11:20 pm
ladle ❌ Build Failed (View Logs) Web Mar 30, 2026 at 11:20 pm

@NathanFlurry NathanFlurry marked this pull request as ready for review March 30, 2026 20:37
Copy link
Copy Markdown
Member Author

NathanFlurry commented Mar 30, 2026

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 30, 2026

More templates

@rivetkit/cloudflare-workers

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

@rivetkit/sqlite-vfs

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

@rivetkit/traces

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

@rivetkit/workflow-engine

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

@rivetkit/virtual-websocket

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

@rivetkit/engine-runner

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

@rivetkit/engine-runner-protocol

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

commit: 1d0028d

@NathanFlurry NathanFlurry changed the base branch from main to graphite-base/4533 March 30, 2026 23:19
@NathanFlurry NathanFlurry force-pushed the workflow-step-resume branch from 9c41fe2 to 1d0028d Compare March 30, 2026 23:19
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4533 to inspector-sqlite-shell March 30, 2026 23:19
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4533 March 30, 2026 23:19 Destroyed
@NathanFlurry NathanFlurry requested a review from jog1t March 30, 2026 23:51
@NathanFlurry NathanFlurry changed the base branch from inspector-sqlite-shell to graphite-base/4533 March 31, 2026 01:11
@NathanFlurry NathanFlurry force-pushed the workflow-step-resume branch from 1d0028d to 8fb8fed Compare March 31, 2026 01:12
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4533 March 31, 2026 01:12 Destroyed
@graphite-app graphite-app bot changed the base branch from graphite-base/4533 to main March 31, 2026 01:12
@NathanFlurry NathanFlurry force-pushed the workflow-step-resume branch from 8fb8fed to 769e543 Compare March 31, 2026 01:12
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4533 March 31, 2026 01:12 Destroyed
@NathanFlurry NathanFlurry merged commit ba155ee into main Mar 31, 2026
14 of 19 checks passed
Copy link
Copy Markdown
Member Author

Merge activity

@NathanFlurry NathanFlurry deleted the workflow-step-resume branch March 31, 2026 01:14
@claude
Copy link
Copy Markdown

claude bot commented Mar 31, 2026

PR Review: feat(rivetkit): rerun workflows from inspector

This PR adds UI support for replaying workflows from a specific step in the Actor workflow inspector via two surfaces: a right-click context menu on graph nodes and a persistent toolbar button.

HIGH SEVERITY

Issue: data.canReplay is always undefined — context menu never opens

In workflow-visualizer.tsx, the onNodeContextMenu handler gates on data.canReplay. However, canReplay is never set on any node's data in workflow-to-xyflow.ts or the WorkflowNodeData interface. Because the interface has an index signature ([key: string]: unknown), TypeScript will not catch this. data.canReplay will always be undefined and the context menu will never open. The field needs to be added to the WorkflowNodeData interface and populated wherever node data is constructed.

MEDIUM SEVERITY

Issue: Duplicate endpoint in skill-base-rivetkit.md

The line "POST /inspector/workflow/replay" appears to have been added at line 35, but also already exists later in the same file, creating a duplicate bullet point.

Issue: Hint text shown regardless of protocol version

The helper text "Right-click a previous step to replay the workflow from there." renders unconditionally, even when inspector.inspectorProtocolVersion is less than 4. Users on older inspectors see a hint for a feature that will not work. This should be gated on the same version check used for the button and onReplayStep prop.

LOW SEVERITY

Issue: Context menu may clip off viewport edges

The menu is positioned at clientX/clientY with no boundary detection. Nodes near the right or bottom edge will cause the menu to overflow off-screen. Consider checking against window.innerWidth / window.innerHeight and flipping the anchor.

Issue: isReplaying state can become stale

isReplaying is captured into contextMenu state at menu-open time from data.isReplaying. If a replay is triggered elsewhere after the menu opens, the disabled state in the context menu will not update. Consider deriving this from the mutation state reactively.

Issue: canReplayCurrentStep does not handle first-attempt failures

The toolbar button requires retryCount > 0, so a step that fails on its first attempt will not show the button. If first-attempt replay is desirable, the condition should be relaxed or at minimum documented.

Issue: canReplay missing from WorkflowNodeData interface

After fixing the runtime bug above, the TypeScript interface should include canReplay as an optional boolean for type safety.

CODE QUALITY

The implementation is generally well-structured. The useEffect for outside-click/Escape dismissal is correct and properly cleans up listeners. Using globalThis.Node to disambiguate from React's Node type is a thoughtful detail. Tailwind classes on the context menu correctly mirror shadcn/ui dropdown styling. The version guard inspectorProtocolVersion >= 4 is consistently applied across the toolbar button and onReplayStep prop.

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