fix: motion and facial list truncation - #128
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughChanges模糊匹配覆盖
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change expands empty-query motion and facial lists while preserving the 60-result limit for searches, with regression coverage for both behaviors. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant TestScript as test-fuzzy-match.mjs
participant ViteServer as Vite中间件服务器
participant FuzzyMatch as fuzzyMatchOptions
TestScript->>ViteServer: 启动 SSR 模块加载
ViteServer->>FuzzyMatch: 加载并执行模糊匹配
FuzzyMatch-->>TestScript: 返回匹配结果
TestScript->>TestScript: 验证空查询、宽泛查询和精确查询
TestScript->>ViteServer: finally 中关闭服务器
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.97.1)Clippy execution timed out 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. Comment |
|
Thanks for contributing |
Summary
Background
The motion and facial combobox passed a limit of 60 to the fuzzy matching helper. That limit was also applied when the search query was empty, so only the first 60 sorted entries were rendered in the default list.
Models with more than 60 entries could therefore contain valid motions or facial expressions that were absent from the browsable list, even though they could still be found by entering their names in the search field.
Behavior changes
When the search field is empty:
When the search field contains a query:
Tests
The frontend regression test uses 100 synthetic options and verifies that:
The backend model registry test now generates:
It verifies that both catalogs are classified, sorted, and returned without truncation.
Commands run:
pnpm test:fuzzy-matchpnpm typecheckpnpm lintcargo testcargo checkcargo fmt --checkAll checks pass.
Related issue
Fixes #123
Summary by CodeRabbit
新功能
测试