fix(web): hoist favorited legacy models to the top of the model picker - #11933
TonybynMp4 wants to merge 3 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped model-picker bug fix that keeps favorited legacy models in the existing main list while preserving collapsed handling for other legacy models. The implementation is small, focused, and covered by targeted tests, with no schema, deployment, security, billing, default-setting, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe model picker now keeps favorited legacy models in the main favorites-sorted list. Unfavorited legacy models remain in the Legacy section. A new partition utility implements this behavior, with tests covering its cases. ChangesLegacy favorite partitioning
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The legacy favorite partitioning change is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ae4ddbc to
723ccff
Compare
Problem
Favoriting a legacy model (e.g. Claude Opus 4.8) was supposed to hoist it to the top of the model picker, but it stayed buried in the collapsed "Legacy models" section. The favorites-first sort was correct, but the picker then re-split the list on
isLegacyalone, so any favorited legacy model was pulled back down into the legacy group — defeating the hoist.Closes #11925
Fix
partitionLegacyModelshelper inmodelOrdering.tsthat splits an already-sorted list into the main list and the collapsed legacy group, but keeps a favorited legacy model in the main list. Unfavoriting returns it to the legacy group.ModelPickerContentso the favorite hoist wins over the legacy split.Scope: web/desktop only. Mobile has no model favorites, and native iOS was already fixed separately.
Before/After:

Tests
vp test run apps/web/src/modelOrdering.test.ts— 7 passed, covering: favorited legacy model stays in the main list, unfavoriting returns it to legacy, empty list, explicitisLegacy: false, and all-legacy-favorited.Summary by CodeRabbit
New Features
Bug Fixes
Tests