Live updates that never move the floor
How Kyndium shows a teammate's change within seconds in every view, and why it deliberately waits while you are dragging, typing or reading a menu.
A live project view sounds simple: when someone else changes a task, show it. The hard part is the other half of the sentence, which nobody writes down: show it without pulling the floor from under the person who is in the middle of something.
One subscription, one refresh
Every task in a project is a row in one table, so a project needs one subscription to hear about all of it. Kyndium subscribes to changes on tasks, lanes, labels, dependencies, co-assignees and comments, filtered to the open project where the database allows and matched by id where it doesn't (deletes carry only the primary key).
When a change arrives, Kyndium does not patch the view that happens to be open. It schedules a refresh of the whole page's data, 450 milliseconds later, and merges any changes that arrive in that window into the same refresh. Every view, and an open task window, re-renders from the server's answer. That is more work than patching one card, and it is the reason every view agrees: there is no view-specific code that could be wrong.
Skipping your own echo
Your own change comes back through the same subscription a moment after you make it. Refreshing on it would be wasteful and, worse, would race with the optimistic update you just saw. Every row carries the id of the account that last changed it, written by a database trigger, so a browser can recognize and ignore its own echoes.
When not to refresh
This is the part that makes it feel right. A refresh is deferred while:
- a pointer button is held down, because you are dragging something;
- a text field has focus, because you are typing;
- a menu, a dialog or the Timeline's task form is open;
- the canvas is showing, which has its own live layer;
- the tab is hidden.
As soon as the condition clears, the pending refresh runs. If the connection dropped, one refresh runs on reconnect to catch up. The person dragging a card never sees the lane reflow mid-drag, and the person typing a title never has it replaced.
Showing who is here
The same channel carries presence: who has the project open and which view they are in. Faces appear beside the Share button. Cards and rows a teammate just changed glow once for a couple of seconds, so a change that landed while you were looking elsewhere has a trace.
The rule
Live is a promise about the data, not about motion. The data is always a few seconds old at most. The motion waits for you.
Comments