DreamLake

Notes selection events

Dev Notes — 2026-09-26

Browser selections already travel as native relative CRDT anchors. The presence roster deliberately exports identity only, so CLI 0.29.0 cannot see highlights. The new authenticated Notes /events endpoint mirrors the room read-only and resolves these anchors against the same local graph used for its source hash. It forwards bounded observations, never room credentials or arbitrary awareness.

The server coalesces to 250ms; CLI output uses its independent --throttle. Continuous drags make progress, final selections/clears survive coalescing, and content events alone schedule a debounced REST diff from the last emitted hash. Idle sessions do not poll source. Existing editor selection throttling remains in use. Backpressure closes a stream rather than building an unbounded queue.

Access uses the existing collaborator ACL and is rechecked every 15 seconds, including token expiry and room identity. Network gaps end the process and require a fresh snapshot on restart. There is no retained event log or implicit fallback to the old polling protocol.

Affected public skills: dreamlake-notes and dreamlake-cli. Their sources are this workspace's Notes guide and the CLI live-collaboration guide. Regenerate and synchronize from committed revisions. Source tests, native packaging, source PRs, server deployment, CLI publication, docs deployment and fresh skill readback are separate acceptance steps. Server and UI production verification completed on 2026-09-26; package verification is recorded below.

Validation

  • Server typecheck and 40 focused tests pass (RTC frames, CRDT reanchoring, Unicode offsets, duplicate suppression, trailing throttle, authorization, expiry, disconnect and backpressure cleanup).
  • CLI suite: 1,386 passed, one skipped; docs navigation checks: two passed.
  • Native skill build/install/readback gate passes for 44 bundled files.
  • UI pinned-dependency typecheck and full suite: 2,524 passed, five skipped. A regression test covers a queued selection firing after blur; blur now cancels the pending cursor timer before sending clear.
  • node --import tsx scripts/verify-notes-selection-stream.mts /path/to/candidate/dreamlake in dreamlake-server verifies the compiled CLI against a local HTTP bridge and actual RTC WebSocket frames. It observes selected at Unicode offsets 3:11 after an emoji, then a clear, with exactly one body read, join/leave, and exit 0. Run the API fixture under Node, matching the server runtime.

Production verification — 2026-09-26

  • Server f0bf2987 passed staging and production deployments. Each environment settled at one running task, no pending tasks, and the matching image. Health checks and a live stream through a heartbeat passed; SIGINT exited 0 and removed the agent from the roster.

  • UI 6b3807ff passed staging and production deployment. On the production editor, selecting ## The center produced the exact text at Unicode offsets 0:13; blurring the editor produced a clear. Consecutive updates were spaced two seconds apart, matching the configured throttle. Note content was unchanged.

  • The prerequisite non-unique NoteComment(noteId, createdAt) index was approved separately for staging and production. Each additive-only apply created one index and verified 244 indexes, with no drops or data mutations.

  • CLI 0.31.0 was published from 43840338 through GitHub Actions after the production endpoint passed. The public native binary and npm launcher report 0.31.0, have identical binary checksums, and each freshly installs all 44 bundled skill files byte-for-byte. The installed CLI was updated from 0.29.0.

  • Docs and public skills use the text-first command model: presence reads the roster, visit registers once, and read --linger owns its lease. The old manual action arguments are removed. Docs deployment and fresh installed-skill readback remain separate checks for every subsequent documentation change.