Skip to content

feat(ui): remove standalone admin Key pool tab - #33

Merged
argszero merged 1 commit into
mainfrom
feat/ui-no-admin-keypool
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-no-admin-keypool

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Remove the standalone admin "Key 池" (Key pool) tab. Admins configure upstream keys through the same listing form as regular users on the Sharing page (provider → plan → model, key, quota, availability window) — in enterprise use, admins list keys and employees consume them, which is exactly what a key pool is. No separate admin Key pool screen needed.

Rant reference

Host instruction (rant 2026-08-17T10:56:47, 管理视图移除独立"Key 池"管理):

宿主指出:管理视图不需要有"Key 池"管理。管理员可以和普通用户一样,通过"上架 key"来做——企业场景下管理员在共享管理页上架 key,员工消费,本质上就是 key 池;无需独立的管理员 Key 池界面。

Changes

  • ui/index.html: removed the "Key 池" tab button and its pane (ak-search, add-key-btn, keys-body table); "成员管理" is now the default admin tab; header subtitle updated. Remaining admin tabs: 成员管理 / 用量报表 / 组织管理 / 平台运营
  • ui/js/app.js: removed KEY_STATUS, the tab === "keys" render branch, and the add-key-btn / ak-search / keys-body revoke event bindings
  • ui/js/data.js: removed the KEYS mock (SHARINGS is the listing data source)
  • docs/user-stories.md: bumped to v1.11 — US-12 rewritten (admin configures upstream keys via 上架, shared listing = key pool view, no standalone admin screen); enterprise flow step + alignment table updated
  • docs/architecture.md 4.2: "Key 池" stays as a data-layer concept; added note that the management entry is unified via 上架 (no standalone admin UI)
  • ui/README.md: synced admin section

Verification

  • grep KEY_STATUS|ak-search|add-key-btn|data-key-revoke|keys-body|D.KEYS|data-admin-tab="keys"|data-admin-pane="keys" in ui/ → zero matches (remaining ak-search hits are the Settings page's API-key search, a different feature)
  • node --check ui/js/app.js / ui/js/data.js pass
  • cargo test passes (1 passed)
  • cargo fmt --check passes

Admin no longer needs a separate Key pool management screen: admins
configure upstream keys through the same listing form as regular users
(provider → plan → model, key, quota, availability window) on the
Sharing page — in enterprise use the admin lists keys and employees
consume them, which is exactly what a key pool is. Remove the admin
"Key 池" tab and its pane (add-key button, keys-body table, revoke
handling, KEYS mock); remaining admin tabs: members, usage, org, ops.
"Key 池" stays as a data-layer concept (docs/architecture.md 4.2 notes
the unified entry). Syncs docs v1.11 (US-12, enterprise flow, alignment
table) and ui/README.md.

Refs: rant 2026-08-17T10:56:47 (管理视图移除独立"Key 池"管理)
@argszero
argszero merged commit 7d158f8 into main Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant