Skip to content

[GIT-409] fix(editor): skip upload status sync on a destroyed editor - #10267

Merged
sriramveeraghanta merged 1 commit into
previewfrom
fix/git-409-intake-duplicate-crash
Nov 12, 2026
Merged

sriramveeraghanta merged 1 commit into
previewfrom
fix/git-409-intake-duplicate-crash

Conversation

@b-saikrishnakanth

@b-saikrishnakanth b-saikrishnakanth commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Marking an intake item as a duplicate crashed the whole page with Cannot read properties of null (reading 'commands').

Marking a duplicate makes the description read-only, so useEditor rebuilds the editor (it depends on editable). Effects then ran once more on the old, destroyed instance, and Tiptap v3 clears that instance's command manager and extension storage.

Changes in packages/editor/src/hooks/use-editor.ts:

  • Upload-status effect: returns early when the editor is destroyed. This is the crash in the report.
  • Content-sync effect: checks isDestroyed before reading editor.storage.utility, which is reset to {} on a destroyed editor and would throw on destructuring.

The new editor instance re-runs both effects, so content sync and upload status still apply to it.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots and Media (if applicable)

N/A

Test Scenarios

  • Enable Intake on a project → open a pending intake item → ⋯ → Mark as duplicate → pick a work item → the page keeps working, the item shows "Duplicate of …" with a read-only description, and a reload renders it
  • @plane/editor type check and build pass

References

  • GIT-409

Summary by CodeRabbit

  • Bug Fixes
    • Improved editor synchronization when the editor is unavailable or has been destroyed, and when upload-status storage is missing.
    • Prevented asset-upload status updates from running on a destroyed editor.

@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c25f38e.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

External-value synchronization now tolerates missing utility storage and skips destroyed editors. The asset-upload-status effect also skips destroyed editors.

Changes: Editor effect guards

Layer / File(s) Summary
External-value and upload-status guards
packages/editor/src/hooks/use-editor.ts
External-value synchronization treats missing utility storage or uploadInProgress as no upload in progress. Both effects return when the editor is destroyed.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Suggested reviewers: sriramveeraghanta

Merge Risk: Minimal · up to c25f3

The change prevents a crash when an editor is rebuilt, such as after an intake item is marked as a duplicate. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: skipping upload status sync on a destroyed editor, which matches the use-editor.ts effect changes that return early when the editor is destroyed. It also includes the …
Description check Passed The description follows the template. It explains the root cause (read-only toggle rebuilds the editor, and effects run on the destroyed instance), lists both changes in use-editor.ts, sets the Type o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: skipping upload status sync on a destroyed editor, which matches the use-editor.ts effect changes that return early when the editor is destroyed. It also includes the ticket ID and conventional-commit prefix, which is acceptable.

Full details: Description check

Explanation

The description follows the template. It explains the root cause (read-only toggle rebuilds the editor, and effects run on the destroyed instance), lists both changes in use-editor.ts, sets the Type of Change to Bug fix, gives test steps and a reference to GIT-409. Screenshots is marked N/A. The template's Description and Type of Change sections are present and complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1d2304a-e1d5-40b4-b104-f26958745814
Commits

Reviewing files that changed from the base of the PR and between 0b9ca51 and c25f38e.

Files selected for processing: 1

  • packages/editor/src/hooks/use-editor.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@makeplane

makeplane Bot commented Nov 12, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@sriramveeraghanta
sriramveeraghanta merged commit 9cefae8 into preview Nov 12, 2026
14 checks passed
@sriramveeraghanta
sriramveeraghanta deleted the fix/git-409-intake-duplicate-crash branch November 12, 2026 15:11
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.

3 participants