Skip to content

fix(work-apps): make Slack page toasts persist until manually closed#1958

Open
amikofalvy wants to merge 1 commit intomainfrom
fix/slack-toast-persist-duration
Open

fix(work-apps): make Slack page toasts persist until manually closed#1958
amikofalvy wants to merge 1 commit intomainfrom
fix/slack-toast-persist-duration

Conversation

@amikofalvy
Copy link
Collaborator

Summary

  • Removes the 5-second auto-dismiss timer from the NotificationBanner component on the Slack integration page
  • Adds duration: Infinity to all sonner toast calls (toast.success / toast.error) across workspace-hero, linked-users-section, and agent-configuration-card
  • Toasts and banners now persist until the user explicitly closes them via the close button

Test plan

  • Navigate to Work Apps > Slack page
  • Trigger a success notification (e.g. send test message, set default agent) and verify it does not auto-dismiss
  • Trigger an error notification (e.g. failed action) and verify it does not auto-dismiss
  • Verify both notification types can still be dismissed by clicking the X / close button

Made with Cursor

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: 87d2e5b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 12, 2026 9:15am
agents-manage-ui Error Error Feb 12, 2026 9:15am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 12, 2026 9:15am

Request Review

Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(1) Total Issues | Risk: Medium

🟠⚠️ Major (1) 🟠⚠️

🟠 1) multi-file Toast duration: Infinity creates inconsistent UX pattern across Management UI

files:

Issue: This PR introduces duration: Infinity for all toasts on Slack integration pages, making them persist until manually closed. This diverges from the established convention across the entire Management UI where toasts auto-dismiss using the default duration. The closest peer pages (GitHub Work App at /work-apps/github/) use default durations without any duration option. This creates a split-world where Slack toasts behave differently than every other page in the app, including the sibling GitHub integration in the same Work Apps section.

Why: Users navigating between pages in the Management UI will experience inconsistent toast behavior — toasts on the Slack page require manual dismissal while toasts everywhere else auto-dismiss. This inconsistency can confuse users and creates UX debt. Success toasts persisting indefinitely is also an unusual UX pattern — users typically expect success confirmations to auto-dismiss since they indicate "all good, nothing to do." Error toasts persisting is more defensible since users may need time to read and act on them.

Fix: Consider one of these approaches:

  1. Remove duration: Infinity from all toast calls and use the default auto-dismiss behavior to maintain consistency with the rest of the Management UI
  2. Differentiate by toast type: Keep error toasts persistent (duration: Infinity) since they require user attention, but let success toasts auto-dismiss (default behavior) since they confirm completion
  3. If persistent toasts are truly needed for Slack: Document the rationale and consider whether this should be a platform-wide pattern change. If applying only to Slack, also update the GitHub integration for Work Apps consistency

Refs:

💭 Consider (1) 💭

💭 1) notification-banner.tsx Consolidate notification mechanisms on Slack page

Issue: The Slack page uses two different notification systems: the NotificationBanner component (a sticky banner at the top using context state via useSlack()) and sonner toast() calls (the standard toast system used elsewhere in the app). After this PR, both persist indefinitely, but they serve different purposes and appear in different UI locations.

Why: Having two notification mechanisms increases cognitive load and may confuse users about which notification style applies when. It also increases maintenance burden.

Fix: Consider consolidating to a single notification approach for the Slack page — either use only sonner toasts (matching the rest of the app) or only the NotificationBanner (if sticky page-level context is truly needed for certain operations).

Refs:


💡 APPROVE WITH SUGGESTIONS

Summary: The code is correct and accomplishes the stated goal, but introduces an inconsistent UX pattern. The Slack page will now behave differently from every other page in the Management UI (including the sibling GitHub integration) regarding toast auto-dismiss behavior. Please consider either removing the duration: Infinity to maintain consistency, or documenting why Slack specifically needs different behavior and whether this pattern should be applied more broadly.

Discarded (0)

No findings were discarded.

Reviewers (4)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-consistency 1 1 0 0 0 0 0
pr-review-product 2 1 (merged) 1 0 0 0 0
pr-review-standards 0 0 0 0 0 0 0
pr-review-frontend 0 0 0 0 0 0 0
Total 3 1 1 0 0 0 0

Note: The consistency and product reviewers both flagged the same inconsistency issue — findings were merged.

The Slack integration page had two separate notification systems: a
custom NotificationBanner (Zustand-backed, Slack-only) and sonner
toasts (the app-wide standard used in 80+ files). This consolidates
everything onto sonner so there is a single toast framework.

- Replace all actions.setNotification() calls with toast.success/error/info()
- Delete NotificationBanner component, Slack notification store, and types
- Remove notification state from SlackProvider context
- Error toasts use duration: Infinity so they persist until closed
- Success/info toasts use the default auto-dismiss duration for
  consistency with the rest of the Management UI

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(1) Total Issues | Risk: Medium

💭 Consider (1) 💭

💭 1) PR description PR description doesn't match implemented behavior

Issue: The PR description states "Toasts and banners now persist until the user explicitly closes them via the close button" — but the implementation differentiates between error toasts (which use duration: Infinity and persist) and success/info toasts (which use default auto-dismiss).

Why: This is actually a reasonable UX pattern (errors deserve user attention, success messages can auto-dismiss), but the documentation doesn't reflect it. Future maintainers may be confused about whether the inconsistency is intentional.

Fix: Update the PR description to accurately describe the behavior: "Error toasts now persist until manually closed (duration: Infinity); success and info toasts continue to auto-dismiss using sonner's default behavior."

Refs:

🕐 Pending Recommendations (1)

  • 🟠 multi-file Toast duration: Infinity creates inconsistent UX pattern across Management UI — error toasts on the Slack page now require manual dismissal while all other pages (including the sibling GitHub Work App) auto-dismiss errors

💡 APPROVE WITH SUGGESTIONS

Summary: The architectural consolidation is solid — removing the custom NotificationBanner component, Zustand store, and Slack-specific types in favor of the standard sonner toast library is a good simplification. No new code quality or correctness issues were found. The prior feedback about inconsistent duration: Infinity usage across the Management UI remains pending — please address or acknowledge the UX consistency question raised in the previous review before merging.

Discarded (2)
Location Issue Reason Discarded
agent-configuration-card.tsx:178 Success toast missing duration: Infinity Intentional design — only error toasts persist, success toasts auto-dismiss (reasonable UX pattern)
slack-dashboard.tsx:37 Info toast for cancelled installation uses default duration Intentional design — cancellation is user-initiated and doesn't need persistent acknowledgment
Reviewers (4)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-consistency 1 0 0 0 0 1 0
pr-review-product 2 0 1 0 0 0 1
pr-review-frontend 2 0 0 0 0 0 2
pr-review-standards 0 0 0 0 0 0 0
Total 5 0 1 0 0 1 3

Note: The consistency reviewer's finding was the same issue raised in the prior review — routed to Pending Recommendations rather than re-raised.

@github-actions github-actions bot deleted a comment from claude bot Feb 12, 2026
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