Skip to content

fix(Notifications): persist dismissed IDs in localStorage#1050

Merged
tenphi merged 3 commits intomainfrom
fix-notifications-dismiss
Feb 24, 2026
Merged

fix(Notifications): persist dismissed IDs in localStorage#1050
tenphi merged 3 commits intomainfrom
fix-notifications-dismiss

Conversation

@tenphi
Copy link
Copy Markdown
Member

@tenphi tenphi commented Feb 24, 2026

Note

Medium Risk
Touches overlay interaction/collapse behavior and introduces client-side persistence via localStorage, which can cause subtle UX/state regressions across reloads and SSR/runtime environments.

Overview
Dismissed persistent notification IDs are now persisted in localStorage with a 24h TTL, so previously-archived notifications can skip the overlay after a page reload; this adds dismissed-storage.ts and wires it into usePersistentState/useNotificationState (including action-based dismissals).

Toasts gain an optional actions slot (plumbed through InternalToastOverlayContainerToastItem), and the overlay no longer collapses while actionable toasts are visible; ToastItem becomes pointer-interactive when actions are present, with new Storybook and test coverage.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: 5c41e58

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 24, 2026

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

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Feb 24, 2026 4:02pm
cube-ui-kit-cursor Ready Ready Preview, Comment Feb 24, 2026 4:02pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 24, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-f2c52ec.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 24, 2026

🏋️ Size limit report

Name Size Passed?
All 356.03 KB (+0.07% 🔺) Yes 🎉
Tree shaking (just a Button) 60.52 KB (0% 🟰) Yes 🎉
Tree shaking (just tasty) 36.78 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 24, 2026

🧪 Storybook is successfully deployed!

Comment thread src/components/overlays/Notifications/dismissed-storage.ts
Comment thread src/components/overlays/Notifications/use-persistent-state.ts Outdated
Copy link
Copy Markdown
Contributor

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread src/components/overlays/Toast/ToastItem.tsx
@tenphi tenphi merged commit f4f3f82 into main Feb 24, 2026
17 checks passed
@tenphi tenphi deleted the fix-notifications-dismiss branch February 24, 2026 16:12
@github-actions github-actions Bot mentioned this pull request Feb 24, 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