Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/skills/coc-knowledge/references/admin-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ When adding UI to the admin page, prefer the existing primitives:
- **Section cards:** `<SettingsCard title=… description=… badge=… dirty saving onSave onCancel data-testid=…>` (renders `.ar-card` with header/body/footer).
- **Settings rows:** the local `AdminRow`, `AdminToggle`, `AdminSeg`, `AdminInputSuffix`, and `SourceBadge` helpers defined at the bottom of `AdminPanel.tsx`. They wrap raw inputs in the new visual chrome while preserving `data-testid`s and `id`s used by tests.
- **Free-form sections** inside a card use `.ar-section`, `.ar-section-head`, and the inline helpers `.ar-input`, `.ar-select`, `.ar-btn`, `.ar-btn-primary` / `-secondary` / `-ghost` / `-danger`(`-outline`), `.ar-pill`, `.ar-badge`, `.ar-pre`, `.ar-code`, `.ar-mono`.
- **AI Provider page:** the `agents` tab content lives in `AIProviderPage.tsx` (not inline in `AdminPanel`). It renders a summary grid (`.aip-summary-grid`), a provider routing table (`.aip-routing-table`) with toggle-based enable/disable and per-row default-provider buttons, and the lazy-loaded `ProviderModelsSection`. All styles use `aip-*` classes in `admin-redesign.css`.
- **New top-level tabs:** add to `AdminSubTab`, `TAB_LABELS`, `TAB_ICONS`, and `TAB_DESCRIPTIONS`, then place the destination in the grouped `navGroups` definition near the bottom of `AdminPanel.tsx` so the sidebar and mobile select expose it in the right user-intent group.

Avoid introducing Tailwind utilities or inline `bg-*`/`text-*` classes for admin-only UI — extend `admin-redesign.css` instead so the look stays cohesive.
517 changes: 517 additions & 0 deletions packages/coc/src/server/spa/client/react/admin/AIProviderPage.tsx

Large diffs are not rendered by default.

245 changes: 31 additions & 214 deletions packages/coc/src/server/spa/client/react/admin/AdminPanel.tsx

Large diffs are not rendered by default.

Loading
Loading