Add live cross-client updates to the Schedule page #5

Merged
sb merged 1 commit from schedule-live-updates into main 2026-08-14 19:11:10 +10:00
Owner

Summary

  • Schedule page now updates live across every open window/computer — chauffeur assignment, status, pickup time, duration, new/deleted/postponed bookings, and offer accept/decline all push an update to other open Schedule tabs within about a second
  • Built on a Server-Sent Events endpoint (GET /api/schedule/events) fed by an in-process event emitter — no external infra needed since this app runs as a single Node process
  • Fixed a real bug found while testing: inline row edits from another tab weren't reflected even after the live-refresh landed, because useBookingCarActions seeds its local state from props only on mount. Rows are now keyed on the mutable fields so an external change forces a clean remount

Test plan

  • npm run build / npm run lint / npm test all pass
  • Manual two-tab test in dev server: PATCH via curl while an SSE stream was open confirmed data: changed events + keep-alive pings arrive, and auth is required
  • User confirmed live chauffeur assignment now shows up in the other window
## Summary - Schedule page now updates live across every open window/computer — chauffeur assignment, status, pickup time, duration, new/deleted/postponed bookings, and offer accept/decline all push an update to other open Schedule tabs within about a second - Built on a Server-Sent Events endpoint (`GET /api/schedule/events`) fed by an in-process event emitter — no external infra needed since this app runs as a single Node process - Fixed a real bug found while testing: inline row edits from another tab weren't reflected even after the live-refresh landed, because `useBookingCarActions` seeds its local state from props only on mount. Rows are now keyed on the mutable fields so an external change forces a clean remount ## Test plan - [x] `npm run build` / `npm run lint` / `npm test` all pass - [x] Manual two-tab test in dev server: PATCH via curl while an SSE stream was open confirmed `data: changed` events + keep-alive pings arrive, and auth is required - [x] User confirmed live chauffeur assignment now shows up in the other window
Fixes a real bug along the way: inline row edits (chauffeur, status,
time, duration) from another tab weren't reflected even after the
live-refresh landed, because the row component's local state was seeded
from props only on mount.
sb merged commit ce65f3275f into main 2026-08-14 19:11:10 +10:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sb/ACC-System!5
No description provided.