Skip to content

[Frontend/Fix]: Fix commit modal crashes#3977

Merged
bekossy merged 10 commits intomainfrom
fe-fix/prevents-hanging-commit-modal
Mar 13, 2026
Merged

[Frontend/Fix]: Fix commit modal crashes#3977
bekossy merged 10 commits intomainfrom
fe-fix/prevents-hanging-commit-modal

Conversation

@ardaerzin
Copy link
Contributor

Summary

  • Add computeOnMountOnly prop to EntityCommitContent diff viewer
  • Set TextNode mode to "token" for all diff content nodes to prevent normalization
  • Track diff-built state per editor using WeakSet to survive Strict Mode double-mounts
  • Register no-op transforms for TextNode and CodeLineNode to absorb dirty nodes
  • Defer INITIAL_CONTENT_COMMAND dispatch to queueMicrotask to avoid nested updates
  • Mark diff as built before appending to root

jp-agenta and others added 2 commits March 12, 2026 16:19
…ode issues

- Add `computeOnMountOnly` prop to EntityCommitContent diff viewer
- Set TextNode mode to "token" for all diff content nodes to prevent normalization
- Track diff-built state per editor using WeakSet to survive Strict Mode double-mounts
- Register no-op transforms for TextNode and CodeLineNode to absorb dirty nodes
- Defer INITIAL_CONTENT_COMMAND dispatch to queueMicrotask to avoid nested updates
- Mark diff as built before appending to root
@vercel
Copy link

vercel bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Mar 13, 2026 0:40am

Request Review

@ardaerzin ardaerzin marked this pull request as ready for review March 12, 2026 17:40
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 12, 2026
@dosubot dosubot bot added lgtm This PR has been approved by a maintainer bug Something isn't working Frontend labels Mar 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-03-13T12:47:15.900Z

@bekossy bekossy changed the base branch from main to release/v0.94.3 March 12, 2026 18:44
Skip inline diff computation for lines exceeding the truncation
threshold (200 chars). Long lines (e.g. serialized prompts ~4700 chars)
produced massive Lexical TextNodes that froze the DOM reconciler.
Also disable HistoryPlugin for read-only diff views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…egistration

Remove INITIAL_CONTENT_COMMAND dependency from diffHighlight extension.
Build diff content synchronously during registerDiffHighlightBehavior()
using { discrete: true } to force immediate commit. Truncate large
changed segments (>600 chars) to prevent DOM freeze. Remove root
listener and command payload fields (originalContent, modifiedContent,
isDiffRequest).
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 12, 2026
Defer DiffView rendering until after first paint using requestAnimationFrame
to prevent Lexical editor creation from blocking the commit modal shell.
Remove word-level inline diff computation—keep only character-level
prefix/suffix matching for mostly-similar lines. Simplify truncation to
in-place segment shortening instead of adding truncation indicator nodes,
avoiding DOM reconciliation freeze. Increase modified line background
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 13, 2026
Remove Suspense wrapper and lazy import for DiffView component. Import
DiffView directly to eliminate loading skeleton and simplify rendering
path. Comment out diffReady state check and fallback skeleton UI.
Remove lazy and Suspense imports that are no longer needed after removing
lazy loading for DiffView component.
Remove Skeleton import from antd that is no longer needed after removing
loading skeleton UI. Also rename unused diffReady state variable to _.
@bekossy bekossy changed the base branch from release/v0.94.3 to main March 13, 2026 12:13
@bekossy bekossy merged commit 83ca117 into main Mar 13, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Frontend lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants