Repository navigation
Clear Google cookies from a browser profile, as often as you need - #34158
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ce193ec2-e59a-4432-b9f5-18a063a8bde6
Files ignored due to path filters: 1-
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
Files selected for processing: 34-
config/scripts/ci-unit-files.mjssrc/main/browser/browser-client-route-cookie-import.tssrc/main/browser/browser-google-cookie-clear-target.test.tssrc/main/browser/browser-google-cookie-clear-target.tssrc/main/browser/cookies/browser-google-cookie-clear.electron.test.tssrc/main/browser/cookies/browser-google-cookie-clear.test.tssrc/main/browser/cookies/browser-google-cookie-clear.tssrc/main/ipc/browser-google-cookie-clear-ipc.tssrc/main/ipc/browser-session-profile-ipc.test.tssrc/main/ipc/browser-session-profile-ipc.tssrc/main/orcad/electron-sidecar-method-routing.tssrc/main/runtime/browser/browser-commands.tssrc/main/runtime/browser/browser-profiles.tssrc/main/runtime/rpc/methods/browser-profile-rpc-methods.tssrc/main/runtime/runtime-edge-command-controller.tssrc/preload/api/browser-api.tssrc/preload/api/browser-bridge-page-interaction-and-sessions.tssrc/renderer/src/components/BrowserCookieImportDisclosure.tsxsrc/renderer/src/components/browser-cookie-import-google-disclosure.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserImportHintButton.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserToolbarMenu.tsxsrc/renderer/src/components/settings/BrowserProfileRow.google-cookie-clear.test.tsxsrc/renderer/src/components/settings/BrowserProfileRow.tsxsrc/renderer/src/components/settings/BrowserUseCookieImportStep.tsxsrc/renderer/src/components/settings/BrowserUsePane.test.tsxsrc/renderer/src/components/use-google-cookie-clear.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/browser-cookie-import-toast.test.tssrc/renderer/src/lib/browser-cookie-import-toast.tssrc/renderer/src/lib/browser-google-cookie-clear.test.tssrc/renderer/src/lib/browser-google-cookie-clear.tssrc/renderer/src/web/preload-api/web-browser-api.tssrc/shared/browser-google-cookie-clear.tssrc/shared/browser-runtime-capabilities.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9408a6c9-253d-409c-828a-7d41cc182d2a
Files ignored due to path filters: 1-
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
Files selected for processing: 43-
.github/workflows/pr.ymlconfig/scripts/pr-package-test-paths.mjssrc/main/browser/browser-client-route-cookie-import.tssrc/main/browser/browser-google-cookie-clear-target.test.tssrc/main/browser/browser-google-cookie-clear-target.tssrc/main/browser/cookies/browser-google-cookie-clear.electron.test.tssrc/main/browser/cookies/browser-google-cookie-clear.tssrc/main/host/electron-browser-commands.tssrc/main/ipc/browser-session-profile-ipc.tssrc/main/orcad/__fixtures__/fake-orcad-electron-sidecar.cjssrc/main/orcad/electron-serve-browser-process.test.tssrc/main/orcad/electron-serve-browser-process.tssrc/main/orcad/external-chromium-browser-process.integration.test.tssrc/main/orcad/orcad-browser-provider.test.tssrc/main/orcad/orcad-browser-provider.tssrc/main/orcad/orcad-browser-startup.tssrc/main/runtime/browser/browser-command-contracts.tssrc/main/runtime/browser/browser-profile-rpc-test-fixture.tssrc/main/runtime/browser/browser-profiles-client-placement.test.tssrc/main/runtime/browser/browser-profiles.tssrc/main/runtime/orca-runtime-get-status.tssrc/main/runtime/orca-runtime-tests/browser-capabilities.spec.tssrc/main/runtime/rpc/methods/browser-profile-rpc-methods.tssrc/main/runtime/runtime-browser-commands-factory.tssrc/main/runtime/terminal/driver/terminal-driver-resources.tssrc/renderer/src/components/browser-cookie-import-google-disclosure.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserImportHintButton.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/BrowserToolbarMenu.tsxsrc/renderer/src/components/settings/BrowserProfileRow.google-cookie-clear.test.tsxsrc/renderer/src/components/settings/BrowserProfileRow.tsxsrc/renderer/src/components/settings/BrowserUseCookieImportStep.tsxsrc/renderer/src/components/settings/BrowserUsePane.test.tsxsrc/renderer/src/components/use-google-cookie-clear.tssrc/renderer/src/lib/browser-cookie-import-toast.tssrc/renderer/src/lib/browser-google-cookie-clear.tssrc/renderer/src/runtime/runtime-compatibility-test-fixture.tssrc/renderer/src/store/slices/browser/browser-cookie-import-actions.tssrc/renderer/src/store/slices/browser/browser-profile-list-actions.tssrc/renderer/src/store/slices/browser/browser-slice-contract.tssrc/shared/browser-google-cookie-clear.tssrc/shared/browser-workspace-types.tssrc/shared/rpc-contract/browser-params.tssrc/shared/runtime-browser-contracts.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Major · Clearing Google cookies leaves a pending legacy staged… · browser-google-cookie-clear.ts:49-52
src/main/browser/cookies/browser-google-cookie-clear.ts:49-52
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftClearing Google cookies leaves a pending legacy staged image unchanged, so cleared cookies return on restart.
clearGoogleCookiesFromPartitionremoves Google cookies only from the live Session. It does not update a pending staged image. When a legacy string stage is pending, startup runscopyFileSync(stagedPath, liveCookiesPath)before it consumes the stage. The staged image still contains the pre-clear Google cookies, so they return after restart.The Linux Electron lifecycle job runs this path directly.
.github/workflows/pr.yml:1085-1094invokes Vitest onsrc/main/browser/cookies/browser-google-cookie-clear.electron.test.ts. That test expects the restarted cookie names to equal the post-clearafternames, so the same failure can block this CI workflow.The correction belongs at the clear boundary in production code, not in the test. The test assertions already state the intended contract: the pending state is preserved, and only
other,other-under-google,suffix-trap, andyoutuberemain after restart. The clear must also remove Google cookies from the pending legacy stage, and it must keep other-site cookies in that stage. A safe diff is not shown because the staging module API that would perform this update was not inspected.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1cc16da8-0c3b-4e6b-90a3-08a308aff7e3
Files selected for processing: 2-
src/main/orcad/electron-serve-browser-process.test.tssrc/main/runtime/browser/browser-profile-rpc-test-fixture.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.
-
|
Round10 — copy-only continuation reviewed on d5187b9. The two-line diff changes only the Google Cookies caption and matching English translation. Continued review accepted its accuracy against the existing import policy, identical TSX/default catalog wording and absence of obsolete caption assertions. No wording or behavior was changed by the loop. Final-head CI has53 successful checks and13 skips; the lane owner’s checks watch exited0. New caption:
QA carry: d5187b9 changes only copy on the Settings tests-row surface; deletion, targeting, confirmation, layout and remote behavior are unchanged. Brennan explicitly instructed on10-28: “Don't retake screenshots just tell me the new wording.” No QA rerun or new screenshots were taken. Round9 row/confirmation screenshots on8591 and the earlier selective-clear/repeat/restart evidence onf67 remain the evidence; the images below predate this caption update. The marker names reviewed head d5187b9 and retains the existing functional qa_head. Google can get stuck on an old account in Orca, and importing browser cookies does not replace that sign-in. This PR adds one Google Cookies row below Settings → Browser → Session & Cookies. It explains when to clear, with a red action on the right that asks for confirmation and clears only Google cookies from the selected Host’s Active profile. Other sites stay signed in. The full review loop and settled design rulings are complete, with no open P0/P1 findings. Continued correctness/consumer review accepted the latest 0a14dcc presentation revision: spacing, heading, caption and destructive button; English and localized search aliases and disabled/unavailable behavior are preserved. The owner reports the named renderer suite passed13/13 and the normal pre-commit hook passed. Final-head CI passed via one Fresh dark-theme screenshots on8591c69c9669a12bd7474fb9844dc075bc8ae100 cover the revised row and its confirmation dialog. Earlier actual clear/repeat evidence onf67d63c70fec234171c4b06611f471065bc0c910 carries: Cancel preserved both synthetic cookies; clear removed Google and retained every metadata field of the other-site cookie; repeat displayed “No Google cookies to clear in Default.” Browser Use and profile import menus have no clear action. Backend/restart fixture evidence, including legacy staged-image refusal after graceful restart, carries unchanged. Tests-row carry: efdc2aa changes Settings search metadata and its localized assertion;0a14dcc changes only this Settings presentation and its heading assertions. The two fresh screenshots supersede the old section/confirmation appearance. Main merges c8965fd (conflict refresh) and8591c69c9669a12bd7474fb9844dc075bc8ae100 (#34929 repair of main’s CI max-lines failure) preserve the reviewed Google behavior; prescribed merge hooks passed. Intended differences from the common pattern follow the approved Google-only clear, explicit confirmation, selected Host/Active profile and mixed-version ownership/capability rulings. No deferred issue blocks this scope. Evidence limits remain: opaque partition-key seeding is unverified, and optional extra toast DOM-bracket files were not retained; actual result screenshots, semantic waits and full-metadata cookie comparisons were reviewed, without reconstructing missing snapshots. For Brennan’s review — revised row: Confirmation names the profile: |
…ns when to use it
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds a repeatable Google-only cookie clear under Settings → Browser → Session & Cookies.
No actionable issues were found. No tests or UI captures were run during this review.
|


