Skip to content

Less Zustand#958

Merged
martpie merged 3 commits intomasterfrom
less-zustand
Apr 2, 2026
Merged

Less Zustand#958
martpie merged 3 commits intomasterfrom
less-zustand

Conversation

@martpie
Copy link
Copy Markdown
Owner

@martpie martpie commented Mar 25, 2026

  • Move sort to queries
  • Move toasts to Base UI toast manager
  • What else?

Copilot AI review requested due to automatic review settings March 25, 2026 02:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces Zustand usage by removing the custom toast Zustand store/components and migrating toast notifications to Base UI’s toast manager, updating call sites across the app accordingly.

Changes:

  • Remove the Zustand-backed toast store and the custom toast item component/types.
  • Introduce a shared toastManager (Base UI) and switch existing notification call sites to toastManager.add(...).
  • Regenerate/update Lingui .po files (source line reference updates).

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/types/museeks.ts Removes legacy toast-related types.
src/stores/useToastsStore.ts Deletes Zustand toast store (no longer used).
src/lib/toast-manager.ts Adds shared Base UI toast manager singleton.
src/lib/utils.ts Routes error notifications through toastManager instead of toast store.
src/stores/useLibraryStore.ts Uses toastManager for scan/reset success messages.
src/stores/SettingsAPI.ts Uses toastManager for update-check success messages.
src/stores/PlaylistsAPI.ts Uses toastManager for playlist creation messages.
src/components/Toasts.tsx Replaces custom toast list rendering with Base UI Toast Provider/Viewport/Root.
src/elements/Toast.tsx Removes legacy toast item component styling/rendering.
src/components/TrackList.tsx Uses toastManager for “added to playlist” feedback.
src/components/PlayerEvents.tsx Uses toastManager for audio error notifications and removes hook dep.
src/components/DropzoneImport.tsx Uses toastManager for import warnings/success and removes hook dep.
src/translations/en.po Updates extracted source references (line numbers).
src/translations/es.po Updates extracted source references (line numbers).
src/translations/fr.po Updates extracted source references (line numbers).
src/translations/ja.po Updates extracted source references (line numbers).
src/translations/ru.po Updates extracted source references (line numbers).
src/translations/zh-CN.po Updates extracted source references (line numbers).
src/translations/zh-TW.po Updates extracted source references (line numbers).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/toast-manager.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@martpie martpie closed this Apr 2, 2026
@martpie martpie reopened this Apr 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Toasts.tsx
martpie and others added 2 commits April 2, 2026 15:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@martpie martpie merged commit 6b25657 into master Apr 2, 2026
1 check failed
@martpie martpie deleted the less-zustand branch April 2, 2026 13:57
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