Skip to content

fix: prevent Tapwrite IndexSizeError when syncing content while focused - #1442

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-4157-cursor-automated-triage-response-9249
Draft

fix: prevent Tapwrite IndexSizeError when syncing content while focused#1442
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-4157-cursor-automated-triage-response-9249

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Gate external Tapwrite content prop updates on editor focus state in TaskEditor and TemplateDetails
  • Track description editor focus via onFocus / onBlur so realtime/redux body updates do not call Tapwrite setContent while the user still has the editor focused

Fixes TASKS-A5 / OUT-4157

Testing Criteria

  • Verified root cause via Sentry stack trace (ProseMirror selection sync after Tapwrite setContent while editor focused)
  • Code review of Tapwrite content sync behavior in tapwrite@1.2.0
  • Lint clean on modified files
  • Manual repro (recommended before merge): open a task detail, focus the description editor, pause typing, trigger a realtime body update from another session/tab — editor should no longer throw IndexSizeError; after blur, external content should sync

Notes

  • Existing isUserTyping guard was insufficient because typing can stop while focus remains in the editor

Impact & Surface Area of Change

  • Task detail description editor (TaskEditor)
  • Template details description editor (TemplateDetails)
  • No API or data model changes
Open in Web View Automation 

Fixes TASKS-A5

When a realtime update changes task body while the Tapwrite editor
still has focus, Tapwrite calls setContent and ProseMirror tries to
reconcile a stale DOM selection, causing IndexSizeError on collapse.

Gate external content updates on editor focus state in TaskEditor and
TemplateDetails.

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tasks-app Ready Ready Preview Sep 4, 2026 7:08pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

OUT-4157

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant