feat(gui): add a Dashboard toggle for Fast selector rows - #4193
feat(gui): add a Dashboard toggle for Fast selector rows#4193chilung-cgu wants to merge 1 commit into
Conversation
) Add a toggle in Dashboard Models page to show or hide synthetic Fast selector rows, defaulting to enabled (true) when absent from configuration. - Support fastRows boolean in GET/PUT /api/settings, persisting fastRows: false when disabled and deleting the key when enabled - Trigger convergeCodexCatalog() on state transition to synchronize the Codex model picker - Mount <FastRowsSetting /> component in Models page with optimistic UI, bounded fetch timeouts, and accessibility roles - Add complete 9-locale localization parity for models.fastRows.* - Add unit and integration test coverage for backend and frontend
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds a Models page toggle for the persisted ChangesFast rows setting
Estimated code review effort: 4 (Complex) | ~45 minutes Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ModelsPage
participant FastRowsSetting
participant SettingsAPI
participant ConfigFile
participant CatalogResource
ModelsPage->>FastRowsSetting: render dashboard toggle
FastRowsSetting->>SettingsAPI: GET /api/settings
SettingsAPI-->>FastRowsSetting: return effective fastRows
FastRowsSetting->>SettingsAPI: PUT /api/settings with new value
SettingsAPI->>ConfigFile: persist or remove fastRows
SettingsAPI->>CatalogResource: trigger catalog convergence
SettingsAPI-->>FastRowsSetting: return saved value and refresh status
FastRowsSetting->>CatalogResource: refresh catalog after save
Merge Risk: ⚪ Minimal · up to The Fast rows setting’s API state remains isolated within the current Models view, with no remaining concrete merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 14 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
리뷰 · 우선순위 52 / 80이 PR은 이슈 #4175가 말한 바로 그 빈칸을 채웁니다. 지금 지금 설명 문구( 라인 - 이게 무슨 문제다 gui/src/pages/Models.tsx FastRowsSetting onSaved - src/server/management/config-routes.ts PUT 응답 - 이번 diff가 gui/src/components/FastRowsSetting.tsx 로드 경로 - GET에서 tests/config/settings-fast-rows.test.ts 재활성화 케이스 - 키 삭제 후 .github/pr-assets/fast-rows-setting-toggle.png - 스크린샷 첨부는 리뷰에 도움이 됩니다. 바이너리가 포크 raw URL로 본문에 링크되어 있으니, merge 후에도 링크가 살아 있는지(또는 저장소 경로로 바꾸는지)만 확인하면 됩니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
fastRows), defaulting to enabled (true) when absent from configuration.gpt-5.3-codex-spark (fast),claude-3-5-sonnet (fast), etc.) to declutter their client picker while preserving direct underlying model access.fastRowssupport inGET /api/settingsandPUT /api/settings(src/server/management/config-routes.ts):fastRows: false, while enabling removes the key cleanly (deleteConfigTopLevelKey(config, "fastRows")).convergeCodexCatalog()if and only if the effectivefastRowsstate transitions, ensuring client model pickers are synchronized immediately.<FastRowsSetting />component (gui/src/components/FastRowsSetting.tsx) mounted in the Models dashboard:createBoundedFetch(15_000)) on both initial GET and PUT mutations to prevent button stalls.ok,warnwhen catalog refresh is pending,erron failure) and incorporates full ARIA roles (aria-pressed,aria-busy,role="status",role="alert").de,en,fr,ja,ko,ru,tr,zh, andzh-TWingui/src/i18n/.Closes #4175
Verification
tests/config/settings-fast-rows.test.tscovering:fastRows: true.fastRows: falseis written to disk and persists across reloads.true.gui/tests/fast-rows-setting.test.tsxcovering:onSavedcallback invocation.catalogRefreshPending.bun test tests/config/settings-fast-rows.test.ts tests/test-layout.test.ts(8 pass, 0 fail, 19 expect calls)bun test ./gui/tests/fast-rows-setting.test.tsx ./gui/tests/locale-parity.test.ts(11 pass, 0 fail, 118 expect calls)bun run typecheck(tsc strict, 0 errors)bun run build:gui(Vite build passed)bun run privacy:scan(privacy scan passed)Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Localization
Bug Fixes