Skip to content

feat(models): delete custom definitions and hide provider rows - #3721

Merged
lidge-jun merged 11 commits into
devfrom
codex/lane-b-04-management
Sep 5, 2026
Merged

feat(models): delete custom definitions and hide provider rows#3721
lidge-jun merged 11 commits into
devfrom
codex/lane-b-04-management

Conversation

@lidge-jun

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

Copy link
Copy Markdown
Owner

Summary

Provider Models now distinguishes deleting a custom definition from hiding a catalog row. Delete uses the stored record ID and can reveal an underlying native or discovered model; Hide changes only the represented row's visibility. The existing Models page remains available to restore hidden rows, including from an empty provider tab.

The workspace uses existing canonical model DTOs for identity, counts and actions. It waits for current model/selection observations and custom ownership before writing, preserves account-native/manual namespace collisions, and reconciles failed or ambiguous replies without duplicate writes, implicit unhide or browser-only removal markers. Counts describe non-disabled inventory before search/truncation, not selected-model or upstream-discovery counts.

This is the UI child of #3717 and carries the remaining #3659 work from ff4e5cd, preserving gqchen's contribution. Original #3659 closes only after both capabilities are verified on dev. The source diff uses its true merge base; previously integrated Grok text/settings were preserved after correcting our carry boundary.

Landing: rebased onto dev 2f124a1 at the maintainer's explicit request, with original gqchen commit authors preserved. Rebased head 285832f has tree dbb5c1909c5a11467ce3d7346b990125a4a35b07, identical to the previously inspected clean composition of dev and the tested pre-rebase head. Admin merge is explicitly authorized without waiting for post-rebase CI. The static parent #3717 is included by equivalent rebased commits, not by its old commit IDs. Original #3659 and the superseded parent will close after inclusion on dev is verified.

Verification

  • Independent C4 identity, management-contract and final source reviews passed. The proposed new disabled-map API was omitted; existing endpoints and validation stay authoritative.
  • Remote real management API/persistence tests: 23 pass / 0 fail. GUI full suite at 8d987d8: 1,623 pass / 0 fail; the subsequent search-only refinement at a02ab77 passed its owning test file, GUI lint, i18n and build. The screenshot commit changes no application source; exact-head CI 33997032425 completed successfully, including all Linux/macOS test shards, GUI tests/lint/build, typecheck, privacy and packaging producers.
  • The earlier rail-locator and carry-induced Grok-key build failures remain recorded. Actual counts/persistence assertions and lint rules were retained.
  • Actual compiled browser flows passed: custom-only delete/re-add/remount, native and discovered restoration, exact native/routed Hide and Models restore, search/count independence, and a persisted POST followed by 503 with exactly one POST and no duplicate definition after Retry/Enter. At 390×844, there was no horizontal overflow and keyboard navigation reached every row action. Owned browser/server processes were stopped.
  • No local suite, typecheck or build was executed. Root/API/full-GUI/docs evidence was reused only with explicit unchanged-input or focused-delta proof; prior failed attempts remain recorded.

Implemented provider model controls

Actual remotely compiled dashboard with synthetic API state: discovered Hide, custom Delete, matching inventory count and Models recovery. Capture source a02ab77; this artifact commit preserves those application bytes. Persistence, error recovery and the true 390px viewport were subsequently verified on the same application bytes.

  • React Doctor is a separate gate: b33 reported one repeated-lookup warning and four test-code diagnostics. Pre-rebase head 9af03d0 fixes the lookup with a Set, publishes test controls in effects and removes an unused binding. No rule/threshold/assertion was relaxed. Cold pinned 0.9.11 and hosted Doctor 33998617609 passed with zero diagnostics; 66 affected GUI tests, lint, i18n and build passed remotely. Pre-rebase cross-platform CI 33998617606 passed. This evidence applies to 9af03d0; no post-rebase CI success is claimed.
  • Browser captures remain attributed to a02. The later production delta is the independently reviewed equivalent Set-membership lookup, with no layout, labels, action identity or state-machine changes; no byte-identical or repeated 9af browser run is claimed.

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: gqchen 276851182@qq.com

Summary by CodeRabbit

  • New Features

    • Added provider workspace controls for adding, copying, hiding, and deleting custom models.
    • Hiding changes catalog visibility without deleting definitions or changing routing behavior.
    • Added visibility management access from provider workspaces and models pages.
    • Static providers now include the configured default model and retained models when applicable, with duplicates removed.
    • Provider model counts reflect unique, non-disabled inventory entries.
  • Documentation

    • Updated dashboard, configuration, and integration guidance across supported languages to explain model management and catalog behavior.

