fix(server): preserve provider settings after upgrades - #9
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0530757498
ℹ️ 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".
| persisted.providers?.cursor?.enabled ?? | ||
| (usedProviders.has("cursor") ? true : settings.providers.cursor.enabled), |
There was a problem hiding this comment.
Don't enable the default provider from custom-instance history
When the history contains only a custom Cursor instance such as cursor_work, usedProviders.has("cursor") still enables the legacy providers.cursor entry. deriveProviderInstanceConfigMap then synthesizes a separate default cursor instance alongside cursor_work, so an upgrade unexpectedly exposes two enabled providers and can even resurrect the default after the custom instance was removed but its thread history remains. Only history whose instance ID is null or equals the provider name should restore the legacy default; custom-instance history should restore that instance alone.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Restore optional providers and provider instances from persisted usage history so upgrades do not hide configurations that users have already used.
Validation
Upstream reference: pingdotgg/t3code#8176