add agent variant picker to profiles#1153
Conversation
There was a problem hiding this comment.
🟡 Medium
The variantRow displays selectedVariantLabel, but selectedAgentVariantId is only updated after a successful variant-change call and is never initialized from the contact's existing variantStamp on open. So when you first open a profile for an agent already on a non-default variant, the row shows "Default variant", and the picker sheet marks the default option as selected. The row and picker reflect the wrong variant until the user changes it. Initialize selectedAgentVariantId from variantStamp (e.g. in .onAppear or when the contact is set) so the existing variant is reflected on first display.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @Convos/Contacts/ContactDetailView.swift around line 1047:
The `variantRow` displays `selectedVariantLabel`, but `selectedAgentVariantId` is only updated after a successful variant-change call and is never initialized from the contact's existing `variantStamp` on open. So when you first open a profile for an agent already on a non-default variant, the row shows "Default variant", and the picker sheet marks the default option as selected. The row and picker reflect the wrong variant until the user changes it. Initialize `selectedAgentVariantId` from `variantStamp` (e.g. in `.onAppear` or when the contact is set) so the existing variant is reflected on first display.
|
Claude finished @humanagent's task —— View job Code Review: Agent Variant Picker
|

Summary
Why
Validation
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Add agent variant picker to contact profiles
ContactDetailActionsthat opens a newAgentVariantPickerSheet, allowing users to select or clear an agent variant for an agent instance.ContactDetailViewloads available variants on appear viaSessionManager.listAgentVariants()and applies changes via a new PATCH endpointv2/agents/{instanceId}/variant. Errors surface as an alert.agentInstanceIdand at least one variant is available.updateAgentVarianttoConvosAPIClient,SessionManager, and their protocols/mocks to support the new endpoint.📊 Macroscope summarized 204cf7e. 6 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.