Skip to content

Link marker flicker during typing — overlay pauses but ResizeObserver + CRDT sync still trigger redraws #180

Open

Description

@jonesd

While typing new content below existing linked passages, the link markers above flicker on/off and the Comment/See Also descriptor boxes redraw repeatedly.

Root cause: the overlayPausedRef mechanism pauses canvas redraws during typing (resumes 400ms after last keystroke), but:

  1. ResizeObserver fires when content height changes (every new line)
  2. CRDT sync triggers marker recomputation on every text delta
  3. The 400ms resume timeout is too aggressive — still typing when it resumes

Fix directions:

  • Debounce the ResizeObserver during active typing
  • Defer marker recomputation until typing pause
  • Increase the resume timeout or make it activity-aware
  • Batch redraws: only redraw once per animation frame, not per event

Found during first-user walkthrough.

Activity

  1. added
    bug
    first-user
    on Sep 13, 2026
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

    bugfirst-user

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions