Skip to content

fix(notifications): auto-dismiss info-level workflow notifications - #3774

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/notifss
Mar 25, 2026
Merged

fix(notifications): auto-dismiss info-level workflow notifications#3774
waleedlatif1 merged 1 commit into
stagingfrom
fix/notifss

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Info-level workflow notifications (e.g. credential connected) now auto-dismiss with a countdown ring after 10s
  • Previously only error-level notifications were auto-dismissable

Type of Change

  • Bug fix

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)

@cursor

cursorBot commented Mar 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Low risk UI behavior change limited to notification dismissal timing. Main risk is unintentionally auto-dismissing workflow info/warn messages users expected to persist.

Overview
Workflow-scoped notifications are now considered auto-dismissible based solely on presence of workflowId, so non-error workflow notifications (e.g., info) will also show the countdown ring and dismiss after AUTO_DISMISS_MS.

Updates the inline doc comment to reflect the broader auto-dismiss behavior (from workflow error to workflow-scoped notifications).

Written by Cursor Bugbot for commit a667c48. Configure here.

@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedMar 25, 2026 11:03pm

Request Review

@waleedlatif1
waleedlatif1 merged commit 104ad03 into stagingMar 25, 2026
7 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/notifss branch March 25, 2026 23:04
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR broadens the auto-dismiss behaviour in notifications.tsx so that all workflow-scoped notifications (those with a workflowId) auto-dismiss after 10 s, instead of only error-level ones. The change is a single-line predicate update in isAutoDismissable plus a matching JSDoc update.

  • ChangedisAutoDismissable from return n.level === 'error' && !!n.workflowIdreturn !!n.workflowId, enabling auto-dismiss for 'info'-level workflow notifications (e.g. "credential connected").
  • The Notification type only has two severity levels ('info' | 'error'), so the simplified predicate covers both without any gaps.
  • The countdown ring, pause-on-click, and cleanup logic are all unaffected — they already operated on whatever isAutoDismissable returned.
  • Global notifications (no workflowId) still never auto-dismiss, preserving that distinction.

Confidence Score: 5/5

  • Safe to merge — single-predicate change with no side effects on existing logic.
  • The diff is a one-line predicate simplification. The Notification type only has 'info' | 'error' levels, so dropping the level guard cleanly covers the intended new case. All surrounding timer, animation, and pause logic is untouched and already handles both levels correctly. No regressions are expected for error notifications, which behaved the same way before.
  • No files require special attention.

Important Files Changed

FilenameOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/notifications/notifications.tsxRemoves the n.level === 'error' guard from isAutoDismissable, so all workflow-scoped notifications (both 'info' and 'error') now auto-dismiss after 10 s. The JSDoc is updated to match. Change is minimal, correct, and consistent with the existing auto-dismiss infrastructure.

Sequence Diagram

sequenceDiagram
participant Store as NotificationStore
participant Comp as Notifications Component
participant Timer as setTimeout
Store->>Comp: notification arrives (workflowId set, level='info')
Note over Comp: isAutoDismissable → true (was false before)
Comp->>Timer: schedule dismiss in 10 000 ms
Note over Comp: CountdownRing rendered
alt User clicks ring
Comp->>Timer: clearTimeout (pause all)
Note over Comp: isPaused = true, ring hidden
else Timer fires
Timer->>Comp: setExitingIds (exit animation)
Comp->>Store: removeNotification after 200 ms
end
Loading

Reviews (1): Last reviewed commit: "fix(notifications): auto-dismiss info-le..." | Re-trigger Greptile

Sign up for freeto 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

@waleedlatif1