Scope startup version probes to enabled providers#2278
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8fd17def2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| enabledProviders: self.enabledProvidersForDisplay(), | ||
| implementations: ProviderCatalog.all) |
There was a problem hiding this comment.
Rerun version detection when providers become enabled
On a fresh install or when a user enables a provider during the session, this snapshots enabledProvidersForDisplay() before provider detection/toggle changes have finished. SettingsStore.runInitialProviderDetectionIfNeeded() schedules detection asynchronously and later enables Claude/Gemini/Antigravity, but detectVersions() is only invoked from UsageStore init, so those newly enabled providers never get entries in versions until the app is relaunched and the menu/sidebar fall back to plain CLI names. Please rerun version detection, or probe just the newly enabled providers, after provider enablement changes.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 9:30 PM ET / July 18, 2026, 01:30 UTC. Summary Reproducibility: no. live current-head reproduction was provided, but the source-level startup ordering and the existing review comment give a clear path to reproduce the newly introduced first-launch regression. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve the enabled-provider filter, then trigger targeted version detection after initial provider detection enables providers and cover both the already-enabled and newly-enabled startup paths. Do we have a high-confidence way to reproduce the issue? No live current-head reproduction was provided, but the source-level startup ordering and the existing review comment give a clear path to reproduce the newly introduced first-launch regression. Is this the best way to solve the issue? No. Filtering disabled providers is the right direction, but version detection must also run after initial detection changes provider enablement so the existing startup experience remains complete. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6a152bdf8b48. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thank you, Kiran — this was a same-day collision with #2277, which landed just before this PR was opened and fixes the same #2267 startup probe path. I compared both patches directly. Your helper and regression test cover the disabled-provider gate, but #2277 already includes that behavior plus the important settings-observation path that re-runs version detection when a provider is enabled later, and broader empty/enabling coverage. I also checked CLIHelpers.detectVersion: that path runs only for the provider explicitly requested by the CLI after a successful non-web fetch, so there is no additional startup all-provider probe to carry over. No unique delta remains to cherry-pick. Closing as superseded, with credit for the independent diagnosis and focused patch. |
Summary
detectVersion -> isRunning -> antigravity-pspath when the provider is disabled.Fixes #2267.
Tests
make checkgit diff --checkswiftc -parse Sources/CodexBar/UsageStore.swiftswiftc -parse Tests/CodexBarTests/UsageStoreVersionDetectionTests.swiftswift test --skip-update --filter UsageStoreVersionDetectionTests(stalled before test execution while downloading the Sparkle 2.9.3 binary artifact)