Skip to content

feat(browser): Google direct sign-in notice after cookie imports (STA-3811) - #13666

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/sta-3811-import-google-notice
Aug 12, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/sta-3811-import-google-notice

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#13966 owns Google-cookie exclusion, clearing, import accounting, and the separate warning toast. This PR adds the remaining profile-aware recovery UX:

  • When an active workspace exists, the Google warning offers “Sign in to Google” and opens accounts.google.com in the exact profile that received the import.
  • Browser creation follows the active workspace runtime, including remote/SSH sessions.
  • Without an active workspace, the warning remains guidance-only: “Open a browser in Orca with this profile, then sign into Google.”
  • A failed or rejected browser-tab creation reports an error and leaves Settings open.
  • All four cookie-import menus show the shared “Google logins are not imported” disclosure at the bottom.

This is renderer-only. It does not change cookie clearing, import accounting, or the remote wire contract.

Testing

  • Focused renderer suite: 3 files, 54 tests passed
  • pnpm run typecheck:web
  • Localization catalog, extraction, and coverage checks
  • Standard and type-aware oxlint scans
  • React Doctor oxlint scan
  • git diff --check
  • Manual Electron validation on the rebased head

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d16f0ccf-f567-4e31-b21c-4cd0db6501b3

📥 Commits

Reviewing files that changed from the base of the PR and between 0d7ea102ff1a10497bdb9cc2bc8b5e1bd09c5ad5 and da25d01.

📒 Files selected for processing (7)
  • src/renderer/src/components/BrowserCookieImportDisclosure.tsx
  • src/renderer/src/components/browser-cookie-import-google-disclosure.test.tsx
  • src/renderer/src/components/browser-pane/BrowserImportHintButton.tsx
  • src/renderer/src/components/browser-pane/browser-toolbar-menu-dropdown.tsx
  • src/renderer/src/components/settings/BrowserProfileRow.tsx
  • src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx
  • src/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx

📝 Walkthrough

Walkthrough

Browser cookie imports now report when Google cookies were skipped, with coverage for file and Chromium sources. Renderer import flows pass the imported profile ID to toast handling. Toasts show Google sign-in guidance and can open Google with that profile when an active worktree exists. Browser state supports local and remote profile-specific tab creation, with tests for success and failure paths.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the feature and automated testing, but it omits the required linked issue and visual proof and does not use the required template sections. Add a valid issue link, attach before-and-after visual proof or provide the required N/A explanation, and complete the ELI5, What Changed, Why, and Review sections.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: a Google direct sign-in notice after browser cookie imports.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ef25539-7dbd-4425-8619-b601e2a3cd16

📥 Commits

Reviewing files that changed from the base of the PR and between d50adec and 52ba4db.

📒 Files selected for processing (9)
  • src/main/browser/browser-cookie-import-policy.test.ts
  • src/main/browser/browser-cookie-import-policy.ts
  • src/main/browser/browser-cookie-import-replacement.test.ts
  • src/main/browser/browser-cookie-import.test.ts
  • src/main/browser/browser-cookie-import.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/shared/types.ts

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Visual QA (STA-3811)

  1. After importing a JSON cookie fixture (google.com + example.com) into the Default profile: sonner info toast with the Google session notice and Sign in to Google action.

05-google-signin-toast.png

  1. Clicking Sign in to Google opens accounts.google.com in a browser tab on the same Default profile (sign-in page only; no credentials entered).

06-accounts-google-signin.png

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ced314a-8150-49d5-bfe7-3c36417f30c1

📥 Commits

Reviewing files that changed from the base of the PR and between 0824351 and 0d7ea102ff1a10497bdb9cc2bc8b5e1bd09c5ad5.

