Skip to content

fix: keep a right-click from opening a terminal link and log page load stages - #1837

Merged
yansfil merged 5 commits into
mainfrom
fix/flaky-windows-browser-load
Oct 29, 2026
Merged

yansfil merged 5 commits into
mainfrom
fix/flaky-windows-browser-load

Conversation

@yansfil

@yansfil yansfil commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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 loading for 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 one opens(event) check, which refuses only the right button.
  • 조심해서 볼 파일: desktop/src/main/browser.ts - each load() holds its own CoreLoad; a commit counts only after its own loadURL, its stop is that call's promise, a newer load or failed route ends it; three lines per core-asked load.

Per issue

Evidence

  • 확인한 것: web unit test that a right-click's release opens no link fails without the fix and passes with it.
  • 확인한 것: macOS desktop e2e 1/2 failed once fetching the pinned Herdr (curl: Failed to connect to github.com); its rerun passed.
  • 확인한 것: desktop unit tests: a reopen waiting for its route while the earlier load commits and stops, two checkouts' same id and load told apart by contents, a failed route then a page navigation; all three fail on the previous code.
  • 확인한 것: web unit tests: right button opens nothing, primary and middle open; ⌘-click on macOS, Ctrl-click on Windows/Linux still open externally.
  • 확인한 것: Windows desktop e2e 19/19, no flaky test, in three runs: PR verify 40852660304 and nightly lane=windows 40857562866 on e09dc15, PR verify 40873166675 on 1b89a27 (all jobs green).
  • 확인하지 못한 것: the stage of the stuck first load: neither Windows run reproduced it; the issues say how to read the next failure.
  • 확인하지 못한 것: nightly 40857562866 failed agent journey fake model (windows) on guidance_memory; untouched by this diff, passed on main's 10-28 nightly, not checked on current main.
  • 확인하지 못한 것: the full web unit suite locally (67 failures at load average ~300 on this Mac, not read); CI's web unit lane passed on 1b89a27.
Verification record

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.
@yansfil yansfil changed the title fix: open terminal links on the primary button and log page load stages fix: keep a right-click from opening a terminal link and log page load stages Oct 29, 2026
@yansfil
yansfil merged commit fce23c3 into main Oct 29, 2026
68 checks passed
@yansfil
yansfil deleted the fix/flaky-windows-browser-load branch October 29, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant