feat(modules): SSE settings.changed event broadcast #123

Merged
forbes merged 2 commits from feat-sse-settings-changed into main 2026-02-15 19:14:37 +00:00
Owner

Add useSSE hook that connects to /api/events with automatic reconnect and exponential backoff. On settings.changed events:

  • Refresh module state so sidebar nav items show/hide immediately
  • Show dismissable toast when another admin updates settings

The backend already publishes settings.changed in HandleUpdateModuleSettings — this PR adds the frontend reactions.

New file: web/src/hooks/useSSE.ts
Modified: web/src/hooks/useModules.ts (added refresh())
Modified: web/src/components/AppShell.tsx (SSE listener + toast)

Closes #101

Add `useSSE` hook that connects to `/api/events` with automatic reconnect and exponential backoff. On `settings.changed` events: - Refresh module state so sidebar nav items show/hide immediately - Show dismissable toast when another admin updates settings The backend already publishes `settings.changed` in `HandleUpdateModuleSettings` — this PR adds the frontend reactions. **New file:** `web/src/hooks/useSSE.ts` **Modified:** `web/src/hooks/useModules.ts` (added `refresh()`) **Modified:** `web/src/components/AppShell.tsx` (SSE listener + toast) Closes #101
forbes added 1 commit 2026-02-15 19:11:14 +00:00
Add useSSE hook that connects to /api/events with automatic reconnect
and exponential backoff. On settings.changed events:

- Refresh module state so sidebar nav items show/hide immediately
- Show dismissable toast when another admin updates settings

The backend already publishes settings.changed in HandleUpdateModuleSettings.

Closes #101
forbes added 1 commit 2026-02-15 19:14:29 +00:00
forbes merged commit fbfc955ccc into main 2026-02-15 19:14:37 +00:00
forbes deleted branch feat-sse-settings-changed 2026-02-15 19:14:38 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#123