Google sign-in can get stuck on an old account in Orca, and importing browser cookies does not replace that sign-in. This adds one “Google Cookies” section at the bottom of Settings → Browser → Session & Cookies. Its “Clear Google cookies…” button asks for confirmation, then clears Google cookies from the Active profile on the selected Host. Other sites stay signed in.
Before: Settings has no repeatable Google-only clear. After: one button below the Host/profile controls explains why Google sign-ins are not imported and offers a Google-only reset. Import menus, the Browser Use cookie step and the import warning retain the existing Google notice without a clear action.
The Host, profile and pairing are frozen when the button is pressed. A changed pairing, retired route or replaced executor refuses the stale action rather than switching jars. It never falls back to clearing all cookies. Unsupported remote hosts show a disabled button with a short reason; existing profile invalidations refresh availability when routes change. No new saved setting or wire field. The legacy staged-image replay protection from #34113 is included.
Intended differences from the common pattern: Google-only deletion, confirmation for each clear, selected Host’s Active profile and mixed-version capability/ownership checks follow the approved product rulings.
UI
Dark theme, one Default/Active profile: Google Cookies below the profile controls, with added space, a why-first caption and the red action on the right:
Confirmation names the profile and explains the Google-only sign-out:
Browser Use’s Import menu keeps the existing note and has no clear action:
Settings profile’s Import menu also keeps its original note without a clear action:
Earlier functional run, before the presentation update — clear result: screenshot
Earlier functional run — empty repeat: screenshot
Validation
gh pr checks 34158 --watch --fail-fast --interval 60on8591c69c9669a12bd7474fb9844dc075bc8ae100 (workflow); the watch exited0, including static analysis/typecheck and all five Node test shards.Tracked in STA-4398.
The Google Cookies presentation update was accepted by continued correctness/consumer review: both English and localized search aliases remain intact, the unavailable reason stays under the caption and the existing confirmation/target behavior is preserved. The owner reports the named section suite passed13/13 and its normal hook passed. Fresh dark-theme row/confirmation screenshots are on 8591c69; prior selective-clear/repeat and restart evidence carries because those operations are unchanged.