NEC-92: Show collaborators' mouse pointers in the note #166

Merged
nectenda-agent merged 4 commits from worktree-nec-92-show-collaborators-mouse-pointers-in-the into main 2026-09-25 10:07:58 +01:00
Collaborator

Task: NEC-92 — https://projectron.nerchure.com/tasks/92

Collaborators' mouse pointers are drawn in the note, anchored to the character under the mouse (a Y.RelativePosition plus an offset in character widths) so they land on the same word whatever each vault's width, font or wrapping. Sends are throttled to the server's 50 ms relay window and cleared when the mouse leaves; touch sends nothing. When the pointed-at text is off-screen, a named indicator is pinned to that edge and keeps following the other coordinate; collaborators' text cursors get the same indicator, merged into one pill per person per edge. Two settings, both on: 'Share my mouse pointer' (privacy) and 'Show collaborators' mouse pointers' (noise). The look was reviewed with the user over three screenshot rounds and a live try: tip at the middle of the character, name below the line, pointer, name and the text-cursor label see-through at 0.72, a resting pointer fades after 3 s. Only the editor the note is bound to draws or sends pointers, since every editor shares one extension array (SAFE-D5). A fresh-context review found four issues, all fixed here: fades restarting when another marker came or went, un-merging restarting the fade, the status bar no longer repairing itself after a reconnect, and touch covered only by a pure-function test. Adds WIRE-090..093 (docs/v1/protocol/wire.md §10), updates sync-limitations and security-model. Unit rules and the SAFE-D5 guard and fade fix were mutation-checked in both directions.

Spec: docs/changes/NEC-92-collaborator-pointers/spec.md

Changelog

Collaborators' mouse pointers now show in the note you share, with their name, and an indicator at the edge of the view points to them (and to their cursor) when they are off-screen; two new settings let you stop sharing yours or hide theirs.

Task: NEC-92 — https://projectron.nerchure.com/tasks/92 Collaborators' mouse pointers are drawn in the note, anchored to the character under the mouse (a Y.RelativePosition plus an offset in character widths) so they land on the same word whatever each vault's width, font or wrapping. Sends are throttled to the server's 50 ms relay window and cleared when the mouse leaves; touch sends nothing. When the pointed-at text is off-screen, a named indicator is pinned to that edge and keeps following the other coordinate; collaborators' text cursors get the same indicator, merged into one pill per person per edge. Two settings, both on: 'Share my mouse pointer' (privacy) and 'Show collaborators' mouse pointers' (noise). The look was reviewed with the user over three screenshot rounds and a live try: tip at the middle of the character, name below the line, pointer, name and the text-cursor label see-through at 0.72, a resting pointer fades after 3 s. Only the editor the note is bound to draws or sends pointers, since every editor shares one extension array (SAFE-D5). A fresh-context review found four issues, all fixed here: fades restarting when another marker came or went, un-merging restarting the fade, the status bar no longer repairing itself after a reconnect, and touch covered only by a pure-function test. Adds WIRE-090..093 (docs/v1/protocol/wire.md §10), updates sync-limitations and security-model. Unit rules and the SAFE-D5 guard and fade fix were mutation-checked in both directions. Spec: `docs/changes/NEC-92-collaborator-pointers/spec.md` ## Changelog Collaborators' mouse pointers now show in the note you share, with their name, and an indicator at the edge of the view points to them (and to their cursor) when they are off-screen; two new settings let you stop sharing yours or hide theirs.
A collaborator's pointer is anchored to the character nearest their mouse
(a Y.RelativePosition plus an offset in character widths), throttled to one
send per 50 ms, and drawn in a CodeMirror layer at that character in this
vault's own layout. When the character is beyond the visible part of the
note, a named indicator is pinned to that edge and keeps following the
other coordinate; collaborators' text cursors get the same indicator.

Two settings, both on: "Share my mouse pointer" (privacy) and "Show
collaborators' mouse pointers" (local noise). The presence circles are now
redrawn only when the people change, not on every pointer move.

Task: NEC-92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JncF8zA6jdcmYStXSKQBgH
Changes from the appearance review with the user: the arrow's tip points at
the middle of the character and the name sits below the line just to its
right; pointer, name and the text cursor's label are see-through (0.72);
a person's pointer and caret on the same edge share one pill; the edge
chevron is 16x10 and bottom indicators clear Obsidian's status bar.

Only the editor this note is bound to draws or sends pointers. Every editor
shares one extension array (SAFE-D5), so a background pane showing another
note drew a second, misplaced copy; the two-vault test now opens one to prove
it does not.

The e2e cases hover a word in one vault and find the pointer on the same
word in the other, with the editors set in different fonts and indents, and
cover the bottom edge, scrolling back into view, the caret indicator and
both settings.

Task: NEC-92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JncF8zA6jdcmYStXSKQBgH
Task: NEC-92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JncF8zA6jdcmYStXSKQBgH
Time the pointer fade from the last move, and keep the status bar repairing itself
All checks were successful
Release note / release-note (pull_request) Successful in 14s
CI / build (pull_request) Successful in 4m34s
CI / e2e (pull_request) Successful in 4m52s
CI / promote (pull_request) Has been skipped
Deploy site / deploy (push) Successful in 54s
CI / e2e (push) Successful in 4m53s
CI / build (push) Successful in 4m48s
CI / promote (push) Successful in 29s
bfbd223ea3
From review. CodeMirror matches layer markers to elements by position, so a
marker arriving or leaving ahead of a pointer redrew it as a new element and
restarted its fade: a pointer that rested a minute ago came back. The fade is
now timed from the person's last real move and each element starts at that
point, with a negative animation delay. The two-vault test adds and removes a
marker ahead of a faded pointer and checks it stays faded.

Reporting presence only when the people changed stopped the old repair of
the status bar after a reconnect wrote "Connected" over it. An unchanged set
is reported again once a second.

A touch move in one vault is now checked to draw nothing in the other, and
pointing past the end of a soft-wrapped row anchors to that row's last
character instead of the next row's first.

Task: NEC-92

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JncF8zA6jdcmYStXSKQBgH
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!166
No description provided.