Skip to content

fix(wework): group model selector families - #2138

Merged
qdaxb merged 2 commits into
mainfrom
fix/model-selector-groups
Jul 23, 2026
Merged

qdaxb merged 2 commits into
mainfrom
fix/model-selector-groups

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Expand models directly when the desktop selector has a single model family.
  • Show family entries and a cascading model submenu when multiple families are available.
  • Keep cascading menus on the outward side when the selector flips near the viewport edge.
  • Add focused regression coverage and update the Wework task documentation in Chinese and English.

Why

The desktop selector previously flattened every family into one model list. This made models from different providers indistinguishable and did not match the intended progressive menu behavior.

User impact

Small catalogs remain fast to scan, while larger catalogs are organized by family before model selection.

Validation

  • pnpm --filter wework exec prettier --check ...
  • pnpm --filter wework exec eslint ...
  • pnpm --filter wework exec tsc --noEmit
  • pnpm --filter wework test (200 files, 1997 tests)
  • Isolated real-Tauri verification for single-family expansion, multi-family navigation, cross-family hover switching, and final model selection
  • Pre-push Wework ESLint, TypeScript, and unit-test checks

Summary by CodeRabbit

  • New Features

    • Improved the desktop model selector with nested model-family menus.
    • When multiple model families are available, select a family to view its models; single-family menus show models directly.
    • Added clearer empty states, model labels, environment indicators, and disabled-model handling.
  • Documentation

    • Updated English and Chinese guidance to explain model selector behavior.
    • Reformatted the task-control keyboard shortcut tables for improved readability.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8cf854f5-47c5-4ebf-b042-d130f633ec77

📥 Commits

Reviewing files that changed from the base of the PR and between 3bf928e and 5b4d177.

📒 Files selected for processing (6)
  • docs/en/wework/tasks.md
  • docs/zh/wework/tasks.md
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/src/components/chat/ChatInput.test.tsx
  • wework/src/components/chat/composer/ModelSelector.test.tsx
  • wework/src/components/chat/composer/ModelSelector.tsx
📝 Walkthrough

Walkthrough

The desktop model selector now groups models by family. Single-family menus show models directly, while multi-family menus require choosing a family before displaying its models. State handling, submenu positioning, rendering, tests, and English and Chinese documentation were updated.

Changes

Desktop model selector family navigation

Layer / File(s) Summary
Selector state, activation, and submenu layout
wework/src/components/chat/composer/ModelSelector.tsx
Tracks the active family, resets submenu state, centralizes model submenu activation, and calculates nested submenu placement.
Family and model option rendering
wework/src/components/chat/composer/ModelSelector.tsx
Renders model states and nested family-specific model options, including empty, disabled, and cloud model handling.
Behavior coverage and usage guidance
wework/src/components/chat/composer/ModelSelector.test.tsx, wework/src/components/chat/ChatInput.test.tsx, docs/en/wework/tasks.md, docs/zh/wework/tasks.md
Tests single- and multi-family expansion behavior and documents the corresponding model selection flows.
Estimated code review effort: 3 (Moderate) ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ModelSelector
  participant FamilySubmenu
  User->>ModelSelector: Open model selector
  ModelSelector->>FamilySubmenu: Show model families when multiple exist
  User->>FamilySubmenu: Select a family
  FamilySubmenu->>ModelSelector: Activate selected family
  ModelSelector->>FamilySubmenu: Show that family's model options
Loading

Possibly related PRs

Suggested reviewers: micro66

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: grouping model selector families in Wework.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/model-selector-groups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qdaxb
qdaxb marked this pull request as ready for review July 22, 2026 17:20
@qdaxb
qdaxb force-pushed the fix/model-selector-groups branch from 3bf928e to 5b4d177 Compare July 22, 2026 17:30
@qdaxb
qdaxb merged commit f2d344c into main Jul 23, 2026
32 of 33 checks passed
@qdaxb
qdaxb deleted the fix/model-selector-groups branch July 23, 2026 00:05
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