You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(realtime): harden seeder recovery, join-generation, and misc robustness
Final line-by-line audit follow-ups (all LOW/MED, no P0/P1):
- file-doc: a sole client whose seed FETCH fails was added to triedSeeders,
re-election found nobody, and the document stayed permanently empty until
reload. Re-offer seeding a bounded number of rounds (MAX_SEED_ROUNDS) before
giving up. Also bound clientId to a non-negative integer (it is an ownership key).
- tables + workspace-files: validate the room id BEFORE advancing joinGeneration,
so a malformed/rejected join can't cancel a legitimate in-flight join.
- workflow + tables + workspace-files: suppress the client-facing join error when
the op was already superseded (a retryable error naming the abandoned room could
make a client re-join and cancel its newer join). The rollback still runs.
- redis-manager: set isConnected=true only after scriptLoad succeeds (and reset it
on failure) so isReady() can't report ready while the Lua SHAs are null.
- connection: apply the presence-bearing filter to the manager-removed set too
(symmetry with the fallback path).
- http.ts: validate workflowId on the four workflow endpoints (matching the files one).
- client: clear a pending join-retry timer before rescheduling (reconnect churn no
longer orphans a stray extra join); clear caret fade timers on plugin destroy;
seed-effect cleanup reports NOT-ready (safe direction).
- Tests: bounded seeder recovery, cell-selection strip-junk, TABLE round-trip,
presenceEventName.
Gates: tsc (sim/realtime/packages) 0, 208 realtime + 12 protocol tests, biome,
api-validation, boundaries, prune.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/caret-presence.ts
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,17 @@ export function createCaretActivityExtension(awareness: Awareness): Extension {
135
135
destroy: ()=>{
136
136
awareness.off('change',onChange)
137
137
if(raf)cancelAnimationFrame(raf)
138
+
// Clear any pending fade timers for this editor's carets so they don't fire on
139
+
// detached nodes after unmount (harmless no-op, but a genuine leaked timer).
0 commit comments