fix(desktop): preserve agent mention boundary in packaged WebKit - #5204
Open
cmyk wants to merge 3 commits into
Open
fix(desktop): preserve agent mention boundary in packaged WebKit#5204cmyk wants to merge 3 commits into
cmyk wants to merge 3 commits into
Conversation
Co-authored-by: Schrödinger’s Cat <62413+cmyk@users.noreply.github.com> Signed-off-by: Schrödinger’s Cat <62413+cmyk@users.noreply.github.com>
Co-authored-by: Schrödinger’s Cat <62413+cmyk@users.noreply.github.com> Signed-off-by: Schrödinger’s Cat <62413+cmyk@users.noreply.github.com>
Co-authored-by: Schrödinger’s Cat <62413+cmyk@users.noreply.github.com> Signed-off-by: Schrödinger’s Cat <62413+cmyk@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
Selecting a managed-agent mention in a packaged macOS build could leave ProseMirror's model and DOM selection correctly positioned after the trailing ASCII space, while WKWebView's next native text insertion crossed back into the decorated mention. Typing immediately after autocomplete could therefore change
@Reinholdinto@Reinholdtest, remove the agent decoration, and silently drop the intended recipient tag.This change:
U+0020separator whose preceding range is authoritatively decorated as an agent mention;Related issue
No exact issue found.
Related but distinct open work:
This PR addresses the packaged-WKWebView native insertion immediately after autocomplete, where the model selection and separator were already correct.
Testing
Automated verification at exact head
51cafdb0d55168aaffafc016bdf0acc585d780d6:git diff --check: passed;Manual acceptance in an isolated packaged macOS candidate:
@Reinholdfrom autocomplete.testproduces@Reinhold test; the mention remains decorated, the separator remains visible, and the caret ends after the inserted text.Before
After