Skip to content

fix(console): hide the dev admin chip when email and password sign-in is off - #30531

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-30420-dev-admin-chip-password-off
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-30420-dev-admin-chip-password-off

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread
Fixes #30420

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Console 登录页在服务端关闭邮箱+密码登录时,不再显示「Sign in as dev admin」开发管理员入口。
  • 为什么改:该入口用邮箱+密码登录,密码登录关闭时服务端必然拒绝(EMAIL_PASSWORD_DISABLED),页面其余部分已只显示 Google 等提供方,入口是误导。
  • 风险与回滚:仅 os dev 开发环境可见的一行渲染条件,生产从不下发 devSeedAdmin;回滚即 revert 本 PR。
  • 先看:ui/apps/console/src/pages/auth/LoginPage.tsx 中 DevAdminRow 的渲染条件;其次测试文件新增两例。
  • 两分钟验证:pnpm --dir ui exec vitest run apps/console/src/pages/auth/__tests__/LoginPage.dev-admin-hint.test.tsx,预期 12 passed。
  • 需要你做的:无,席位落地。

What changes

  • LoginPage drew the dev-seeded admin row on devSeedAdmin alone. It now draws it only when /api/v1/auth/config does not report emailPassword.enabled: false, the same answer LoginForm reads to hide the password form (config?.emailPassword?.enabled === false). The condition reads the authConfig state the "Read public auth config" effect already stores; that effect and the "Post-login orchestration" effect are unchanged.
  • Changeset: .changeset/30420-dev-admin-chip-password-off.md, @object-ui/console patch.

Tests

ui/apps/console/src/pages/auth/__tests__/LoginPage.dev-admin-hint.test.tsx, two new cases:

  • seed + emailPassword.enabled: false (Google configured) → no dev-admin-hint row, no chip, read after the Google button appears;
  • seed + emailPassword.enabled: true → row and chip (positive control; the existing seed-only case covers the absent key).
Readings
  • Target file at e8c3c5f4: Test Files 1 passed (1), Tests 12 passed (12), lock VERDICT command-exit 0.
  • Whole apps/console/src/pages/auth/ at the merged head f302e1af: Test Files 28 passed (28), Tests 230 passed (230), lock VERDICT command-exit 0.
  • Ablation (fix committed first; scripts/ablation-replace.mjs, anchor devSeedAdmin && authConfig?.emailPassword?.enabled !== false ? ( replaced by devSeedAdmin ? (, anchor x1 → x0, blob 3d2fbca8b466 → fa92222ba639): × renders no row when the server turned email and password sign-in off, Tests 1 failed / 11 passed. Restored: blob == HEAD (3d2fbca8b466), git diff HEAD empty.
  • pnpm --filter @object-ui/console run type-check: exit 0. ESLint on both touched files: exit 0.

Acceptance notes

  • The whole row (label and chip) is hidden, not only the chip: the row exists to offer the seeded password account, which cannot sign in while password sign-in is off.

Verification

Gates
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN, all with recorded exit codes, every one exit 0 (run at e8c3c5f4; the merge of origin/main into f302e1af brought no change to the three changed paths, and the derivation at f302e1af names the same 34).
  • Also run, exit 0: pnpm --dir ui run check:spec-symbols, node scripts/check-sdui-manifest.mjs, pnpm check:changeset-fixed, pnpm --dir ui exec vitest run scripts/ (Test Files 170 passed / 2 skipped).
  • CI families: read from this PR's check-runs.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgVfPeFZkN1FP93imKU

… is off

The dev-seeded admin row signs in with email and password; when
/api/v1/auth/config reports emailPassword.enabled false the server refuses
that sign-in, so the row is no longer drawn.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVfPeFZkN1FP93imKU
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 5, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · os-sales · session_01L6bhgVfPeFZkN1FP93imKU

维护者速读

  • 改了什么:服务端关闭邮箱+密码登录时,Console 登录页不再显示「Sign in as dev admin」开发管理员一行(整行连同按钮都不画)。没关时照旧显示。
  • 为什么改:这一行用种子账号的邮箱和密码登录,密码登录关闭时服务端一定拒绝(EMAIL_PASSWORD_DISABLED),页面其余部分已经只显示 Google 等提供方,这一行是误导(Console sign-in page offers "Sign in as dev admin" when email and password sign-in is off, and the server refuses it #30420)。
  • 风险与回滚:只改一处渲染条件,读的是页面已存的 /api/v1/auth/config 回答,与 LoginForm 隐藏密码表单用的是同一个字段;devSeedAdmin 只在 os dev 开发环境下发,生产不受影响。回滚即撤本 PR。
  • 先看:ui/apps/console/src/pages/auth/LoginPage.tsx 中 DevAdminRow 的渲染条件;其次 LoginPage.dev-admin-hint.test.tsx 新增的两例。
  • 两分钟验证:pnpm --dir ui exec vitest run apps/console/src/pages/auth/__tests__/LoginPage.dev-admin-hint.test.tsx,预期 12 passed。
  • 需要你做的:无,席位落地。
  • 席位意见:可合。

席位核对 — ACCEPT · head f302e1a

  • 形态:3 文件 +40/−2(LoginPage.tsx +6/−1、测试 +24/−1、changeset @object-ui/console patch +10)。check-governed-merges --pr 30531:NOT governed,42 行 ≤ 3000。Fixes #30420,draft,目标 main。席位逐行读过源码 diff:条件从 devSeedAdmin ? 改为 devSeedAdmin && authConfig?.emailPassword?.enabled !== false ?,authConfig 是「Read public auth config」effect 已经存下的状态;该 effect 与「Post-login orchestration」effect 都没动,所以与本席并行的 Sign-in page: a language picked before signing in is not saved as the person's own preference when they have none (save after #30157) #30399(同文件、只动后者)不相交。字段缺省时(旧服务端不报 emailPassword)仍显示,与 LoginForm 的 === false 判断同向。
  • 契约:Clause-② no,Metadata-protocol none,与认领 6659724001 一致:没有新导出,没有新语言键,没有新路由读取。
  • 前提实测:dev 报告 6660312915。席位核对过拒绝来源:EMAIL_PASSWORD_DISABLED 在 packages/plugins/plugin-auth/src/sign-in-method-floor.ts;devSeedAdmin 只在 NODE_ENV=development 下发。消融:修复先提交,用 scripts/ablation-replace.mjs 把条件换回 devSeedAdmin ? (,新增的关闭用例红(1 红 11 绿),还原后 blob 与 HEAD 相同。合并 main 后的 head 上 pages/auth/ 28 文件 230 绿;派生门禁 34 条全部 exit 0,0 NOT-MEASURED。
  • 门禁 check-runs:head 上 55 个,44 success,11 skipped(ui-only diff 的预期跳过),0 红。mergeable_state clean。
  • 接受的偏差:提交尾行一开始按席位派单写了带模型名的 Co-Authored-By,被 pre-push check:commit-card-trailers 拒绝,dev 在推送前改成无模型名的一对尾行,没有绕过;这是席位派单的错,已在本席记忆里改正。正文速读用的是半角标点,本记录已改用全角。
  • 范围外去向:无。
  • 落地条款:中继 pr_ready + automerge_enable。合并后由 Fixes 关卡,席位同一笔摘掉 pm:dispatched 并留落地评论。

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console sign-in page offers "Sign in as dev admin" when email and password sign-in is off, and the server refuses it

1 participant