Skip to content

feat: Allow users to dismiss the toolbar, across all windows, for 1 day or 1 month#319

Merged
ryan953 merged 14 commits intomainfrom
ryan953/monthly-dismiss
Jan 26, 2026
Merged

feat: Allow users to dismiss the toolbar, across all windows, for 1 day or 1 month#319
ryan953 merged 14 commits intomainfrom
ryan953/monthly-dismiss

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Jan 25, 2026

SCR-20260125-iwsl

@ryan953 ryan953 requested a review from a team as a code owner January 25, 2026 17:36
@github-actions
Copy link

github-actions bot commented Jan 25, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Allow users to dismiss the toolbar, across all windows, for 1 day or 1 month by ryan953 in #319

Bug Fixes 🐛

  • (auth) When login doesnt connect fully, allow logout by ryan953 in #316

Internal Changes 🔧

Release

  • Fix changelog-preview permissions by BYK in #315
  • Switch from action-prepare-release to Craft by BYK in #312

Other

  • Add some config/setup for claude by ryan953 in #317
  • Use pull_request_target for changelog preview by BYK in #313

🤖 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
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).
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.

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.
@ryan953 ryan953 merged commit ce9e568 into main Jan 26, 2026
9 checks passed
@ryan953 ryan953 deleted the ryan953/monthly-dismiss branch January 26, 2026 19:46
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