Skip to content

feat(documents): live-cursor presence heartbeat is unbuilt #78

Description

@Adron

Deferred from PR #70 (G24), recorded during the 2026-09-13 tracker reconciliation.

Scope

Two routes the Documents feature does not call:

  • POST /api/documents/{id}/presence — announce/refresh presence
  • DELETE /api/documents/{id}/presence — clear it

These back the web's live-collaborator indicator on a shared document.

Why it was deferred

G24's acceptance criteria were the tree, public documents, create-in-folder and move-to-folder. Presence is a genuinely separate feature with its own lifecycle problems, and bolting it onto that PR would have widened the review for no gain.

What makes this more than two calls

The routes are trivial; the lifecycle is where the work is:

  • Heartbeat cadence — how often to POST, and what the server's expiry window is. Unknown; needs a probe or a backend answer.
  • Teardown on every exit path — closing the editor, closing the window, quitting, sleeping, losing the network. A missed DELETE leaves a ghost collaborator on other people's screens, which is worse than showing nobody.
  • App lifecycle — presence should stop when the app is backgrounded or the machine sleeps, not keep announcing a user who walked away.
  • Read model — presence is only useful if the client can also read who else is present; confirm which route supplies that before building the write half alone.

Suggested sequencing

Worth doing after the account cluster (#44/#47/#46/#45), not before. It is polish on a collaboration surface whose more basic gaps are already tracked, and it is the kind of feature that looks broken when half-built.

Acceptance

  • Presence announced on open, refreshed on a confirmed cadence, cleared on every exit path including crash-adjacent ones.
  • Other collaborators render from the read side.
  • A ghost-presence regression test: force-quit mid-session, assert the entry expires.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparityWeb-parity gap with the InterlinedList web app

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions