Skip to content

feat(models): save picker order without replacing featured selections - #3801

Merged
lidge-jun merged 8 commits into
devfrom
codex/t4-05-picker-81a8
Sep 6, 2026
Merged

feat(models): save picker order without replacing featured selections#3801
lidge-jun merged 8 commits into
devfrom
codex/t4-05-picker-81a8

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reimplement the picker feature from feat(models): add main picker ordering controls #3383: persist explicit ordering presets without replacing the featured roster, preserve current native/featured bands, and wire public discovery consumers. Most used is a saved snapshot. Native advertised choices may change. Unrelated Windows atomic-write changes are excluded.
  • Manual review chain, layer 5/5; base codex/t4-04-log-polling-81a8. No GitHub native stack registration. Each layer is independently scoped; this chain batches review and final verification.

Verification

Manual review chain (bottom-up): #3797#3798#3799#3800#3801

  • Local test suites, typecheck and builds were not run, per maintainer instruction. Source audits and git diff --check were performed.
  • Final combined Cross-platform CI (lane=all) passed all 25 jobs on d1915c470bdcc95bbb3f7c716152ed013622634f. Lower test runs are deferred per the maintainer-directed combined-evidence strategy; skipped/cancelled runs are not passing evidence.
  • Independent Astra high source/security reviews and actual Aside fixture rendering are recorded where applicable. All scoped source/security reviews passed. Repaired-source remote diagnostics passed; the final full cross-platform matrix passed all 25 jobs.
  • Maintainer integration policy: the owner explicitly authorized final-combined-CI-first validation and eventual bottom-up admin merge. Exact combined CI is green; fresh per-PR head/base/actor and maintainer-objection checks precede each admin merge. Repository auto-delete is enabled, so the next owned child is retargeted to dev immediately before its parent lands.

Actual component/page with synthetic fixture data

  • Exact-source diagnostic gates, d1915c470bdcc95bbb3f7c716152ed013622634f: lint, typecheck, 27 focused config/picker tests, 1,706 GUI tests, privacy scan, GUI build and 425-page documentation build all passed. No deployment.

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.

Co-authored-by: x3M3x amroeid1999@gmail.com

Summary by CodeRabbit

  • New Features

    • Added model picker ordering presets: Default, alphabetical, provider, most-used, and custom.
    • Saved ordering now applies across Codex and Claude model discovery.
    • Added cursor-based log updates for faster incremental refreshes.
    • Saved model identifiers remain retained even when temporarily unavailable.
  • Bug Fixes

    • Improved recovery and reset behavior when log data changes or cursors become invalid.
    • Added validation and retry feedback for model-ordering changes.
  • Documentation

    • Updated model-ordering and management API guides in supported languages.
  • Localization

    • Added translated labels, statuses, hints, and error messages for model ordering.

t and others added 2 commits September 7, 2026 01:58
Reimplements #3250 with snapshot-prefix validation, process epochs and current response fences.

Co-authored-by: chilung <b0423031@gmail.com>
Reimplements the picker feature from #3383 against current catalog and discovery contracts. Preserves native/featured bands and documents native advertised-choice effects.

Co-authored-by: x3M3x <amroeid1999@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 3df00050-c46c-484a-b1c5-f9d3e9494c08

📥 Commits

Reviewing files that changed from the base of the PR and between f7bc920 and d1915c4.

⛔ Files ignored due to path filters (2)
  • docs-site/public/pr-screenshots/t4-log-polling-81a8.png is excluded by !**/*.png
  • docs-site/public/pr-screenshots/t4-model-picker-81a8.png is excluded by !**/*.png
