Skip to content

feat(platform): workflow update approval flow#740

Merged
larryro merged 4 commits into
mainfrom
feat/workflow-update-approvals
Mar 10, 2026
Merged

feat(platform): workflow update approval flow#740
larryro merged 4 commits into
mainfrom
feat/workflow-update-approvals

Conversation

@larryro

@larryro larryro commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add workflow_update approval type so that workflow saves and step patches go through explicit user approval before being applied
  • Decouple the AI chat panel from the step editor side panel, making it persist independently at the route level
  • Simplify approval rendering by showing approvals inline next to their associated message, and increase message history to 100

Test plan

  • Verify workflow save triggers an approval card in the chat
  • Verify step updates trigger an approval card in the chat
  • Approve and reject workflow updates, confirm changes apply/revert correctly
  • Confirm AI chat panel persists when switching between steps
  • Confirm side panel resizing works correctly
  • Run unit tests: execute_approved_workflow_update, save_workflow_definition_tool, update_workflow_step_tool, MessageList, circular_dependency_validator

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added workflow update approval system—users can now review and approve workflow changes before they're applied.
    • Introduced AI assistant integration for automations with a resizable side panel.
    • Workflow updates now display as approval cards in chat, showing change summaries and execution results.
  • Changes

    • Workflow modification tools now require an update summary description and create approvals instead of applying changes immediately.
    • Improved automation navigation and UI structure for better approval handling.

larryro added 3 commits March 10, 2026 18:57
Introduce a `workflow_update` approval type so that workflow saves and
step patches go through an explicit approval before being applied.
Includes backend execution logic, approval card UI, chat integration,
and tests.
Extract the AI assistant into a standalone panel at the route level so it
persists independently of step selection. Refactor useResizable into a
shared hook with controlled/uncontrolled width support, simplify the side
panel by removing chat-specific state, and improve canvas fitView to
respond to container resize instead of panel mode changes. Also fix
circular dependency validation by including stepType in the query and add
regression tests.
Remove trailing approvals logic from MessageList — approvals are now
only shown inline next to their associated message. Increase initial
thread message fetch from 30 to 100 for better conversation context.
Add tests for MessageList component.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Replace non-null assertions with optional chaining in use-resizable,
add missing setWidth to dependency arrays, and fix type inference for
StepWithNextSteps in circular dependency validator test.
@larryro larryro merged commit b6c213b into main Mar 10, 2026
15 checks passed
@larryro larryro deleted the feat/workflow-update-approvals branch March 10, 2026 12:33
@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR implements a workflow update approval system for automations. The changes introduce approval-based workflows where tools like save_workflow_definition and update_workflow_step create approval records instead of applying changes immediately. It adds frontend components for rendering and managing workflow update approvals in chat interfaces and automation panels, new hooks for approval data fetching and panel resizing, and backend actions/mutations for creating and executing workflow approvals. The system displays approval cards with approve/reject actions and tracks execution results. Existing automation UI components are refactored to support approval visibility and management across chat, automations, and custom agent features.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat(platform): workflow update approval flow' accurately summarizes the main feature being added—a new approval workflow for updating automation steps and saving workflows. It is clear, concise, and directly reflects the core changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/workflow-update-approvals

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

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