Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

Overview

  • Updated banner dismissal mechanism to utilize settings store
    -actored sidebar banner dismissal logic for improved state management

Changes

  • Migrated banner dismissal state to centralized settings store
  • Simplified banner dismissal implementation

@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit bc265a0
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/693e6d7562aea400088cd7d9
😎 Deploy Preview https://deploy-preview-2300--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit bc265a0
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/693e6d75754bab000848c3c9
😎 Deploy Preview https://deploy-preview-2300--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

📝 Walkthrough

Walkthrough

The change relocates TinyBase store references in the dismissed banners hook from the main store module to the settings store module, updating all associated imports and identifiers accordingly. No logic or control-flow modifications were made.

Changes

Cohort / File(s) Summary
Store reference migration
apps/desktop/src/components/main/sidebar/banner/useDismissedBanners.ts
Updated import source from store/tinybase/main to store/tinybase/settings; migrated main.UI.useSetValueCallback to settings.UI.useSetValueCallback and main.STORE_ID to settings.STORE_ID

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Verify the settings store module provides the same API interface as the main store module
  • Confirm all store references within the file were consistently updated

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor(sidebar): update banner dismissal to use settings store' accurately describes the main change—migrating banner dismissal logic to use the settings store instead of the main store.
Description check ✅ Passed The description is related to the changeset, discussing banner dismissal mechanism updates and state management improvements that align with the import and store reference changes made.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/sidebar-banner-dismissal

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42d99c9 and bc265a0.

📒 Files selected for processing (1)
  • apps/desktop/src/components/main/sidebar/banner/useDismissedBanners.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces

Files:

  • apps/desktop/src/components/main/sidebar/banner/useDismissedBanners.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/sidebar/banner/useDismissedBanners.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: desktop_ci (macos, depot-macos-14)
🔇 Additional comments (1)
apps/desktop/src/components/main/sidebar/banner/useDismissedBanners.ts (1)

4-4: The store consistency is already correct—no action needed.

The refactoring is consistent: useConfigValue("dismissed_banners") on line 11 reads from the settings store via settings.UI.useValue(key, settings.STORE_ID) (defined in config/use-config.ts:22), and the write operation on lines 13-18 uses settings.UI.useSetValueCallback(..., settings.STORE_ID). Both operations use the same store, so there is no read-write mismatch.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ComputelessComputer ComputelessComputer merged commit aa3da55 into main Dec 14, 2025
16 checks passed
@ComputelessComputer ComputelessComputer deleted the refactor/sidebar-banner-dismissal branch December 14, 2025 08:04
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.

2 participants