Repository navigation
fix(dashboard): take the booker's name from the owner's read, not the event - #69
Merged
Merged
Conversation
… event deltat#49 stops change notifications carrying booking labels, since anyone watching a calendar hears them. The owner dashboard showed the name straight from the event, so a live booking would have appeared nameless until a reload. A confirmed booking now appears at once, then getCalendar (owner-checked) fills in its name. The reply only fills names; which bookings exist stays with the events, so two replies resolving out of order cannot drop a newer booking. Works against kernels before and after deltat#49. Claude-Session: https://claude.ai/code/session_01Vaz5XtKxcGVsLe9GeX186M
…ir names Review of #69: copying only names from a read that returns the true booking list threw the rest away, the promise had no catch, and the log lost the name for good. Events still show a change at once (with the event's label on kernels before deltat#49). Each booking change then asks for one debounced getCalendar; a reply lands only if no newer change came in after it was asked for, so a slow reply cannot undo a later event. A failed or signed-out read keeps what the events showed. The log stores the booking id and looks the name up when it renders. Claude-Session: https://claude.ai/code/session_01Vaz5XtKxcGVsLe9GeX186M
…t starve Second review of #69. A booking's name never changes, so every read adds to one name lookup that the timeline, the month view and the log all use; a cancelled booking's log line keeps its name, and names land even when a newer change overtakes the read's booking list. A read now goes out at most 200 ms after the first change of a burst instead of resetting on every change, so steady traffic cannot starve it. Lagged and (re)connecting also read, since both mean changes may have been missed. Leaving a calendar discards a reply still in flight. Claude-Session: https://claude.ai/code/session_01Vaz5XtKxcGVsLe9GeX186M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to open-deltat/deltat#49 (merged), which stops change notifications carrying booking labels: a label is whatever the booker typed, often their name, and every subscriber on a calendar heard it. On delt.at that includes any browser watching a public booking page, through the demo's WebSocket bridge.
The owner dashboard (
demo/components/dashboard/live-schedule.tsx) displayed the name straight from theBookingConfirmedevent, so against a kernel with #49 a live booking would show no name until a reload.Change
getCalendar, the same owner-checked action the page loads with). A booking's name never changes, so every reply adds to a single name lookup that the day view, month view and activity log all read. A cancelled booking's log line keeps its name.Laggedand whenever the stream (re)connects (mount, back from another tab, after a reconnect), since each means changes may have been missed. Before this, a tab switch brought back the page-load list and nothing corrected it.Works against kernels before and after #49 (the event's label is not used either way).
Checks
tsc --noEmiton the demo passes;bun test469 pass, 0 fail.Left for later: a visible hint when reads keep failing (expired session), a per-principal rate limit on
getCalendarnow that the browser calls it, a narrower read than the whole calendar, and sharing the debounce with the hotel and stadium examples.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vaz5XtKxcGVsLe9GeX186M