Skip to content

fix(desktop): Model selection UI becoming blank#25220

Closed
Eric-Guo wants to merge 2 commits intoanomalyco:devfrom
Eric-Guo:fix_model_selection
Closed

fix(desktop): Model selection UI becoming blank#25220
Eric-Guo wants to merge 2 commits intoanomalyco:devfrom
Eric-Guo:fix_model_selection

Conversation

@Eric-Guo
Copy link
Copy Markdown
Contributor

@Eric-Guo Eric-Guo commented May 1, 2026

Issue for this PR

Fix #25222

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Original PR #25077 break the model select box

How did you verify your code works?

It works in my machine

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Eric-Guo added 2 commits May 1, 2026 10:57
Changed child-store.ts so provider_ready, mcp_ready, and lsp_ready all mean “loaded,” not “loading.” Also wired provider query data back into projectStore.provider, so restoring readiness semantics does not break model selection.

Changed use-providers.ts to use project providers when the project store actually has provider data, falling back to global providers only while project data is unavailable.
@Eric-Guo Eric-Guo requested a review from adamdotdevin as a code owner May 1, 2026 03:00
Copilot AI review requested due to automatic review settings May 1, 2026 03:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression where the desktop model selection dropdown could render blank by ensuring the per-project provider list is actually populated from the providers query before the UI switches to using it.

Changes:

  • Update useProviders() to prefer the project-scoped provider list only once it has non-empty all entries.
  • Sync providerQuery.data into each child store’s provider field via a Solid createEffect.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/app/src/hooks/use-providers.ts Avoids switching to the child store’s provider list until it’s populated, preventing an empty list from being shown.
packages/app/src/context/global-sync/child-store.ts Adds an effect to write providerQuery.data into the child store so the project-scoped provider list is no longer stuck at its initial empty value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Brendonovich
Copy link
Copy Markdown
Member

Replaced by #25236

@Eric-Guo Eric-Guo deleted the fix_model_selection branch May 1, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model selection UI becoming blank

3 participants