Repository navigation
fix(extensions): honor transient popup dismissal - #35360
Merged
OrcaWin merged 3 commits intoOct 29, 2026
Merged
Conversation
This was referenced Oct 28, 2026
OrcaWin
force-pushed
the
OrcaWin/extension-action-popup-close-veto-independent
branch
from
October 29, 2026 01:48
29d7927 to
d75f4d0
Compare
OrcaWin
marked this pull request as ready for review
October 29, 2026 01:48
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAction popups now use
Reviews (1) · Last reviewed commit: "test(extensions): cover action popup clo..." · Reviewed by Greptile |
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.
An extension action popup can veto BrowserWindow.close() through beforeunload after Orca has already cleared its owner. Repeated toggle/replace actions then leave live, untracked native popup windows. Permit the existing close sequence to proceed when these transient popups emit will-prevent-unload.
The handler reuses the guest
allowPageUnloadpolicy and is registered only on each action popup's own WebContents (a fresh BrowserWindow per open, so it never reaches tabs, the main window or other extension pages, and it goes away with the popup). Normal beforeunload and unload callbacks still run. Existing close routing, replacement identity checks, geometry and ordinary browser/main-window policies use their current implementations. This defect is pre-existing since #30940.Real hidden Electron 43.8.1 windows with a locally loaded MV3 extension reproduce 1/1 and 10/10 abandoned popup windows on base; the change leaves zero and observes all 1/10 normal unload callbacks. Seven native scenarios cover healthy close, toggle, replacement identity, and the actual registered Escape/blur handlers. Five regression postconditions fail on base and pass with the proposal. Escape/blur are controlled event emissions; physical keyboard/focus delivery is not claimed. Both native arms exit 0, remove owned profiles/descendants and leave zero windows.
In-repo coverage: the native toolbar fixture (
browser-extension-toolbar.electron.test.ts, real hidden Electron) now opens a popup whose page vetoes unload after a user gesture and asserts the popup window is destroyed on dismissal. It fails on base (popup never closes) and passes with the handler. The 1/10 abandoned-window counts above come from out-of-tree audit artifacts, not from in-repo tests.ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2passed on the author head before review (19/19 checks, 385.9s, 29d7927 vs bbd635e). It was re-run on the rebased head with the reuse refactor and test: 21/21 checks passed in 930.7s on d75f4d0 (vs origin/main 601bf63), with the Linux native fixture on an isolated Xvfb display.The native proof uses the actual popup-host module with a real hidden parent and a presentation seam that forbids showing or focusing windows. It is lifecycle evidence, with no rendered Orca flow/screenshot, CPU, heap-byte, latency, visible desktop or native macOS/Windows claim. The change has no remote wire, mobile or git/folder-workspace assumptions.
Evidence:
/home/neil/.local/state/orca-electron-audit/extension-action-popup-close-veto-candidate/report.md, before/after results, source manifests and artifact seal; author validation logs and commit bundle inimplementation/.