feat(console): dev-seeded admin credentials hint on the login page#2635
Merged
Conversation
The framework seeds admin@objectos.ai/admin123 on an empty dev DB, but the login page gave no signal it exists — new users signed up and fell into an empty non-admin workspace (framework 15.1 third-party eval P2). Render a dismissible amber banner above the login card when /api/v1/auth/config reports devSeedAdmin. The field is server-gated: present only under NODE_ENV=development while the seed account still verifies against the default password (framework#3108), so production can never show it. Dismissal persists per browser (os.console.devAdminHintDismissed). Browser-verified against a real dev backend: banner renders (zh locale), dismiss hides + survives reload, clearing the flag restores it; absent config renders nothing. 3 new vitest cases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题(framework 15.1 第三方评估 P2 #4 前端侧)
dev 模式空库自动 seed
admin@objectos.ai/admin123,但登录页毫无提示——新用户去「注册」,掉进普通角色的「还没有应用」空工作区。实现
LoginPage复用现有getAuthConfig()effect 读取新的devSeedAdmin字段(framework#3108 加入/api/v1/auth/config,服务端门控:仅NODE_ENV==='development'且 seed 账号仍是默认密码时存在;生产由构造保证绝不出现,改密后一次重启即消失)role="status"横幅:「开发实例 / 可使用内置的开发管理员登录:admin@objectos.ai/admin123」,凭据等宽 code 呈现localStorage['os.console.devAdminHintDismissed']按浏览器持久化auth.login.devAdminHint.*(en + zh,其余 locale 走 defaultValue 回退)验证
devSeedAdmin时不渲染 ✓配套框架 PR:objectstack-ai/objectstack#3108(后端字段 + 终端 banner 持久化)
🤖 Generated with Claude Code