Add a global toast/notification component #33
Notifications
Due Date
No due date set.
Blocks
#13 Toast the user when a processing run completes
eveal/gemory
Reference: eveal/gemory#33
Reference in New Issue
Block a user
Goal
Provide a reusable, app-wide toast/notification mechanism so any part of the app can surface transient success / error / info messages to the user.
Motivation
There is currently no way to show non-blocking feedback to the user — the only global overlay is the blocking
ConfirmModal. This is a prerequisite for #13 (notify the user when a processing run completes), and will be reusable for other flows (buy/sell actions, refresh errors, etc.).Design
Mirror the existing
src/confirm/pattern (Pinia store + a single globally-mounted component + a module-level convenience helper). New slice undersrc/toast/:useToast.ts— Pinia store'toast'holding a reactivetoastslist. Each toast:{ id, message, title?, type }wheretype ∈ 'success' | 'error' | 'info'.push(opts: ToastOptions | string): number— appends a toast, returns its id, and auto-dismisses afterduration(default ~5s;duration: 0= sticky).dismiss(id: number)— removes a toast.toasthelper (likeconfirm): callabletoast('msg')plustoast.success(msg),toast.error(msg),toast.info(msg).ToastOptions:{ message, title?, type?, duration? }.ToastContainer.vue— renders the stack, mounted once. Fixed corner (top-right),TransitionGroupfor enter/leave, per-type icon (@heroicons/vue/24/outline:CheckCircleIcon/XCircleIcon/InformationCircleIcon) and accent colour (success → emerald, error → rose/amber, info → sky, perstyle.csspalette). Each toast has a manual close (XMarkIcon) button.index.ts— exportToastContainer,toast,useToastStore, and theToastOptions/ToastTypetypes.Mount
<ToastContainer />once inApp.vue(alongside<ConfirmModal />).Out of scope
Acceptance criteria
toast.success('...'),toast.error('...'),toast.info('...'), andtoast('...')display a toast from anywhere in the app.duration: 0keeps them until manually closed.style.csspalette.App.vue; styling matches the app (dark slate theme).Affected files
src/toast/useToast.ts(new)src/toast/ToastContainer.vue(new)src/toast/index.ts(new)src/App.vueReference
src/confirm/(useConfirm.ts,ConfirmModal.vue,index.ts).Blocks #13.