Skip to content

feat(settings): add cascading model selector and UI preview - #277

Open
designerzhi wants to merge 1 commit into
mainfrom
ui/settings-model-cascading-menu
Open

designerzhi wants to merge 1 commit into
mainfrom
ui/settings-model-cascading-menu

Conversation

@designerzhi

Copy link
Copy Markdown
Collaborator

Description

Redesign Settings > Models > Default model as a compact, three-level cascading menu, with an opt-in browser preview for configured providers. This PR is ready for owner review; it does not merge or modify main.

Related Issue

No linked issue; implements the requested Settings UI improvements.

Changes

  • Show providers at the first level, up to five curated models at the second, and all remaining models under More models at the third level.
  • Open submenus on hover or click; support keyboard navigation and preserve the existing confirmed default-selection flow. Selecting a model closes the entire picker.
  • Match the first-level popup width to its trigger, use a 6px gap and compact 4px outer padding, and align header copy with provider labels.
  • Keep parent rows highlighted while their submenus are open. Use the checkmark, not a persistent background, to indicate the selected model.
  • Reuse the Usage sidebar chevron and add a matching outline check. Keep rounded hover/focus states across provider, model, and More models rows.
  • Remove search and visible submenu headings from this Settings picker; the chat picker remains unchanged.
  • Add opt-in ?preview=models mock configuration with 11 cloud models, fake credentials, in-memory changes, and no model network requests.
  • Update English/Chinese strings, documentation, and regression tests.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change
  • Documentation update
  • CI/CD or build configuration change
  • Refactoring (no functional changes to the shared sidebar chevron)

Testing

  • 133 related renderer tests passed across 7 files: browser mock, default picker, Settings model integration, shared groups, chat picker, sidebar, and localization.
  • Renderer production build passed (cd desktop/renderer && npm run build), including Vue/TypeScript checking.
  • Formatting check and Git whitespace checks passed for all changed source files.
  • Focused lint passed for the new/modified selector code. Existing warnings remain in the sidebar and integration-test scaffolding; existing build chunk/annotation warnings also remain.
  • Manual browser validation performed in light and dark themes: hover through all levels, persistent parent highlights, neutral selected-model background with outline check, keyboard navigation, popup width/spacing, compact padding, aligned header text, rounded corners, and successful model selection closing all menus.
  • Full desktop/main-process test suite (not run; no backend behavior changes).

Preview

Run npm run dev:renderer from desktop, then open:
http://127.0.0.1:5173/?preview=models#/settings/models

Preview credentials are fake, and preview changes reset on reload. Curated models are fixed recommendations, not usage tracking.

Checklist

  • Follows existing project patterns and shared icons
  • Self-review performed
  • Documentation updated
  • Regression tests added/updated
  • Related existing tests pass

Introduce provider, curated model, and overflow menus with consistent icons, keyboard navigation, compact spacing, and persistent submenu highlights.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant