Repository navigation
feat(console): the create-workspace dialog shows the unpaid-organization limit refusal and its next step - #38047
objectstack-fleet[bot] wants to merge 4 commits into
Conversation
…ion limit refusal and its next step Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: First record on this PR. The face is the declaration alone: ① Derived judgments
② Semver level
③ Boundary flags
Findings. None is must-fix or should-fix.
Implemented-by: VERDICT: PASS |
… the frozen workspace namespace Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of record 7228012752 (PASS at ① Derived judgments
② Semver level
③ Boundary flags
Findings of record 7228012752, at this head. No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK 维护者速读
席位核对 — ACCEPT · repo:objectstack#6 · head
|
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Landing: seat ACCEPT and contract review PASS 7228629756 at head |
Fixes #34221
Clause-②: yes (widening) —
@object-ui/i18ngainsorganization.errors.unpaidOrganizationLimitReachedandorganization.viewPlansin every localeMetadata-protocol: none
维护者速读
What changes
orgErrorMessage.tsmapsUNPAID_ORGANIZATION_LIMIT_REACHED. The row is markedpreferUserMessage, so the control plane's ownuserMessageis shown as sent: it is written in the request's language and names the next step (ruling C on Studio: an unconfigured nav item vanishes from the navigation editor after reload while still counted as a pending draft; publish dialog shows raw type names in zh #32440, the same ruleSettingsPageapplies to the delete refusal). A refusal without auserMessageshows the new console keyorganization.errors.unpaidOrganizationLimitReached, in all eleven locales. That sentence names no number and no plan. Every other row ignoresuserMessageexactly as before.readOrgCreateNextStep(err)readsdetails.next_step(upgrade_to_team|contact_support), for this code only. Values this console does not know read as no step.CreateWorkspaceDialogdraws a link under the error when the step isupgrade_to_teamAND the host servesgetUpgradeUrl()(new keyorganization.viewPlans). The console never builds the address (ADR-0060; the runtime-config contract).contact_supportdraws no link: the sentence already names the contact address.origin/main(packages/service-cloud/src/unpaid-organization-cap.ts): 403, flat{ code, message, userMessage, details: { unpaid_organization_limit, unpaid_organizations, next_step } }.createOrganizationthrows throughtoAuthError, which carriescode,userMessageanddetailsfrom the flat body, or from the ADR-0112 envelope'serrorwhen the flat body has none.createWithGeneratedSlugrethrows any refusal that is not a slug collision unchanged, so the code reaches the dialog.Tests
orgErrorMessage-4474.test.ts, new describe: produceruserMessagepreferred; pack fallback when it is absent or blank; every pack defines the key, no digits, not the English;readOrgCreateNextStepfor both steps, an unknown step, no details, another code, and a bare Error; CONTROL:YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONSstill maps to its pack sentence and ignores auserMessage. The mapping-table code list gains the new code.CreateWorkspaceDialog.test.tsx, new top-level describe:upgrade_to_teamwith a served entry shows the sentence and a link to it, with no retry and no provision; with no served entry there is no link;contact_supportshows no link; a refusal withoutuserMessageshows the zh pack sentence; CONTROL: better-auth's limit refusal shows no link.Acceptance notes
/auth/confignor discovery states the unpaid limit. The only source is the refusal itself.createStudioRuntimeConfigPlugin) serves noupgradeUrltoday. Tenant runtimes get one fromcloud-runtime-config-plugin. So on the control plane console, where this cap fires, the link stays hidden until cloud serves the key there. The sentence still gives the step. Carrier: cloud.Verification
Read first, by risk:
ui/packages/app-shell/src/console/organizations/orgErrorMessage.ts: thepreferUserMessagebranch inresolveOrgErrorMessage, andreadOrgCreateNextStep.ui/packages/app-shell/src/console/organizations/CreateWorkspaceDialog.tsx: thesetUpgradeUrlline in the catch, and the link.ui/packages/i18n/src/locales/*.ts: the two new keys.Two-minute check:
cd ui && pnpm exec vitest run packages/app-shell/src/console/organizations/__tests__/orgErrorMessage-4474.test.ts. Expected: every test passes, including the six in theUNPAID_ORGANIZATION_LIMIT_REACHEDdescribe.Commit
4dd68691(all local readings below were taken on this head):Targeted tests (vitest, from ui/)
CreateWorkspaceDialog.test.tsx,orgErrorMessage-4474.test.ts,all-locales-key-parity.test.ts,en-zh-key-parity.test.ts: Test Files 4 passed (4), Tests 113 passed (113), lock VERDICT command-exit 0.Ablation: with the
preferUserMessagebranch disabled and thesetUpgradeUrlread stubbed out on disk, 3 tests went red (the userMessage pin, plus the two dialog upgrade cases). Restored from HEAD, and the tree was clean afterwards.Typecheck and lint
pnpm --filter @object-ui/i18n type-check && pnpm --filter @object-ui/app-shell type-check(both includetsconfig.test.json): exit 0.eslinton the four touched app-shell files: 0 errors, 1 pre-existing warning (react-hooks/refsondefaultNameRef, untouched).Derived gate families
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 42 local commands derived from the diff vs merge basec151c4993, all exit 0 (each captured before any pipe);--ranreconciliation exit 0. The repo-wide lint and the full farm are left to CI.Generated by Claude Code