feat(presence): PRES-3a — whiteboard cursors on the real transport#140
Merged
Conversation
The whiteboard already renders remote cursors/selection from awareness; it just ran on a local no-transport channel (single-device). Swap it onto the real PRES-2b presence transport so cursors go cross-device — no change to the publisher, peer derivation, or overlay paint (the whole point of the transport abstraction). - `presence-channel.ts` — `presenceAwarenessFor(boardEntityId)`: the live DEK-sealed transport in the shell (`services.presence.publish/untrack` + `presence.onPeers`, keyed on the board's entity id), else a local single-device channel (standalone / preview). - `engine.ts` — `awareness` is now re-bindable; `bindPresence(boardId)` on every `openBoard` swaps the transport to the open board (boards switch in-window; the real id only lands on open) — tearing down the prior board's presence (final clear + untrack). Closures read the current binding; only the `change` listener re-attaches. - `storage/runtime.ts` — the consumer typing for `services.presence` + `presence.onPeers` on `WhiteboardBrainstorm`. 8 presence-channel tests (+2: shell publishes to the service / inbound peer push → remote state / untrack on destroy; standalone → local). 239 whiteboard-logic tests green; whiteboard build + full typecheck (packages + 12 apps) + lint clean. Remaining PRES-3: the fleet header `<PresenceStack>` avatar mount across the React shared-entity apps (Notes/Database/…). Then PRES-4 `/pentester` two-shell. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 12, 2026
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.
Builds on PRES-2b (now on main). The whiteboard already renders remote cursors + selection from awareness — it just ran on a local no-transport channel (single-device). This swaps it onto the real DEK-sealed presence transport, so two users on the same board see each other's cursors, with zero change to the publisher / peer derivation / overlay paint (the transport abstraction's whole point).
Changes
presence-channel.ts—presenceAwarenessFor(boardEntityId): the live transport in the shell (services.presence.publish/untrack+presence.onPeers, keyed on the board's entity id), else a local single-device channel (standalone / preview).engine.ts—awarenessis now re-bindable;bindPresence(boardId)on everyopenBoardswaps the transport to the open board (boards switch in-window; the real id only lands on open), tearing down the prior board's presence (final clear + untrack). Closures read the current binding at call time; only thechangelistener re-attaches.storage/runtime.ts— consumer typing forservices.presence+presence.onPeers.Verification
presence-channeltests (+2: shell publishes to the service · inbound peer push → remote state · untrack on destroy · standalone → local)./pentestertwo-shell dogfood — now unblocked by this.Remaining PRES-3
The fleet header
<PresenceStack>avatar mount across the React shared-entity apps (Notes/Database/…) — likely with an SDK extraction of the transport glue (rule-of-three). Whiteboard is the canvas-cursor reference; the header stacks are the who's-here-avatars half.🤖 Generated with Claude Code