Repository navigation
fix(chat): prevent preview link DOM mutation loops - #193
Merged
Merged
Conversation
Replace the view-update nodrag patch with Milkdown's native linkAttr configuration so ProseMirror owns link rendering. Preserve current navigation and drag behavior. Add bounded Chromium regressions for initial and updated content in read-only and drag-only previews, and document the rendering contract. Fixes microsoft#192.
Yuqing (mydmdm)
added a commit
that referenced
this pull request
Sep 16, 2026
Include the ChatPanel link mutation fix from #193. Follow main's frontend restore behavior while retaining server-owned Agent Node lifecycle and association safeguards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #192.
nodragon every ProseMirror view update.linkAttrinstead, preserving inherited attributes and letting ProseMirror render the class. Add the existing commonmark package as a direct dependency; no editor version upgrade.Why
In editable drag-only Chat previews, post-render link attribute writes feed ProseMirror's DOM observer back into the plugin and can monopolize the main thread. Initial linked history and links introduced by later content updates both trigger the defect. A class-presence guard was insufficient in the production-factory browser reproduction, so this change removes the post-render DOM writes entirely.
Validation
classList.add(nodrag)calls occur.pnpm typecheck,pnpm format, andpnpm lint:fixpassed (0 lint errors, 271 warnings).git diff --checkpassed.Scope
This is an independent bugfix based on main; #191 is already merged. It does not change link click policy, cursors, navigation destinations, double-click handling, or block dragging. Chat/Note interaction unification, canvas Cmd/Ctrl-click navigation, and the editable Note link hover/edit UI are follow-up work, not part of this PR.