Skip to content

feat(gui): API Keys workspace view#444

Merged
Wibias merged 6 commits into
lidge-jun:devfrom
Wibias:codex/gui-apikeys-workspace
Jul 25, 2026
Merged

feat(gui): API Keys workspace view#444
Wibias merged 6 commits into
lidge-jun:devfrom
Wibias:codex/gui-apikeys-workspace

Conversation

@Wibias

@Wibias Wibias commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an API Keys workspace layout (left rail for keys + main detail pane) with dedicated CSS and i18n.
  • Wire the page to the global Classic/Workspace sidebar toggle (no per-page view preference).
  • Keep classic stacked API Keys UI available when Classic mode is selected.

Test plan

  • Open #api in Workspace mode — rail lists keys, main shows overview/details
  • Create a key from workspace; confirm it appears in the rail and new-key banner works
  • Delete a key from the detail pane; confirm rail updates
  • Toggle Classic — stacked layout still works (create/copy/delete)
  • Toggle Workspace again — returns to rail/main without a per-page control
  • Spot-check EN / DE / JA labels for workspace strings

Summary by CodeRabbit

  • New Features
    • Added an API key workspace with key selection, details, creation, copying, and deletion.
    • Added responsive layouts for desktop and mobile screens.
    • Added localized workspace labels and guidance across supported languages.
    • API key workspace now respects the selected view mode.

Wibias added 3 commits July 25, 2026 10:27
Adds a workspace layout for the API Keys tab mirroring the Providers
workspace DNA: a left rail listing active keys (name + prefix + created
date), and a main pane that shows either the overview (endpoint, generate
form, usage example) or a per-key detail view with a two-step delete.

The classic view is preserved and toggled via a button in the page head,
with the preference persisted to localStorage (ocx-apikeys-view),
matching the existing Providers workspace/classic pattern.

- New ApiKeysWorkspace component + isolated stylesheet (awi- namespace)
- i18n keys added across en/de/ko/zh/ru/ja (compile-checked against en)
- handleCreate now accepts an optional name so both views share it
- No behavior change to the underlying /api/keys flow
Use the sidebar Classic/Workspace preference instead of the legacy per-page ocx-apikeys-view localStorage key.
@github-actions github-actions Bot added the enhancement New feature or request label Jul 25, 2026
@coderabbitai

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Wibias added 3 commits July 25, 2026 10:46
Restore an Overview path, avoid nested main landmarks, stack via container queries, guard create against Enter repeats, clear the draft name only after successful create, localize the sample input, and replace deprecated word-break.
Add a reliable Overview rail path, parent-level single-flight create with IME-safe Enter handling, clear the draft name only after success, use a section landmark with localized details label, and cover the behaviors with component tests.
@Wibias
Wibias merged commit ebe929f into lidge-jun:dev Jul 25, 2026
9 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 25, 2026
5 tasks
lidge-jun added a commit that referenced this pull request Jul 25, 2026
이 유닛의 최종 목표. 완료 기준 달성:
rg -n 'viewMode|ViewMode|classicToggle|workspaceToggle' gui/src -> 0건

- gui/src/view-mode.ts 삭제 (109줄): ViewMode 타입, 레거시 키 12개
  마이그레이션, providersHash 변환 헬퍼 전부
- App.tsx: 사이드바 토글 버튼과 7개 페이지의 viewMode prop 주입 제거
- 페이지 7개(Dashboard/Providers/Models/Subagents/Usage/ApiKeys/ClaudeCode)의
  Classic 분기 제거, Workspace를 유일 경로로 승격
  (Subagents는 반대 — WP1에서 Classic이 승격됐으므로 prop만 제거)
- 라우팅 3파일 정리: app-routing의 viewMode 결합, hash-routing의
  resolveProvidersHashChange, use-app-route-state의 상태/토글 전부
- i18n 6로케일 x 3키 = 18키 회수 (WP1의 60키와 합쳐 이 유닛 총 78키)
- 레거시 localStorage 키 12개 1회 삭제 (다음 릴리스에서 정리 함수도 제거)
- #providers/workspace 북마크는 passive replace로 #providers 리다이렉트

050 문서가 예측 못 한 것: 문서 작성 이후 머지된 PR #442/#444/#446이
Usage/ApiKeys/ClaudeCode에도 같은 분기를 추가했다. 범위가 4페이지에서
7페이지로 늘었다.

Classic 분기가 사라지며 드러난 죽은 코드 28건도 함께 제거했다 —
OAuthPanel/ProviderCardList import, 수동 코드 입력 흐름, 계정 모드
전환 함수 등 Classic 패널에서만 쓰이던 것들이다.

테스트: view-mode.test.ts / view-mode-remount.test.tsx 폐기.
providers-hash-history.test.tsx는 21케이스 중 토글 개념을 뺀
단일 해시 계약으로 재작성.

브라우저 검증: 사이드바 토글 부재, #providers/workspace -> #providers
리다이렉트, 낡은 localStorage 키 4종 자동 정리 확인.
lidge-jun added a commit that referenced this pull request Jul 25, 2026
Usage(c258b31)와 같은 판단. PR #444/#446의 rail+main 워크스페이스를
걷어내고 두 페이지를 WP5 이전 스택 레이아웃으로 되돌린다.

ApiKeys
- Endpoint/Generate/Active keys/Usage example 패널을 한 화면 연속 스크롤로
- 워크스페이스 시절 개선이던 handleCreate 이중 생성 가드(creatingRef)와
  실패 시 false 반환은 클래식 본문에 유지
- 행 내 삭제 확인(confirmDelete) 인라인 플로우 복원
- components/apikeys-workspace/, styles-apikeys-workspace.css 삭제

ClaudeCode
- settings/quickstart/smallFast/modelMap/aliases 섹션 스택 복원
- settings 섹션의 h-section 헤딩은 워크스페이스 전용이었으므로 제거
  (클식은 subtitle 바로 아래 설정 카드로 시작)
- styles-claudecode-workspace.css 삭제

i18n 6로케일: api.workspace.* 8키 + claude.workspace.settings 회수.
클식이 쓰는 api.subtitle/noKeys/colKey/usageSampleInput은 잔존 확인.

테스트: apikeys-workspace.test.{ts,tsx} -> apikeys-layout.test.ts,
claudecode-layout.test.ts 재작성 (스택 계약 + 키 회수 검증).

검증: bun run typecheck, gui tests 134 pass, 전체 4098 pass,
lint:gui, build:gui 통과. 브라우저 #api/#claude 스크린샷으로
스택 렌더 확인.
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