Repository navigation
fix: repair main's session registry import and isolate the popup Electron fixture - #40074
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
#40067 lets unit files share a worker's module cache. The popup compatibility fixture keeps its Electron app, mock server and temp root at module level, so after the first file the others reuse a closed browser.
8e55d86 to
9484111
Compare
ELI5
Two things broke
mainin the last hour. One PR imports a file from a folder it was just moved out of, somaindoesn't build. Another made test files share loaded code, and the browser popup tests share a fixture that can't be shared, so they reuse an already-closed browser. This fixes both.What Changed
browser-extension-commands.ts(and its test's mock) now importbrowser-session-registryfromsessions/profiles/. refactor(browser): organize automation, cookies and session policy owners #40002 moved the file there, and feat(cli): list and reload installed browser extensions #39613 landed after it with the old path. Since thenmainfails typecheck, the Electron main build and every test that loads the module.browser-popup-compatibility-cdp-fixture.tsgets// @orca-isolated-worker. test: share a worker's module cache across unit files that can be reset between files #40067 lets unit files share a worker's module cache, and this fixture keeps its Electron app, mock server and temp root at module level. In CI's "Test Linux Electron lifecycle boundary" step,browser-popup-compatibilityandbrowser-popup-native-compatibilitythen fail with "Target page, context or browser has been closed" and a missingstatus.json. The marker is the opt-out test: share a worker's module cache across unit files that can be reset between files #40067 documents, and it isolates all four files that import the fixture.Why
Together these are why every PR's CI is red right now. The import is the only stale one (
grepfinds no others). Isolating the fixture matches how it's written, one Electron app per file, rather than reworking it to survive a shared cache.Linked Issue
N/A, build and test breaks on
main.Visual Proof
N/A, no visible change.
Testing
pnpm tcandpnpm lintpass.browser-extension-commands.test.tsandbrowser-process-user-agent-ordering.test.ts, which failed in CI on the bad import, pass. RunningfilesSafeToShareWorkeron the popup tests now lists the four fixture users as isolated and the rest as shared. I didn't run the Electron popup tests locally; CI's Linux step covers them. No new tests.Risk
Low. The import is a path fix. The four popup files go back to one worker each, as before #40067, so the Linux Electron step is a few seconds slower. A revert brings both breaks back.
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)