Prevent stuck positronHelpFocused context key from hijacking copy#13158
Open
juliasilge wants to merge 3 commits intomainfrom
Open
Prevent stuck positronHelpFocused context key from hijacking copy#13158juliasilge wants to merge 3 commits intomainfrom
positronHelpFocused context key from hijacking copy#13158juliasilge wants to merge 3 commits intomainfrom
Conversation
|
E2E Tests 🚀 |
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.
Addresses the part of #9364 that is about Positron Help focus, not about the upstream problem
The
positronHelpFocusedcontext key can apparently sometimes get stuck attruewhen the Help webview'sonDidBlurevent fails to fire (pane collapse,release()withretainContextWhenHidden, iframe navigation races). With the key stuck true, Cmd/Ctrl+C resolved topositron.help.copyinstead of the normal copy command. This breaks user copy/paste anywhere in the workbench until a new help page was loaded to "jiggle" the focus cycle back into alignment. I still have not been able to reproduce the problem myself, so the changes in this PR are somewhat speculative.The PR does two things:
positronHelpFocusedtofalseinHelpEntry.dispose()andHelpEntry.hideHelpOverlayWebview(), independent of whether the webview fires blur.ILogService, tagged[positronHelpFocused]. Logs land in the Window output channel and are captured in diagnostic reports. If people still have trouble moving forward, we can hopefully diagnose the underlying root cause a bit better moving forward.A follow-up could switch the focus tracking to
DOM.trackFocus()on the Help container (the pattern the Consoleuses) to eliminate the failure mode entirely but this PR is just a minimal mitigation plus the data we'd need to justify a larger change.
Release Notes
New Features
Bug Fixes
QA Notes
@:help @:web @:win
?lm(R) orhelp(print)(Python). Confirm the help page renders in the Help pane.[positronHelpFocused]lines on focus transitions, e.g., "webview.onDidFocus: false -> true" and "webview.onDidBlur: true -> false".?lmthen?glm). Confirm each entry renders and logs show clean focus/blur cycles.