Repository navigation
Reuse onboarding flows in Settings, fix AI provider requests, classify business conversations - #74
Merged
Merged
Conversation
Use the onboarding provider, connection and model steps for adding email accounts and AI providers in Settings. Preserve existing account and provider identities, default selections, and cancellation behavior. Restore keyboard focus after nested confirmations. Restrict Sarv-only Chat Completions parameters to Sarv requests and label API failures with their actual provider. Add regressions for request payloads, OAuth retries, multi-account setup and credential persistence failures. Validation: 12,001 tests passed, with 12 existing opt-in tests skipped. Workspace TypeScript and lint checks passed.
| it('restores the saved nondefault region and nonrecommended backend before listing models', async () => { | ||
| vi.mocked(loadZoneSelection).mockResolvedValue({ zones, zoneCode: 'default' }); | ||
| vi.mocked(listCaiProviders).mockResolvedValue(backends); | ||
| vi.mocked(listCaiModels).mockImplementation(async (_base, _email, backend) => backend === 'saved-backend' ? [{ code: 'saved-model', display_name: 'Saved model', provider_code: backend || '' }] : [{ code: 'recommended-model', provider_code: backend || '' }]); |
| // Legacy entries whose friendly name changed still restore the backend that has their exact model. | ||
| it('searches catalogs for a legacy saved model when its old backend name does not match', async () => { | ||
| vi.mocked(listCaiProviders).mockResolvedValue(backends); | ||
| vi.mocked(listCaiModels).mockImplementation(async (_base, _email, backend) => backend === 'saved-backend' ? [{ code: 'saved-model', provider_code: backend || '' }] : [{ code: 'different-model', provider_code: backend || '' }]); |
| }, | ||
| }; | ||
| const store = createStore<any>()((set, get, api) => ({ | ||
| ...createEmailsSlice(set, get, api), |
| }; | ||
| const store = createStore<any>()((set, get, api) => ({ | ||
| ...createEmailsSlice(set, get, api), | ||
| ...createSearchAISlice(set, get, api), |
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.
Two commits from the Codex session.
d412b5afeat(settings): reuse onboarding flows and fix AI provider requestsConfirmDialog/SetupDialog/modal-focus).buildAIChatRequestOptions(listed inCLAUDE.md). API failures now name the provider that actually failed.8fa31eefix(ai): distinguish business conversations from promotionsmainends at 103, so no number clash), with migration, prompt-seeding and business-conversation tests.Before merging
[Unreleased]has an entry for8fa31eeonly. The Settings rework and the provider-request fix ind412b5aare user-facing, so they need an entry before the next release, or the release notes will miss them.Verification
shell-quoteadvisory (< 1.11.0, command injection inquote()) was published aftermain's last run, andmainfails the same check. The fix is in its own PR; re-run this check once that merges.catchUp). The clean CI run passes all of them.🤖 Generated with Claude Code