📒 Files selected for processing (13)
  • src/main/browser/browser-cookie-import-replacement.test.ts
  • src/main/browser/browser-cookie-import.test.ts
  • src/main/browser/browser-cookie-import.ts
  • src/renderer/src/components/browser-pane/BrowserImportHintButton.tsx
  • src/renderer/src/components/browser-pane/BrowserToolbarMenu.tsx
  • src/renderer/src/components/settings/BrowserProfileRow.tsx
  • src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/renderer/src/store/slices/browser.test.ts
  • src/renderer/src/store/slices/browser.ts
  • src/shared/types.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/renderer/src/components/browser-pane/BrowserImportHintButton.tsx
  • src/renderer/src/store/slices/browser.test.ts
  • src/renderer/src/components/settings/BrowserProfileRow.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/settings/BrowserUseCookieImportStep.tsx
  • src/main/browser/browser-cookie-import.test.ts
  • src/renderer/src/lib/browser-cookie-import-toast.test.ts
  • src/renderer/src/store/slices/browser.ts
  • src/renderer/src/lib/browser-cookie-import-toast.ts
  • src/renderer/src/components/browser-pane/BrowserToolbarMenu.tsx

Comment on lines +1758 to +1759
domains: [],
googleCookiesSkipped: integritySkipped + nonTransplantableSkipped > 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Record Google cookies skipped during decryption.

Lines 1666-1670 increment only skipped when decryptCookieValueRaw fails, then continue before the code classifies the cookie domain. An encrypted Google cookie can therefore be skipped while googleCookiesSkipped remains false. Read host_key before decryption and update the Google-skip state on every Google-cookie skip path. Add a test for an undecryptable Google cookie.

Also applies to: 1851-1851

@brennanb2025

brennanb2025 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Superseded: This QA run exposed a real branch-content mismatch. The screenshot below used the old top-of-menu disclosure because the newer footer-with-Info-icon changes from #13670 were present only as uncommitted work and were not included in the commit GitHub merged. PR #13666 has now restored that exact footer implementation at head 2a94bc651a. See the corrective QA comment below for current evidence. The import/toast/action findings from this run remain valid, but its pre-import disclosure screenshot is stale.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/sta-3811-import-google-notice branch from 0d7ea10 to da25d01 Compare August 12, 2026 00:57
@brennanb2025

brennanb2025 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Corrected Electron QA — complete user journey

The earlier corrective comment showed only the restored pre-import disclosure. That was incomplete evidence for this PR.

At head a6dcfcc320, the full behavior is:

  1. Before import, every import menu explains that Google logins are not imported.
  2. After an import actually skips Google cookies, the normal import result becomes one actionable toast.
  3. The toast says Google wasn't imported and offers Sign in to Google.
  4. Clicking it opens https://accounts.google.com/ in the exact destination session profile, then closes Settings after the tab opens.

1. Pre-import disclosure

This is the shared footer restored from the intended #13670 design: bottom placement, separator, Info icon, and two-line copy.

Corrected import-menu footer

2. Post-import result with the action added by this PR

Current-head Chrome import: 859 imported / 72 skipped, googleCookiesSkipped: true. Exactly one success toast is shown, retaining the normal result title and adding the Google guidance plus Sign in to Google.

Current-head Sign in to Google toast

3. Result of clicking Sign in to Google

The action opens the Google Accounts sign-in page in the imported default session profile. Settings closes only after the tab opens successfully.

Google Accounts sign-in opened by toast action

4. No active worktree fallback

When no active worktree can host the sign-in tab, the result intentionally omits the action and gives the manual next step for the imported profile: Open a browser in Orca with this profile, then sign into Google.

No-active-worktree Google sign-in guidance

All four screenshots above were captured through Electron/CDP from the indicated PR heads; no Computer Use, AppleScript, or OS-level input automation was used.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/sta-3811-import-google-notice branch from da25d01 to 2a94bc6 Compare August 12, 2026 01:55
@brennanb2025
brennanb2025 force-pushed the brennanb2025/sta-3811-import-google-notice branch from a6dcfcc to f8fffe1 Compare August 12, 2026 07:50
@brennanb2025
brennanb2025 merged commit 36d45af into main Aug 12, 2026
43 checks passed
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