Why: backend 8dfc223 replaced POST /api/admin/users with strict
{owner, profile} decoding and returned 410 for login-key issuing, so the
UI create form failed with 400 unknown field name. Creation now sends
{owner, profile:{name}} only; password input, admin checkbox and the
login-key issue entry are removed; notice points to the local CLI
initialize-account flow. passwords.ts lost its only consumer.
Evidence: npm run build + npm test (34 files/293 passed) + knip identical
to baseline on the task worktree (SELF).
Impact: UsersPanel and api client only; no style/token changes.
Refs: backend 8dfc223, b9c0a34
Why: independent review flagged the issue client still targeting the 410
endpoint and a hint sentence ending with a period.
Evidence: npm run build + npm test re-run on the fix (SELF).
Impact: api client surface only.
Refs: review brief /tmp/review-brief-admin-user-contract.md
weichen
merged commit 46e99fedbb into main2026-10-16 07:48:50 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
目标
修复管理员建号 UI 400(
json: unknown field "name"):backend 8dfc223 将POST /api/admin/users改为严格{owner, profile}解码,且登录 Key 签发端点替换为 410,前端未跟进。变更
createAdminUser改发{owner, profile:{name}}(严格契约,无多余字段)user initialize-account发放激活 Key 指引src/passwords.ts验证
npm run build(tsc -b + vite)通过;npm test34 文件/293 用例全过;knip 与同 pin 基线逐项一致(SELF,任务卡 evidence)任务卡
Dev 仓 fix/admin-user-create-contract(R0 9edb011)
Why: backend 8dfc223 replaced POST /api/admin/users with strict {owner, profile} decoding and returned 410 for login-key issuing, so the UI create form failed with 400 unknown field name. Creation now sends {owner, profile:{name}} only; password input, admin checkbox and the login-key issue entry are removed; notice points to the local CLI initialize-account flow. passwords.ts lost its only consumer. Evidence: npm run build + npm test (34 files/293 passed) + knip identical to baseline on the task worktree (SELF). Impact: UsersPanel and api client only; no style/token changes. Refs: backend 8dfc223, b9c0a34