fix(web): defer browser discovery in integrations - #9797
Open
zortos293 wants to merge 3 commits into
Open
Conversation
Contributor
ApprovabilityVerdict: 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
UI Changes
Click either preview to watch the full recording. Evidence is hosted on Cap at the reporter's request.
Before
After
Checklist
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
useEffectthat calledloadSources()was removed;listBrowserImportSourcesstill 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.tsxasserts thatpreviewBridge.listBrowserImportSourcesis 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
IntegrationsSettingsBrowserProfilesSettingthat calledloadSources, sopreviewBridge.listBrowserImportSources()no longer runs when the integrations settings panel is opened or revisited.Macroscope summarized da6e1db.