Repository navigation
fix: keep a right-click from opening a terminal link and log page load stages - #1837
Merged
Merged
Conversation
xterm activates a link on the release of any button, and on Windows the right-click menu opens after that release, so a right-click on a link also opened it beside the menu: a folder link revealed its folder and an HTML link loaded its page again. Only the primary button now opens a link, for detected links and OSC 8 links alike. Closes with-hide/hide-private#252
A first page that stayed loading on Windows CI left no line saying where its load stopped. Each load the core asks for now writes when hided answered its route, when its document committed and when it stopped, with the display, the load stamp and the time since it was asked. The browser spec's first open records each native page's own load state and which pages Playwright has taken when its wait gives up.
A reopen that waited for its route took the commit and stop of the load before it, which then cleared it, so its own stages went unlogged and read as a route that never answered. Each load the core asks for now holds its own record: a commit counts only after its own loadURL call, its stop is that call's settled promise with its outcome, and a newer load or a failed route ends it. Every stage also names the native page's contents id, since a display id repeats across checkouts.
Only the right button's release, which opens the link's menu, is kept from opening the link; the middle button opens it as before.
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.
Closes with-hide/hide-private#252
Related: with-hide/hide-private#221, with-hide/hide-private#171, with-hide/hide-private#135, with-hide/hide-private#207, with-hide/hide-private#216
Summary
On Windows a right-click on a terminal link also opened the link, beside the menu: a folder link revealed its folder and an HTML link loaded its page again.
xterm opens a link on the release of any mouse button, and on Windows the right-click menu appears after that release; now a right-click opens only the menu, and the primary and middle buttons open links as before.
Separately, the first page a test opens on Windows sometimes stays
loadingfor the whole 10 s--wait, and nothing said where it stopped.Each load the core asks for now logs when its route came, when it committed and when its own load call settled, against that load alone, with the display, the native page id and the time; the browser spec records the native page's own state when that first wait gives up.
스크린샷 없음: the shell change is which mouse button opens a terminal link; nothing drawn changes.
Review
web/src/terminalLinkProvider.ts- both link paths (detected and OSC 8) go through oneopens(event)check, which refuses only the right button.desktop/src/main/browser.ts- eachload()holds its ownCoreLoad; a commit counts only after its ownloadURL, its stop is that call's promise, a newer load or failed route ends it; three lines per core-asked load.Per issue
browser_open, which a right-click activation adds on Windows every run.--waitopen staysloading, status 2): cause not proven yet. Host log showsview_created/page_visiblethen nothing for 10 s, no route or load failure; core log has no stale-report refusal, so the core gotloadingand neverloaded. Only the first page of a fresh profile fails. This PR adds the evidence that names the stage.shellPage30 s infixture.ts, is the desktop startup flake handled by the flaky2-win-desktop change.Evidence
curl: Failed to connect to github.com); its rerun passed.contents, a failed route then a page navigation; all three fail on the previous code.lane=windows40857562866 on e09dc15, PR verify 40873166675 on 1b89a27 (all jobs green).agent journey fake model (windows)onguidance_memory; untouched by this diff, passed on main's 10-28 nightly, not checked on current main.Verification record
lane=windows40857562866: desktop and web e2e green,agent journey fake model (windows)failed onguidance_memory, outside this diff.terminalLinkProvider.test.ts43 passed;browser.test.ts26 passed.