📒 Files selected for processing (48)
  • docs-site/src/content/docs/fr/guides/model-ordering.md
  • docs-site/src/content/docs/guides/model-ordering.md
  • docs-site/src/content/docs/ja/guides/model-ordering.md
  • docs-site/src/content/docs/ko/guides/model-ordering.md
  • docs-site/src/content/docs/reference/management-api.md
  • docs-site/src/content/docs/ru/guides/model-ordering.md
  • docs-site/src/content/docs/tr/guides/model-ordering.md
  • docs-site/src/content/docs/zh-cn/guides/model-ordering.md
  • docs-site/src/content/docs/zh-tw/guides/model-ordering.md
  • gui/.eslint/i18n-allowlist.ts
  • 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/model-picker-order.ts
  • gui/src/pages/Logs.tsx
  • gui/src/pages/Models.tsx
  • gui/src/pages/log-poll.ts
  • gui/tests/codex-stale-banner.test.ts
  • gui/tests/log-poll.test.ts
  • gui/tests/logs-auto-refresh.test.tsx
  • gui/tests/model-picker-order.test.ts
  • gui/tests/models-status-toast.test.tsx
  • src/claude/model-info.ts
  • src/codex/catalog.ts
  • src/codex/catalog/sync.ts
  • src/config/rebase-provenance.ts
  • src/server/index.ts
  • src/server/management/agent-settings-routes.ts
  • src/server/management/logs-usage-routes.ts
  • src/server/request-log-cursor.ts
  • src/types/config.ts
  • structure/03_catalog-and-subagents.md
  • structure/05_gui-and-management-api.md
  • tests/claude-integration/claude-desktop-discovery.test.ts
  • tests/claude-integration/claude-model-info.test.ts
  • tests/codex-integration/catalog-full-picker-order.test.ts
  • tests/codex-integration/codex-catalog-model-picker-order.test.ts
  • tests/routing/subagent-roster-retention.test.ts
  • tests/server/config.test.ts
  • tests/server/management-api-logs-metrics.test.ts
  • tests/server/server-management-auth.test.ts
  • tests/usage/request-log.test.ts

📝 Walkthrough

Walkthrough

This PR adds saved model picker ordering across the GUI, management API, Codex catalog, and Claude discovery. It also adds cursor-based polling for GET /api/logs, updates the Logs page for delta polling, and documents both behaviors in product and structure docs.

Changes

Model picker ordering

