Skip to content

fix(web): defer browser discovery in integrations - #9797

Open
zortos293 wants to merge 3 commits into
pingdotgg:mainfrom
zortos293:t3code/fix-integrations-tab-lag
Open

fix(web): defer browser discovery in integrations#9797
zortos293 wants to merge 3 commits into
pingdotgg:mainfrom
zortos293:t3code/fix-integrations-tab-lag

Conversation

@zortos293

@zortos293 zortos293 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What Changed

Defer browser discovery until the Add profile menu opens, instead of running it whenever Integrations mounts. The menu still refreshes sources on each open and shows its existing loading state.

Why

Opening Integrations could freeze the desktop app for several seconds while discovery inspected browser profiles, checked locks, and counted cookies. None of that work is needed just to view settings.

Verification

  • Added a mount/revisit regression test, including React Strict Mode. It fails before the fix and passes afterward.
  • All 31 focused settings/import tests pass; web typecheck, targeted lint, and formatting pass.
  • Confirmed fixed in the Windows desktop dev app by the reporter.

UI Changes

Click either preview to watch the full recording. Evidence is hosted on Cap at the reporter's request.

Before

Before: Integrations freezes on entry

After

After: Integrations opens without the freeze

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after visual previews
  • I included videos for the interaction change

Model: GPT-6 Astra. Harness: Codex in T3 Code.


Note

Low Risk
Small behavioral change limited to when discovery runs; import flow still refreshes sources on menu open.

Overview
Integrations no longer runs browser import discovery on mount, which was freezing the desktop app for several seconds while it scanned profiles, locks, and cookies even when the user only opened settings.

The mount-time useEffect that called loadSources() was removed; listBrowserImportSources still runs when the user opens the Add profile menu (onOpenChange), keeping the existing refresh-on-open behavior and loading UI.

A regression test in IntegrationsSettings.test.tsx asserts that previewBridge.listBrowserImportSources is not invoked when entering or revisiting Integrations (including under React Strict Mode).

Reviewed by Cursor Bugbot for commit c6df5b4. Configure here.

Note

Defer browser import discovery in IntegrationsSettings

  • Removes the mount effect in BrowserProfilesSetting that called loadSources, so previewBridge.listBrowserImportSources() no longer runs when the integrations settings panel is opened or revisited.
  • Adds a test in IntegrationsSettings.test.tsx that mounts and remounts the panel and asserts discovery is never called.
  • Behavioral Change: browser import sources are no longer preloaded automatically; they rely on the existing explicit lazy-loading path.

Macroscope summarized da6e1db.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 4, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR removes mount-time browser profile discovery while retaining refresh when the Add profile menu opens, with a focused regression test. Because discovery inspects local browser profile and cookie-store metadata, changing when that sensitive data is accessed warrants human review.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant