Skip to content

Include notification view in embedded workflow view#3618

Merged
TheodoreSpeaks merged 5 commits intostagingfrom
fix/workflow-notifications
Mar 17, 2026
Merged

Include notification view in embedded workflow view#3618
TheodoreSpeaks merged 5 commits intostagingfrom
fix/workflow-notifications

Conversation

@TheodoreSpeaks
Copy link
Collaborator

@TheodoreSpeaks TheodoreSpeaks commented Mar 17, 2026

Summary

Workflow validation errors previously did not show up in logs due to the Notification view being not enabled for embedded mothership view. Removed the boolean check. Also switch tabs when running workflows from mothership

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Validated that workflow runs with validation errors show error in mothership and in normal view

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 17, 2026 3:14am

Request Review

@cursor
Copy link

cursor bot commented Mar 17, 2026

PR Summary

Medium Risk
Changes notification rendering/behavior in embedded workflow mode and introduces cross-surface messaging via a global window event, which could affect user interactions if the event is misfired or not handled in some embeds.

Overview
Embedded workflow views now display notifications by always rendering Notifications and passing an embedded flag.

In embedded mode, notification copilot actions are rerouted to Mothership chat: Notifications dispatches a mothership-send-message event (new sendMothershipMessage util) and Home listens for that event to call sendMessage; the action button label updates to “Fix in Mothership.”

useChat now auto-focuses/attaches the relevant workflow resource when a client-executable workflow tool call starts, using an explicit workflowId argument when present (fallbacks to the active workflow).

Written by Cursor Bugbot for commit c260487. This will update automatically on new commits. Configure here.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 17, 2026

Greptile Summary

This PR fixes a bug where workflow validation errors were not visible in the embedded (mothership) workflow view by removing the !embedded guard on <Notifications />. The change is a single-line removal that correctly enables notification display in embedded contexts.

Key changes:

  • Removed !embedded && condition from the <Notifications /> render in workflow.tsx, allowing the notification stack to appear in both standard and embedded workflow views.
  • No other files were modified.

Notes:

  • The Notifications component can show action buttons (e.g. "Fix in Copilot") that interact with the <Panel /> component. In embedded mode, <Panel /> is not rendered, so those actions will silently no-op if triggered. This is a minor UX concern — the button appears clickable but produces no visible result.

Confidence Score: 4/5

  • Safe to merge — the fix is minimal, well-scoped, and correctly addresses the reported bug with no risk of regression in the standard workflow view.
  • The change is a single-line guard removal. The Notifications component already handles edge cases defensively (empty notification list returns null, copilot store checks for workflowId before sending). The only minor gap is that copilot-type notification actions won't be functional in embedded mode, but they fail silently without crashing.
  • No files require special attention beyond the minor copilot action UX concern noted in workflow.tsx.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx Removes the !embedded guard from <Notifications /> so validation errors surface in the embedded workflow view. One-line change; the Notifications component renders action buttons (e.g. "Fix in Copilot") that won't be functional in embedded mode since <Panel /> is hidden there.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[WorkflowContent renders] --> B{embedded?}
    B -- No --> C[Render full UI\nToolbar, Panel, DiffControls,\nCommandList, OAuthModal]
    B -- Yes --> D[Render minimal UI\nCanvas only]
    C --> E[Notifications rendered]
    D --> E
    E --> F{visibleNotifications\nlength > 0?}
    F -- No --> G[return null]
    F -- Yes --> H[Render notification stack]
    H --> I{notification has\naction?}
    I -- No --> J[Show message + dismiss button]
    I -- Yes --> K[Show action button]
    K --> L{action type}
    L -- copilot --> M{embedded?}
    M -- No --> N[Open Panel → Copilot tab ✅]
    M -- Yes --> O[Panel not mounted\nsilent no-op ⚠️]
    L -- refresh --> P[window.location.reload]
    L -- unlock-workflow --> Q[dispatchEvent]
Loading

Last reviewed commit: 44016ad

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@TheodoreSpeaks TheodoreSpeaks merged commit 974cc66 into staging Mar 17, 2026
12 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/workflow-notifications branch March 17, 2026 03:22
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