@coderabbitai

coderabbitai Bot commented Sep 5, 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: 3874d93b-d2d3-42d7-b24b-aa4f2acbdf4d

📥 Commits

Reviewing files that changed from the base of the PR and between 2f124a1 and 285832f.

⛔ Files ignored due to path filters (1)
  • docs-site/public/pr-screenshots/3659-provider-model-removal.png is excluded by !**/*.png
📒 Files selected for processing (57)
  • devlog/_plan/260906_lane_b_catalog_stack/035_ordering_landing.md
  • devlog/_plan/260906_lane_b_catalog_stack/040_management.md
  • devlog/_plan/260906_lane_b_catalog_stack/041_static_verification.md
  • devlog/_plan/260906_lane_b_catalog_stack/042_management_build.md
  • devlog/_plan/260906_lane_b_catalog_stack/043_carry_boundary.md
  • devlog/_plan/260906_lane_b_catalog_stack/044_react_doctor.md
  • docs-site/src/content/docs/fr/guides/codex-integration.md
  • docs-site/src/content/docs/fr/guides/web-dashboard.md
  • docs-site/src/content/docs/fr/reference/configuration/providers.md
  • docs-site/src/content/docs/guides/codex-integration.md
  • docs-site/src/content/docs/guides/web-dashboard.md
  • docs-site/src/content/docs/ja/guides/codex-integration.md
  • docs-site/src/content/docs/ja/guides/web-dashboard.md
  • docs-site/src/content/docs/ja/reference/configuration/providers.md
  • docs-site/src/content/docs/ko/guides/codex-integration.md
  • docs-site/src/content/docs/ko/guides/web-dashboard.md
  • docs-site/src/content/docs/ko/reference/configuration/providers.md
  • docs-site/src/content/docs/reference/configuration/providers.md
  • docs-site/src/content/docs/ru/guides/codex-integration.md
  • docs-site/src/content/docs/ru/guides/web-dashboard.md
  • docs-site/src/content/docs/ru/reference/configuration/providers.md
  • docs-site/src/content/docs/tr/guides/codex-integration.md
  • docs-site/src/content/docs/tr/guides/web-dashboard.md
  • docs-site/src/content/docs/tr/reference/configuration/providers.md
  • docs-site/src/content/docs/zh-cn/guides/codex-integration.md
  • docs-site/src/content/docs/zh-cn/guides/web-dashboard.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/providers.md
  • docs-site/src/content/docs/zh-tw/guides/codex-integration.md
  • docs-site/src/content/docs/zh-tw/guides/web-dashboard.md
  • docs-site/src/content/docs/zh-tw/reference/configuration/providers.md
  • gui/src/components/provider-workspace/ProviderDetails.tsx
  • gui/src/components/provider-workspace/ProviderModelChip.tsx
  • gui/src/components/provider-workspace/ProviderModels.tsx
  • gui/src/components/provider-workspace/ProviderWorkspaceShell.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/icons.tsx
  • gui/src/pages/Providers.tsx
  • gui/src/provider-workspace/model-inventory.ts
  • gui/tests/accounts-focus-provider-scope.test.tsx
  • gui/tests/provider-capacity-shell.test.tsx
  • gui/tests/provider-model-custom-add.test.tsx
  • gui/tests/provider-model-inventory.test.ts
  • gui/tests/provider-model-management.test.tsx
  • gui/tests/provider-quota-refresh-settle.test.tsx
  • gui/tests/rail-hover-delete-dom.test.tsx
  • src/codex/catalog/provider-fetch.ts
  • structure/03_catalog-and-subagents.md
  • tests/codex-integration/codex-catalog.test.ts
  • tests/codex-integration/model-visibility-management-api.test.ts

📝 Walkthrough

Walkthrough

The change adds static default-model seeding and updates catalog documentation and tests. It also adds validated model inventory handling and provider-workspace controls for adding, deleting, hiding, restoring, and counting models.

Changes

Catalog and provider model management

Layer / File(s) Summary
Static catalog seeding and verification
src/codex/catalog/provider-fetch.ts, tests/codex-integration/codex-catalog.test.ts, docs-site/src/content/docs/*, structure/03_catalog-and-subagents.md
Static providers seed defaultModel and retainModels when applicable. Tests cover ordering, deduplication, filtering, fallback, authoritative empty results, and no-discovery behavior. Documentation is updated across supported locales.
Validated inventory and revision-bound workspace state
gui/src/provider-workspace/model-inventory.ts, gui/src/components/provider-workspace/ProviderWorkspaceShell.tsx, gui/src/components/provider-workspace/ProviderDetails.tsx, gui/src/pages/Providers.tsx
The GUI validates model, selection, custom-model, and refresh DTOs. The workspace loads paired snapshots and passes model rows, revisions, and readiness state through the provider details path.
Provider model actions and feedback
gui/src/components/provider-workspace/ProviderModels.tsx, gui/src/components/provider-workspace/ProviderModelChip.tsx, gui/src/icons.tsx, gui/src/i18n/*
The provider workspace supports custom-definition deletion, catalog-only hiding, visibility recovery navigation, disambiguated copying, focus restoration, and reconciled mutation feedback. Localization keys cover the new states.
Management API and UI regression coverage
tests/codex-integration/model-visibility-management-api.test.ts, gui/tests/provider-model-management.test.tsx, gui/tests/provider-model-custom-add.test.tsx, gui/tests/provider-model-inventory.test.ts
Tests cover exact DELETE and visibility PUT behavior, identity isolation, readiness gates, failed reads, retries, provider changes, persistence, DTO validation, counts, focus, and re-adding custom definitions.

Estimated code review effort: 5 (Critical) | ~120 minutes

Suggested reviewers: wibias

Sequence Diagram(s)

sequenceDiagram
  participant ProviderWorkspaceShell
  participant ModelInventory
  participant ProviderModelInventory
  participant CustomModelAPI
  participant ModelVisibilityAPI
  ProviderWorkspaceShell->>ModelInventory: Parse paired model snapshots
  ModelInventory-->>ProviderWorkspaceShell: Return rows, selection, revision, and counts
  ProviderWorkspaceShell->>ProviderModelInventory: Pass current rows and readiness
  ProviderModelInventory->>CustomModelAPI: Read custom ownership
  ProviderModelInventory->>CustomModelAPI: Delete custom definition when confirmed
  ProviderModelInventory->>ModelVisibilityAPI: Update visibility when Hide is confirmed
  ProviderModelInventory->>ProviderWorkspaceShell: Request refresh and reconcile persisted state
Loading
✨ 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/lane-b-04-management

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

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 59 / 80

이 PR은 #3717 위의 UI 자식입니다. 원본 #3659의 나머지, 즉 프로바이더 워크스페이스에서 커스텀 정의 Delete와 카탈로그 행 Hide를 갈라 줍니다. 지금 dev에는 정적 default 시드(#3717)와 Delete/Hide 계약이 아직 없고, 사용자는 발견된 행과 저장된 커스텀을 같은 “지우기”로 섞기 쉽습니다. 이 브랜치는 기존 /api/models DTO와 custom DELETE·visibility PUT만 쓰며, selected-models에 disabled 맵을 새로 넣지 않습니다(계획 040_management.md가 소스 hunk를 명시적으로 거부).

핵심 파일은 gui/src/provider-workspace/model-inventory.ts(DTO 경계 파서·카운트), ProviderModels.tsx / 새 ProviderModelChip.tsx, ProviderWorkspaceShell.tsx의 revision-bound 페어 읽기, GUI 테스트(provider-model-management / provider-model-inventory / custom-add 갱신), tests/codex-integration/model-visibility-management-api.test.ts, web-dashboard 다국어, 스크린샷입니다. Delete는 저장된 레코드 ID 한 번만, Hide는 확인된 서버 행에 visibility PUT 한 번만. 브라우저-only tombstone은 없고, 숨긴 행 복구는 기존 Models 페이지입니다. 카운트는 검색/300칩 상한 전 non-disabled 인벤토리입니다.

주의할 점이다. 파일 목록에 devlog/_fin/260906_a_* A 스택 아카이브와 affinity/capabilities/command-code 테스트 등 #3716/#3718 계열 머지 흔적이 많이 끼어 있습니다. 베이스가 #3717(그리고 중간에 dev merge)이라 diff 통계(+2932)가 관리 UI보다 커 보입니다. 리뷰·랜딩 때는 관리 UI 커밋과 A closeout 문서/회귀를 구분해야 합니다. draft이고 부모 #3717이 먼저 열려 있습니다. gqchen Co-authored-by를 유지한다고 본문에 적혀 있습니다.

우선순위 59인 이유다. #3659를 끝내려면 필수 자식이고 카탈로그 UX에 직접 닿지만, 부모 시드 없이 단독 머지할 수 없고 A 스택 잡음이 diff를 부풀립니다. #3720 Desktop 화재보다는 한 단계 아래입니다.

경로/심볼 - gui/src/provider-workspace/model-inventory.ts - 기존 DTO 엄격 파서, provider 그룹/카운트, custom 응답 identity.
경로/심볼 - gui/src/components/provider-workspace/ProviderModels.tsx - revision readiness, Delete vs Hide 단일 요청, 모호 응답 시 중복 쓰기/암시 unhide 금지.
경로 - gui/src/components/provider-workspace/ProviderModelChip.tsx - 접근 가능한 copy/Delete/Hide 리프.
경로 - gui/src/components/provider-workspace/ProviderWorkspaceShell.tsx - models+selected 페어 채택, revision/readiness.
경로 - gui/tests/provider-model-management.test.tsx 등 - Delete/Hide/리로드/복구·비동기 readiness.
경로 - docs-site guides/web-dashboard.md (다국어) + 3659-provider-model-removal.png - Delete 정의 vs Hide, Models 복구.
경로 - 베이스 #3717 / 원본 #3659 - bottom-up 랜딩·부모 정리 전 자식 retarget(본문). diff 안의 A _fin 문서는 이미 dev에 있는 closeout과 중복될 수 있음.

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

  • 자식 diff에서 A-stack _fin/affinity 머지 커밋을 그대로 둘지, 관리 UI만 남기도록 히스토리를 정리할지
  • 부모 #3717 머지 후 이 PR을 dev로 retarget할 때 충돌·중복 문서 위험
  • GUI exact-head(bun test / lint / lint:i18n / build)와 스크린샷이 본문 검증 주장과 같은 head인지
  • 원본 #3659 close를 두 PR 모두 exact-head CI 이후로 고정할지

너의 추천
부모 #3717을 먼저 머지한 뒤 이 PR을 dev로 retarget하고, 관리 UI·GUI 테스트·스크린샷만 다시 확인한 다음 머지하세요. A _fin 중복이 retarget 후 사라지면 이상적입니다. #3659는 둘 다 dev 검증 후에만 close. types/config 분할에 무효화되면 close-don't-rebase. 미리보기 배포 없음.

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

@lidge-jun
lidge-jun changed the base branch from codex/lane-b-04-static-default to dev September 5, 2026 23:06
t and others added 11 commits September 6, 2026 08:37
Carry the static catalog and documentation portion of #3659 at ff4e5cd. The provider workspace controls follow in a dependent PR. Source implementation includes commit 34ace94.

Co-authored-by: gqchen <276851182@qq.com>
Add real gather controls for omitted/empty models, retained-id deduplication, explicit-list precedence, OAuth/forward no-request paths, and authoritative empty live discovery. Align eight-language static documentation and the source of truth.

Co-authored-by: gqchen <276851182@qq.com>
Carry the UI and management presentation portion of #3659 at ff4e5cd. Follow-up adaptation uses the existing canonical model-row identity and preserves custom-definition deletion separately from hiding an underlying row.

Co-authored-by: gqchen <276851182@qq.com>
The legacy Go fixture already receives a registry default under existing ownership rules. Require exactly that singleton under static seeding, with no metadata roster or network calls. Keep genuine no-default emptiness and add strict custom MiMo transport negatives. Production seeding and ownership rules remain unchanged.

Co-authored-by: gqchen <276851182@qq.com>
Use existing model DTOs and revision-bound ownership for one-operation custom deletion and row hiding. Preserve native restoration, independent visibility, namespace collisions and ordinary copy/default behavior. Reconcile uncertain writes without duplicate mutations or tombstones; expose existing Models recovery. Add real API and asynchronous UI regression coverage plus all locales and dashboard docs.

Co-authored-by: gqchen <276851182@qq.com>
@lidge-jun
lidge-jun force-pushed the codex/lane-b-04-management branch from 9af03d0 to 285832f Compare September 5, 2026 23:39
@lidge-jun
lidge-jun marked this pull request as ready for review September 5, 2026 23:39
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 5, 2026 23:39
@lidge-jun
lidge-jun merged commit 330bf60 into dev Sep 5, 2026
4 of 7 checks passed
@lidge-jun
lidge-jun deleted the codex/lane-b-04-management branch September 5, 2026 23:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-05T23:41:26.220670Z 285832f 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.

2 participants