Skip to content

refactor(gui): unify on the toast store, drop the parallel notification context - #125

Merged
CameronBrooks11 merged 1 commit into
mainfrom
refactor/gui-single-notification
Jun 25, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
refactor/gui-single-notification

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

The app ran two functionally-identical notification systems: the Zustand toastStore (rendered by ToastContainer in App.tsx) and a parallel React ErrorNotificationContext + ErrorNotificationToast. Both auto-dismiss; both support error/warning/info.

Migrated the four consumers (ExportConfirmationDialog, VisualizationCanvas, CliUnavailableDialog, useFileOperations) to useToastStore().addToast(...) and deleted the Context + its toast component. The global store needs no provider, so a wrapper drops out of main.tsx and both test helpers.

Net ~150 LoC removed. Verified locally: tsc, stylelint, css-vars guard, and the full vitest suite (614 passed) — behavior unchanged.

@CameronBrooks11 CameronBrooks11 added the gui Pull requests that update GUI components label Jun 25, 2026
…on context

The app had two functionally-identical notification systems: the Zustand
toastStore (rendered by ToastContainer in App.tsx) and a parallel React
ErrorNotificationContext + ErrorNotificationToast. Both auto-dismiss and
support error/warning/info.

Migrate the four consumers (ExportConfirmationDialog, VisualizationCanvas,
CliUnavailableDialog, useFileOperations) to `useToastStore().addToast(...)`
and delete ErrorNotificationContext + ErrorNotificationToast. The global
toast store needs no provider, so this also removes a wrapper from main.tsx
and the two test helpers.

Net ~150 LoC removed. tsc, stylelint, css-vars, and the full vitest suite
(614 passed) all green; user-facing behavior unchanged.
@CameronBrooks11
CameronBrooks11 force-pushed the refactor/gui-single-notification branch from 8a41cef to ad22d91 Compare June 25, 2026 01:06
@CameronBrooks11
CameronBrooks11 merged commit 5e6d5d8 into main Jun 25, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the refactor/gui-single-notification branch June 25, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gui Pull requests that update GUI components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant