Skip to content

feat(gui): add a Dashboard toggle for Fast selector rows - #4193

Open
chilung-cgu wants to merge 1 commit into
lidge-jun:devfrom
chilung-cgu:feat/issue-4175-dashboard-fast-rows
Open

feat(gui): add a Dashboard toggle for Fast selector rows#4193
chilung-cgu wants to merge 1 commit into
lidge-jun:devfrom
chilung-cgu:feat/issue-4175-dashboard-fast-rows

Conversation

@chilung-cgu

@chilung-cgu chilung-cgu commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resolves feat(gui): add a Dashboard toggle for Fast selector rows #4175 by adding a dedicated Dashboard toggle in the Models page to show or hide synthetic Fast selector rows (fastRows), defaulting to enabled (true) when absent from configuration.
  • Allows operators to hide synthetic Fast selector rows (gpt-5.3-codex-spark (fast), claude-3-5-sonnet (fast), etc.) to declutter their client picker while preserving direct underlying model access.
  • Implements fastRows support in GET /api/settings and PUT /api/settings (src/server/management/config-routes.ts):
    • Strictly validates boolean payload and captures pre-mutation state for transactional rollback if config persistence encounters an error.
    • Follows repository convention where absent means default: disabling writes fastRows: false, while enabling removes the key cleanly (deleteConfigTopLevelKey(config, "fastRows")).
    • Calls convergeCodexCatalog() if and only if the effective fastRows state transitions, ensuring client model pickers are synchronized immediately.
  • Implements <FastRowsSetting /> component (gui/src/components/FastRowsSetting.tsx) mounted in the Models dashboard:
    • Supports optimistic toggle state with failure rollback.
    • Implements bounded fetch timeouts (createBoundedFetch(15_000)) on both initial GET and PUT mutations to prevent button stalls.
    • Emits contextual tone feedback (ok, warn when catalog refresh is pending, err on failure) and incorporates full ARIA roles (aria-pressed, aria-busy, role="status", role="alert").
  • Achieves full 9-locale localization parity across de, en, fr, ja, ko, ru, tr, zh, and zh-TW in gui/src/i18n/.

Closes #4175

Verification

  • Added backend unit and integration tests in tests/config/settings-fast-rows.test.ts covering:
    • Default unconfigured state reporting fastRows: true.
    • Disabling and verifying fastRows: false is written to disk and persists across reloads.
    • Independent setting updates without resending other keys.
    • Rejection of non-boolean payloads with 400.
    • Re-enabling deletes the key and restores default true.
    • Catalog convergence trigger on state change.
  • Added frontend component integration tests in gui/tests/fast-rows-setting.test.tsx covering:
    • Default load and description rendering.
    • Reflecting disabled state from API.
    • Click serialization, PUT mutation, and onSaved callback invocation.
    • Amber warning rendering on catalogRefreshPending.
    • Optimistic rollback and error feedback on failed save.
    • Error containment and retry on initial load failure.
  • Ran test suites:
    • 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)
  • Captured UI screenshot:
    Dashboard toggle for Fast selector rows

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

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

    • Added a Models setting to show or hide synthetic Fast model rows in external model pickers.
    • The setting defaults to enabled and provides status feedback when loading or saving changes.
    • Changes automatically refresh the model catalog.
  • Localization

    • Added translations for the setting and its feedback messages in supported languages.
  • Bug Fixes

    • Failed updates now restore the previous setting and display an error message.

)

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
Copilot AI lite review requested due to automatic review settings September 10, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 4a6764c6-74e6-41b4-8b37-bebca4a9227a

📥 Commits

Reviewing files that changed from the base of the PR and between 12c248f and 0d9dd33.

⛔ Files ignored due to path filters (1)
  • .github/pr-assets/fast-rows-setting-toggle.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • gui/src/components/FastRowsSetting.tsx
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/fr.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/Models.tsx
  • gui/src/styles.css
  • gui/tests/fast-rows-setting.test.tsx
  • scripts/test-layout/layout.json
  • src/server/management/config-routes.ts
  • tests/config/settings-fast-rows.test.ts
  • tests/fixtures/test-layout-expected.json

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Adds a Models page toggle for the persisted fastRows setting. The UI loads and updates the setting through /api/settings, refreshes the catalog after changes, supports localized feedback, and includes frontend and backend tests.

Changes

Fast rows setting

Layer / File(s) Summary
Settings API and persistence
src/server/management/config-routes.ts, tests/config/settings-fast-rows.test.ts, scripts/test-layout/layout.json, tests/fixtures/test-layout-expected.json
The API exposes fastRows as enabled by default, validates boolean updates, persists disabled values, removes the key when enabled, rolls back failed saves, and triggers catalog convergence when the effective value changes. Tests cover defaults, persistence, validation, reloads, and convergence.
Dashboard control and presentation
gui/src/components/FastRowsSetting.tsx, gui/src/pages/Models.tsx, gui/src/styles.css, gui/src/i18n/*.ts
The Models page renders FastRowsSetting. The component loads and polls the setting, performs optimistic updates, handles rollback and load errors, reports catalog refresh status, and uses localized messages.
Dashboard interaction tests
gui/tests/fast-rows-setting.test.tsx
Tests cover initial loading, enabled and disabled states, rapid-click serialization, optimistic updates, pending catalog refresh, failed saves, and retry after a load failure.

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
Loading

Merge Risk: ⚪ Minimal · up to 0d9dd

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Dashboard GUI toggle for Fast selector rows.
Linked Issues check ✅ Passed The changes satisfy issue #4175. They add the Models-page toggle, load the effective setting through GET /api/settings, persist updates through PUT /api/settings, default the setting to enabled, prese…
Out of Scope Changes check ✅ Passed The reviewed changes are related to the linked objective. They include the setting component, Models-page integration, localized strings, styling, API support, tests, and test-layout updates. No unrel…
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ 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.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 52 / 80

이 PR은 이슈 #4175가 말한 바로 그 빈칸을 채웁니다. 지금 dev HEAD(12c248f52, tip #4186 docs)에서 합성 Fast 피커 행의 본체는 이미 src/server/fast-row.tsconfig.fastRows(zod 기본 true, src/types/config.ts optional)에 있습니다. config.fastRows === false이면 gpt-… Fast 같은 합성 행만 안 만들고, 베이스 모델과 reasoning-effort 옵션은 그대로 둡니다. 빠진 것은 Dashboard에서 그 플래그를 켜고 끄는 UI와 /api/settings round-trip이었습니다. 이 PR은 gui/src/components/FastRowsSetting.tsx를 Models 페이지에 붙이고, src/server/management/config-routes.ts의 GET/PUT에 fastRows를 노출합니다. 끄는 쪽은 fastRows: false를 파일에 쓰고, 다시 켜면 deleteConfigTopLevelKey(config, "fastRows")로 키를 지워 “없음 = 기본 on” 관례를 지킵니다. UltraFast(ultraFastTier, 기본 off)와 극성이 반대인 점이 의도대로입니다.

지금 dev가 최적화하는 축(Lane A 서비스 가드 잔여, Lane B 무료 모델 체인, main/preview 안정 2.49.0 publish 게이트, package.json 2.50.0 on HEAD)과 직접 충돌하지 않습니다. types.ts/config.ts 분할 캠페인과도 무관하고, fast-row.ts 생성 로직을 다시 쓰지 않아서 범위가 이슈 리뷰 때 권한 것과 같습니다. base는 현재 dev와 behind 0이라 리베이스 부담도 없습니다. hygiene/label/enforce-target은 통과·재실행 중이고 CodeRabbit은 아직 pending입니다. 제품 긴급도는 이슈 때와 같이 낮지만, 구현 품질·테스트·9-locale i18n·카탈로그 converge 트리거까지 갖춰서 “받을 준비가 된 작은 GUI PR”로 점수를 이슈(44)보다 조금 올렸습니다.

설명 문구(models.fastRows.desc)도 “외부 클라이언트 피커의 Model Fast 선택만 추가한다. 베이스 모델의 reasoning-effort는 바꾸지 않는다”로 이슈가 요구한 경계를 지킵니다. 저장 시 effective 값이 바뀌면 convergeCodexCatalog()를 호출하고, catalogRefreshPending이면 warn 톤 힌트를 보여 줍니다. Models 쪽에서는 onSavedcatalogResource.refresh()를 호출해 대시보드 모델 목록 캐시도 갱신합니다. 백엔드 tests/config/settings-fast-rows.test.ts와 GUI gui/tests/fast-rows-setting.test.tsx가 기본값·persist·400·키 삭제·converge·낙관적 롤백·로드 실패 재시도를 덮습니다.

라인 - 이게 무슨 문제다

gui/src/pages/Models.tsx FastRowsSetting onSaved - catalogResource.refresh()는 Dashboard Models 캐시만 다시 읽습니다. Pi/Aside/DSH 같은 외부 클라이언트 export 자체는 convergeCodexCatalog + (필요 시) Integrations sync 경로에 더 가깝습니다. warn 힌트(models.fastRows.refreshHint)가 pending을 알려 주긴 하지만, 설명이 “저장만 하면 외부 피커가 즉시 비운다”처럼 읽히지 않게, 운영자가 Integrations/카탈로그 새로고침이 필요할 수 있다는 점을 한 줄 더 밝혀 두면 #4175 우려와 맞습니다.

src/server/management/config-routes.ts PUT 응답 - 이번 diff가 fastRows와 함께 ultraFastTier도 PUT 응답에 넣습니다. GET에는 원래 있었고 UltraFast GUI는 값이 없으면 requested로 폴백해서 당장 깨지지는 않습니다. 관련 패리티 수정으로 보이지만, Fast rows 본문과 무관한 한 줄이라 리뷰어가 “의도된 동반 수정인지”만 확인하면 됩니다.

gui/src/components/FastRowsSetting.tsx 로드 경로 - GET에서 fastRows가 boolean이 아니면 shape 에러로 로드 실패 처리합니다. 이 PR의 GET은 항상 boolean을 주므로 맞지만, UltraFastTierSetting이 === true로 관대한 것과 결이 다릅니다. 기본값이 true인 설정에는 지금 방식이 더 안전하니 유지하되, 이후 settings 스키마 변경 시 이 엄격함을 깨지 마세요.

tests/config/settings-fast-rows.test.ts 재활성화 케이스 - 키 삭제 후 loadConfig().fastRows === true와 raw JSON에 키 없음을 같이 검사하는 구성은 좋습니다. zod .default(true)에 의존하므로, 나중에 default/catch 의미가 바뀌면 이 테스트가 회귀 감지 역할을 합니다. 그대로 두세요.

.github/pr-assets/fast-rows-setting-toggle.png - 스크린샷 첨부는 리뷰에 도움이 됩니다. 바이너리가 포크 raw URL로 본문에 링크되어 있으니, merge 후에도 링크가 살아 있는지(또는 저장소 경로로 바꾸는지)만 확인하면 됩니다.

메인테이너의 판단이 필요한 지점

  • Models 페이지(피커 순서 아래) 배치를 확정할지, UltraFast처럼 Codex 멀티계정/Advanced 쪽에 둘지(이슈에서 열어 둔 선택)
  • convergeCodexCatalog만으로 충분한지, 저장 성공 시 enabled client integration sync까지 자동으로 칠지
  • Lane B·2.49.0 publish 게이트보다 낮은 우선순위로 지금 merge 트레에 넣을지, CI(본테스트/CodeRabbit) 그린 뒤에만 받을지
  • 이슈에 있던 gui 라벨을 PR에도 붙일지(지금은 enhancement만 있음 — 봇은 라벨을 바꾸지 않음)

너의 추천
CI가 그린이면 merge 후보로 두세요. #4175를 정확히 닫는 작은 PR이고 fast-row.ts를 건드리지 않으며 behind 0입니다. merge 전에 (1) PUT 응답의 ultraFastTier 동반 추가가 의도인지 한 줄 확인, (2) 외부 클라이언트는 catalog pending/Integrations refresh가 필요할 수 있다는 UX 문장만 다듬을지 결정하면 충분합니다. types/config 분할과 무관하니 close-don't-rebase 대상이 아닙니다. 중복 PR도 없습니다. Lane B나 stop/서비스 버그보다 급하지는 않으니, 트레인이 비는 틈에 받으면 됩니다.

이 댓글은 grok-bot이 작성했습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants