Use app dropdowns and fix Android Zen app-server config#152
Use app dropdowns and fix Android Zen app-server config#152
Conversation
Review Summary by Qodo(Agentic_describe updated until commit dc7871a)Scope model selections by provider and replace app selects with ComposerDropdown
WalkthroughsDescription• Scope model selections per thread and active provider to prevent stale model leakage • Replace remaining app select controls with ComposerDropdown for consistent UI • Load provider models during normal refresh and startup, not only after provider switch • Fix app-server bridge startup ordering to use resolved web port for Zen proxy config • Preview provider-scoped model selection before refresh completes Diagramflowchart LR
A["Model Selection Storage"] -->|"per thread + provider"| B["Thread Provider Context"]
C["Provider Switch"] -->|"preview model"| D["Composer Model Display"]
C -->|"refresh with flag"| E["Load Provider Models"]
E -->|"before resume"| F["Validate Thread Model"]
G["App Selects"] -->|"replace with"| H["ComposerDropdown"]
I["Bridge Startup"] -->|"defer until"| J["Port Resolved"]
J -->|"then start"| K["Background Services"]
File Changes1. src/composables/useDesktopState.ts
|
Code Review by Qodo
1. Thread model overwritten on switch
|
|
Persistent review updated to latest commit 7633fbb |
|
Persistent review updated to latest commit 77d3cc8 |
|
Persistent review updated to latest commit dc7871a |
| if (activeThreadIdBeforeProviderChange) { | ||
| const providerModelId = readModelIdForThread('__new-thread__').trim() || selectedModelId.value.trim() | ||
| if (providerModelId) { | ||
| setSelectedModelIdForThread(activeThreadIdBeforeProviderChange, providerModelId) | ||
| } |
There was a problem hiding this comment.
1. Thread model overwritten on switch 🐞 Bug ≡ Correctness
onProviderChange() always writes the active thread’s model to the provider’s new-thread model after a provider refresh, which can overwrite an existing per-thread/per-provider selection and prevent restoring that thread’s prior model when switching back.
Agent Prompt
### Issue description
Provider switching currently persists the provider’s *new-thread* model into the *active existing thread* after refresh, which can overwrite a previously saved per-thread/per-provider model choice.
### Issue Context
- Existing thread model selections are stored provider-scoped in `useDesktopState`.
- The provider’s new-thread model (`__new-thread__`) is a different context than an existing thread’s provider-scoped model.
### Fix Focus Areas
- src/App.vue[3695-3700]
### Suggested change
After the provider refresh completes, only call `setSelectedModelIdForThread(activeThreadIdBeforeProviderChange, providerModelId)` if the active thread does **not** already have a provider-scoped model for the newly active provider (i.e., `readModelIdForThread(activeThreadIdBeforeProviderChange).trim()` is empty). This preserves existing per-thread/provider selections while still initializing the thread model when missing.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Summary
Tests