fix(app-shell): retarget better-auth empty-state copy off unreachable identity workflows#2019
Merged
Merged
Conversation
… identity workflows (cloud#580) On a fresh (single-org) env, the Users (sys_user) empty state told admins to "Use the dedicated identity workflows (Invite User, Reset Password, …)" — but neither is reachable there: the env-level `invite_user` action is deliberately multi-org-gated (hidden in single-org), and no "Reset Password" toolbar action exists. The copy advertised dead ends during onboarding. Per ADR-0024 D9 / D5.2 (Accepted): org membership + invites live at the org level (better-auth organization plugin) and env users arrive via SSO JIT; there is intentionally no env-level invite affordance in single-org. So the copy, not the missing button, is the defect — option (b) in cloud#580. - managedByEmptyState: make the better-auth empty state object-aware. sys_user gets actionable copy (invite at the org level → SSO just-in-time provisioning; app end-users self-register). The other ~17 better-auth identity tables (sessions, tokens, jwks, …) get accurate generic copy and no invite/signup CTA. Pass objectDef.name from ObjectView. - i18n (en/zh): reword list.managedBy.betterAuth.message; add betterAuthUser. - ManagedByBadge: drop the "(Invite User, Reset Password, Revoke Session, Rotate Key, …)" tail from the tooltip; keep the why-direct-edits-are-unsafe explanation. - Add managedByEmptyState unit test (locks the copy + the cloud#580 regression). Framework's invite_user multi-org gate is intentional and unchanged. Co-Authored-By: Claude Opus 4.8 <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.
Fixes the copy half of objectstack-ai/cloud#580.
Problem
On a fresh (single-org) env, Setup → People & Organization → Users (
sys_user) → All Users shows an empty state that points at workflows the admin cannot reach:invite_useris deliberately multi-org-gated (features.multiOrgEnabled != false) → hidden in single-org.So the empty state advertises dead ends during onboarding.
Decision (option (b), per ADR-0024 — Accepted)
ADR-0024 D9 / D5.2 settle this: org membership + invites live at the org level (better-auth
organizationplugin) and env users arrive via SSO just-in-time provisioning; there is intentionally no env-level invite affordance in single-org. The defect is therefore the copy, not a missing button. Framework'sinvite_usermulti-org gate is correct and left unchanged — this PR is objectui-only.Change
The single
better-authempty state is shared by ~18 identity tables (sys_user,sys_session,sys_account,sys_api_key,sys_jwks, the oauth_* tables, …), so the rewrite stays accurate across all of them and onlysys_usergets an actionable CTA:sys_userempty stateresolveManagedByEmptyState()gains an optionalobjectNamearg;ObjectViewpassesobjectDef.name. i18nen/zhreworded + a newbetterAuthUserbundle.Test / verification
managedByEmptyState.test.ts— asserts the sys_user vs generic split and a cloud#580 regression guard (never names "Invite User"/"Reset Password").vitest run→ 5 passed.@object-ui/i18ntsc --noEmitclean (en/zh valid againstTranslationKeys).🤖 Generated with Claude Code