Layer / File(s) Summary
Ordering contracts and discovery application
gui/src/model-picker-order.ts, src/types/config.ts, src/codex/catalog.ts, src/codex/catalog/sync.ts, src/claude/model-info.ts, src/server/index.ts, tests/model-picker-order.test.ts, tests/claude-integration/*, tests/codex-integration/*, tests/server/config.test.ts
Adds picker-order types, guards, and preset ordering logic. Saved picker order now feeds Codex catalog generation and Claude discovery ordering, with tests for ordering modes, alias handling, featured/native band preservation, and config persistence.
Picker settings API and rollback handling
src/server/management/agent-settings-routes.ts, src/config/rebase-provenance.ts, structure/03_catalog-and-subagents.md, structure/05_gui-and-management-api.md, tests/routing/subagent-roster-retention.test.ts
Extends GET/PUT /api/subagent-models with pickerAvailable, pickerOrder, and pickerOrderMode. PUT validates picker writes, stages config changes with rollback support, separates roster sync from picker convergence, and documents the contract.
Models page controls and translated docs
gui/src/pages/Models.tsx, gui/.eslint/i18n-allowlist.ts, gui/src/i18n/*, gui/tests/models-status-toast.test.tsx, gui/tests/codex-stale-banner.test.ts, docs-site/src/content/docs/.../guides/model-ordering.md
Adds picker-order state, session caching, save flow, retry handling, and guarded app-server reloads on the Models page. New translations and guide updates describe presets, saved unavailable IDs, API behavior, and downstream ordering effects.

Logs cursor polling

Layer / File(s) Summary
Cursor format and logs endpoint
src/server/request-log-cursor.ts, src/server/management/logs-usage-routes.ts, docs-site/src/content/docs/reference/management-api.md, tests/usage/request-log.test.ts, tests/server/management-api-logs-metrics.test.ts, tests/server/server-management-auth.test.ts
Adds a request-log cursor format and delta selection logic. GET /api/logs now accepts an optional cursor, returns cursor and reset, rejects malformed cursors with invalid_cursor, and is covered by protocol, reset, privacy, and auth tests.
Logs page polling state and client handling
gui/src/pages/log-poll.ts, gui/src/pages/Logs.tsx, gui/tests/log-poll.test.ts, gui/tests/logs-auto-refresh.test.tsx
Adds client-side poll envelope parsing and delta merging. The Logs page stores per-resource cursor state, merges appended rows, resets on retry or server reset, and keeps cache and accepted cursor state stable across stale or malformed responses.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ModelsPage
  participant AgentSettingsAPI
  participant ConfigStore
  participant DiscoveryBuilders
  ModelsPage->>AgentSettingsAPI: GET /api/subagent-models
  AgentSettingsAPI-->>ModelsPage: chosen, available, pickerAvailable, pickerOrder, pickerOrderMode
  ModelsPage->>AgentSettingsAPI: PUT pickerOrder and pickerOrderMode
  AgentSettingsAPI->>ConfigStore: persist picker settings
  AgentSettingsAPI->>DiscoveryBuilders: converge reordered catalog
  DiscoveryBuilders-->>ModelsPage: reordered Codex and Claude results
Loading
sequenceDiagram
  participant LogsPage
  participant LogsAPI
  participant CursorSelector
  participant LogStore
  LogsPage->>LogsAPI: GET /api/logs?cursor=...
  LogsAPI->>CursorSelector: decode and validate cursor
  LogsAPI->>LogStore: load filtered log window
  LogStore-->>CursorSelector: current rows
  CursorSelector-->>LogsAPI: delta rows, next cursor, reset flag
  LogsAPI-->>LogsPage: poll envelope
Loading

Possibly related PRs

  • lidge-jun/opencodex#3383: This PR extends the same model-picker ordering area into persisted settings, management API payloads, discovery ordering, GUI controls, and tests.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/t4-05-picker-81a8

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 6, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 49 / 80

지금 dev HEAD(24c761a05, package 2.45.0)에는 #2802 우산(umbrella) 피커와 config.modelPickerOrder 필드 뼈대가 있지만, featured 로스터(subagentModels)와 “피커 정렬 프리셋”을 나누어 저장·복원하는 GUI/API가 없습니다. 이 PR(DRAFT, Track4 81a8 스택 5/5 꼭대기, base=t4-04-log-polling, head=t4-05-picker)은 #3383을 현재 카탈로그·discovery 계약에 다시 심습니다. /api/subagent-models GET/PUT이 pickerOrder / pickerOrderMode / pickerAvailable을 로스터와 별도로 다루고, 빈 정렬은 top-level 삭제로 가며 rebase-provenance 롤백으로 실패 저장을 되돌립니다. GUI는 새 gui/src/model-picker-order.ts로 alphabetical/provider/most-used 스냅샷을 만들고, native/featured 밴드는 유지합니다.

후속 커밋들이 usage attribution, post-save status read, lint allowlist, deletion intent, stale-banner, config-key 타입을 고쳤고, 본문은 contract-test 실패 수리 중이라 DRAFT를 유지한다고 적습니다. docs model-ordering.md, structure 문서, i18n, 스크린샷, 통합 테스트가 큽니다(+1322/-63). checkout에 Models.tsx, agent-settings-routes.ts, types/config.ts, filterCatalogVisibleModels는 이미 있고, model-picker-order.ts는 이 층 신규입니다. #2802와 겹치는 표면이라 “우산을 바꾸지 않고 정렬만 저장하는지”가 핵심 검토 포인트입니다.

src/types/config.ts modelPickerOrderMode - 새 optional 필드. types/config 분할 캠페인과 맞물릴 수 있으나 작은 추가라 닫기보다 수용이 자연스럽다.
src/server/management/agent-settings-routes.ts PUT - roster-only vs picker-only 업데이트를 가르고, picker 저장 후에만 Claude desktop sync를 건너뛴다. 계약이 길어져 실패 경로·409 provenance를 CI로 잠가야 한다.
gui/src/model-picker-order.ts most-used - resolvedModel을 집계 증거가 아니라 관측으로만 취급한다. 요청 identity 기준 랭킹 주석·테스트와 맞다.
gui/src/pages/Models.tsx app-server read - generation/base 가드로 A/B 레이스를 줄였다. 피커 본론 옆의 상태 읽기 수리라 범위가 넓어 보이지만 동반 버그픽스로 읽힌다.
src/config/rebase-provenance.ts - 삭제 intent 보존. 피커 clear와 config rebase가 만날 때 필요한 장치다. 포맷 미지원 시 409.
#2802 - native advertised 앞 5개·featured 밴드 보존을 본문이 약속한다. 우산 collapse를 다시 펼치지 않는지 꼭대기 CI·픽스처로 확인이 필요하다.

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

너의 추천
DRAFT 유지(꼭대기·수리 중). Track4 결합 검증이 초록이고 아래 네 층 리뷰 이슈가 없으면 #3797부터 바닥 위로 admin 머지. #2802와 겹쳐 중우선이고, 로스터를 덮어쓰지 않는 분리는 맞다. 실패 저장 롤백·usage 랭킹 계약이 깨지면 머지 보류.

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

@lidge-jun
lidge-jun changed the base branch from codex/t4-04-log-polling-81a8 to dev September 6, 2026 18:26
@lidge-jun
lidge-jun marked this pull request as ready for review September 6, 2026 18:26
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 6, 2026 18:26
@lidge-jun
lidge-jun merged commit 8615f1a into dev Sep 6, 2026
40 of 42 checks passed
@lidge-jun
lidge-jun deleted the codex/t4-05-picker-81a8 branch September 6, 2026 18:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T18:28:29.195015Z d1915c4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant