Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • throw notification on runtime errors, move predeploy checks to update in deploy modal

Type of Change

  • Bug fix
  • New feature

Testing

Tested manually

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)

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 9, 2026

Greptile Overview

Greptile Summary

This PR shifts client-side pre-deploy validation for redeploy/update into the Deploy modal’s Update action (instead of gating opening the modal), and refactors terminal runtime-error notifications into a shared helper while also emitting notifications when updateConsole receives an error update.

Key behavior changes:

  • Already-deployed workflows now open the modal without running predeploy checks; checks run when the user clicks Update.
  • Console error notifications can now be triggered both when adding a new console entry and when updating an existing one with an error payload.

Confidence Score: 3/5

  • This PR is moderately safe to merge, but the new updateConsole notification path can emit notifications without proper workflow/block context in common call patterns.
  • Most changes are a straightforward behavior shift (validation moved into the modal). The main risk is the new notification emission after updateConsole, which relies on an executionId-based lookup that can fail and produce unscoped/low-quality notifications.
  • apps/sim/stores/terminal/console/store.ts

Important Files Changed

Filename Overview
apps/sim/app/work/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx Moves pre-deploy validation into the modal’s Update handler by calling runPreDeployChecks before redeploy. Potential issue: uses useWorkflowStore.getState() snapshot (non-reactive) during user action; otherwise change is straightforward.
apps/sim/app/work/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deployment.ts Removes predeploy checks from handleDeployClick for already-deployed workflows; modal now handles validation on Update. Change is simple; behavior shift is intentional.
apps/sim/stores/terminal/console/store.ts Refactors block error notifications into notifyBlockError helper and adds notifications for updateConsole error updates. Issue: updateConsole notification uses entry lookup by executionId which may be undefined/mismatched, leading to missing workflowId/blockName and incorrect notification context.

Sequence Diagram

sequenceDiagram
  participant UI as DeployModal
  participant WS as WorkflowStore
  participant PC as PreDeployChecks
  participant API as Deploy API
  participant TS as TerminalConsoleStore
  participant NS as NotificationStore

  UI->>WS: getState() blocks/edges/loops/parallels
  UI->>PC: runPreDeployChecks(liveBlocks,...)
  alt checks fail
    UI-->>UI: setDeployError() and return
  else checks pass
    UI->>API: deployMutation.mutateAsync(workflowId)
    API-->>UI: deploy result (warnings/success)
  end

  TS->>TS: updateConsole(blockId, update, executionId?)
  opt update is object and has error
    TS->>TS: find matching entry by blockId+executionId
    TS->>NS: addNotification(error, workflowId?, message)
  end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@vercel
Copy link

vercel bot commented Feb 9, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 9, 2026 7:32pm

Request Review

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 622d0ca into staging Feb 9, 2026
3 of 4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/notifs branch February 9, 2026 19:50
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