feat: Allow users to dismiss the toolbar, across all windows, for 1 day or 1 month#319
Merged
feat: Allow users to dismiss the toolbar, across all windows, for 1 day or 1 month#319
Conversation
Member
ryan953
commented
Jan 25, 2026
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧Release
Other
🤖 This preview updates automatically when you update the PR. |
- Remove side effect from useMemo in HiddenAppContext (clearHiddenUntil call) - Wrap useStorage sync callback in useCallback to prevent event listener churn - Fix useStorage clearValue to reset to initialValue instead of undefined - Clear previous hide type when switching between session and time-based hiding These changes address Sentry bot and Cursor Bugbot feedback about: 1. Side effects in render (useMemo calling state setters) 2. Unstable callbacks causing unnecessary event listener re-registration 3. Type safety (clearValue now maintains Data type contract) 4. UX bug where both hide types could be active simultaneously
ryan953
commented
Jan 25, 2026
Don't set up the interval timer when hiddenUntil is not set, avoiding unnecessary work when the toolbar is using session-based hiding or not hidden at all.
…tion - Make Select controlled component with state and reset after selection This fixes the issue where re-selecting the same duration wouldn't work after the component remounts - Fix interval race condition by reading fresh from localStorage Prevents clearing newer hide values set by other tabs due to stale captured state in the interval callback Addresses Sentry bot feedback (ref 9156192) and Cursor bot feedback (ref1_333a870d).
The setHideSelectValue('') call after setHideDuration had no effect
since the component unmounts immediately when hiding is triggered.
The select value resets automatically on remount via useState('')
initialization.
Addresses Cursor bot feedback (ref a35104de).
The init value was being recomputed on every render, causing the handleSync callback to be recreated, which triggered the event listener in useWindowKeyValueSync to be removed and re-added on every render. By memoizing init with useMemo, we ensure the callback remains stable unless the actual initialValue changes. Addresses Cursor bot feedback (ref1_062b78fa).
There was a problem hiding this comment.
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.
- Create ToastContext with toast notification system - Add useToast hook for consuming toast functionality - Integrate ToastProvider into app providers - Display toast messages when user selects hide duration: - "Toolbar hidden for this session" - "Toolbar hidden for 1 day" - "Toolbar hidden for 1 month" The toast uses the purple-300 color scheme to match the primary button variant and appears in the bottom-right corner with slide-in animation from tailwindcss-animate.
- Add slide-in-right keyframes and animation to tailwind.config.js - Use animate-slide-in-right class instead of tailwindcss-animate plugin - Animation: 200ms ease-out slide from right with opacity fade - Add eslint-disable for react-refresh/only-export-components on context hook This provides a clean, native Tailwind animation that the linter recognizes, eliminating the need for plugin-specific classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.