Repository navigation
fix(browser): import cookie files into client-hosted sessions - #29054
oliver-mee wants to merge 9 commits into
Conversation
Route desktop file imports to the paired environment partition using the existing native-browser import safeguards. Reject non-client-hosted targets and connection changes without falling back to the local profile jar.
…wser-profile-parity
…wser-profile-parity
|
Updated against main 506aa03 in 06b53aa. All 38 focused tests and both Node and renderer typechecks pass again. The native partition regression checks that imports reach the client route partition without touching the local profile jar. This stays draft pending the before/after interaction evidence. No cookie policy or Google-import exclusion was changed. |
|
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5381051f-22f2-4653-8550-ca3115aefc6b
📒 Files selected for processing: 10
src/main/browser/browser-client-route-cookie-import-partition-parity.test.tssrc/main/browser/browser-client-route-cookie-import.test.tssrc/main/browser/browser-client-route-cookie-import.tssrc/main/ipc/browser-session-profile-ipc.test.tssrc/main/ipc/browser-session-profile-ipc.tssrc/preload/api/browser-api.tssrc/preload/api/browser-bridge-page-interaction-and-sessions.tssrc/renderer/src/store/slices/browser-session-profiles.test.tssrc/renderer/src/store/slices/browser/browser-profile-import-actions.tstests/e2e/paired-client-hosted-cookie-file.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
…wser-profile-parity
ELI5
A paired desktop can host a remote session's browser locally, but importing a cookie file is still rejected just because a remote runtime is selected. This lets that import reach the browser's actual cookie jar.
What Changed
The renderer passes the selected environment to the existing desktop cookie-file picker. Main resolves the client-hosted route partition and uses the same importer as native-browser imports.
The import checks the connection and partition binding after the picker closes and after import finishes. Cancellation stays cancellation. Unsupported hosting modes fail explicitly instead of falling back to a desktop-local profile jar.
A server-owned profile missing from the desktop catalogue is accepted only when its main-derived partition already belongs to an authorised active route. Unknown profile IDs without that route are rejected before opening the picker.
Why
Matching profile names do not imply matching cookie jars. Reusing the route importer keeps authority, execution host and profile isolation intact. Existing local imports remain unchanged when no environment is supplied. Cookie filtering and Google exclusions are unchanged.
Linked Issue
Fixes #29052
Visual Proof
Automated paired Electron evidence from the combined integration checkout, not the standalone PR head or installed app. A synthetic page reports the cookie received by its HTTP server before and after import.
The test invokes the shipping profile-store action and preload importer. Only the native file chooser is replaced with a synthetic JSON file. It also checks the desktop-local profile partition contains no imported cookie. This is not a manual Settings-button or OS file-picker acceptance test.
Testing
October 25 refresh: merged current
mainat1d2b5361efa7851e95c4b24e5a9b298863f8fb7b, preserving the existing contribution history. Current head644ebf02e5cec1c7f81212ec7ce22f76225e9649passes 45 tests across client-route imports, partition parity, profile IPC and profile-store suites, the Node native typecheck and scoped lint/format checks. Kept upstream’s cookie-module relocation and partition-binding alias handling. Earlier paired application acceptance below belongs to its recorded earlier head and was not repeated for this refresh. Substantive upstream CI remains subject to maintainer approval.On macOS, submitted head
759d8b6c1, refreshed against upstreamba6599eab:git diff --checkpassed for the latest importer changes.paired-client-hosted-cookie-file.spec.tspassed on the first attempt with retries disabled (20.3 seconds for the test). It proves guest-cookie delivery and desktop-local jar isolation on this submitted head.Earlier combined-checkout screenshot evidence passed on retry and Playwright reported 1 flaky, because its first attempt failed during paired-tab creation before reaching import. Those screenshots remain integration evidence, not new final-head visual proof. The new first-attempt pass does not establish that the intermittent startup issue is fixed. The earlier Linux run peaked at 790 MiB with zero swap under a 1 GiB cap; that resource measurement does not describe the new macOS run. Acceptance runs use isolated homes and profiles.
The partition regression compares manual/native imports with an actual paired-server page's partition and distinguishes nested SSH/WSL ownership. It does not launch an installed application. Windows, packaged builds and full UI interaction remain unverified. Full repository lint/test/build were not run.
AI Disclosure
OpenAI GPT-6.1 Sol implemented and tested this change under human direction.
Review
Please check route ownership and connection-change guards in particular. This does not implement profile switching or duplicate #22813's annotation work.
Agent skill upstream boundary
Notes
Upstream validation for
759d8b6c1ais waiting for maintainer approval: PR Checks. Focused local evidence above remains unchanged; no substantive current-head CI pass is claimed.The optional environment field preserves existing local callers. Only client-hosted environments are accepted for remote imports. No arbitrary remote path is read from the desktop.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with GPT-6.1 Sol
🧑💻 Ideated, directed and reviewed by a human, @oliver-mee