Skip to content

Console: the create-workspace dialog shows the unpaid-organization limit refusal (UNPAID_ORGANIZATION_LIMIT_REACHED) with its next step #34221

Description

@objectstack-fleet

repo:cloud#1 · os-warren · session_01JQwxbYK6SZCmyzbGnrvmkk

Filing gate: ① the console half of objectstack-ai/cloud#4308 (maintainer ruling 6904224158 on that card), named as an objectstack carrier in its contract review (objectstack-ai/cloud PR #4626, record 6904645818). Dedupe: UNPAID_ORGANIZATION_LIMIT_REACHED, organization limit console find #32043 (the member-limit sibling) and nothing on this code.
Consumer: objectstack-ai/cloud#4308 (hosted control plane).

维护者速读

  • 要做的:控制台「新建工作区」对话框认出云端新的拒绝码 UNPAID_ORGANIZATION_LIMIT_REACHED,显示服务端给的本地化说明和下一步(升级到 Team),不再显示通用错误。
  • 为什么:裁定后每个账号最多 2 个不付费组织(免费加开发者),云端第三次创建会返回这个新码;控制台现在只认 better-auth 的 YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS。
  • 需要你做的:无。

Change

  1. ui/packages/app-shell/src/console/organizations/orgErrorMessage.ts maps UNPAID_ORGANIZATION_LIMIT_REACHED the way it maps the existing organization-limit code. Prefer the producer's localized message (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, Platform: user-facing refusal and advisory text comes back in the request's language, composed by its producer (ruling C on #32440, #32043) #32654); fall back to a console string in every console locale. Show details.next_step as an action where the host gives one.
  2. Optional, if the host exposes it: the dialog says before the click that the account is at its unpaid limit. Only do this if discovery or /auth/config states it; do not guess the number.
  3. Done when a test pins the mapped message for the new code and the old code still maps as before.

Activity

  1. added
    enhancement
    pm:queue
    domain:ui
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:cloud · domain:ui · Feature · p2 · pm:queue · size S; rationale: on the third unpaid organization, the create-workspace dialog shows a generic failure instead of the cloud's localized limit sentence and its next step (upgrade to Team). That is a user-facing wrong message on a billing path, so p3 → p2. Its member-limit sibling #32043 is re-graded when it unblocks. Audit restatement, tier 3. Recorded 2026-11-27T08:19Z.

  3. added
    priority:p2
    and removed on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

    Picked by card-pick.mjs --order area:cloud --seat repo:objectstack#6 at 20:10Z: rank 4, order 1 (ranks 1–3 skipped: #37831 released 7213628657 pending a live repro; #37868 and #38024 are outside this seat's area:cloud intake). #38029 (rank 6) waits behind this seat's open #38028 on plugin-auth. The maintainer in this seat's project, verbatim: 「继续处理 area:cloud p1 p2」.

    Claim: PM loop round 9
    Session: session_01Q4EjjQkY5yXZrN9BEA3rEK
    Account: hotlong
    Branch: claude/issue-34221-unpaid-org-limit
    Worktree: objectstack-issue-34221
    Domain: domain:ui
    Seat: repo:objectstack#6
    File surface: ui/packages/app-shell/src/console/organizations/orgErrorMessage.ts, the create-workspace dialog that draws it, their tests, console locale strings in ui/packages/i18n, one changeset
    Container & model: S, mode:subagent, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — console error copy
    Thread-read: 7213420175
    Premise: holds — the dev re-reads on main that orgErrorMessage knows only better-auth's organization-limit code and confirms the cloud's code and envelope (message, details.next_step) from cloud#4308 / PR #4626
    Serial constraints cleared: no open PR names orgErrorMessage (search 20:11Z).
    Scope this dispatch: items 1 and 3; item 2 only if the host already states the limit. Fixes #34221.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
    os-dev-report

    {
      "issue": 34221,
      "status": "done",
      "branch": "claude/issue-34221-unpaid-org-limit",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38047",
      "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK",
      "premise_still_valid": true,
      "summary": "orgErrorMessage now maps UNPAID_ORGANIZATION_LIMIT_REACHED. The row is marked preferUserMessage, so the cloud's localized userMessage is shown as sent, with a console fallback key organization.errors.unpaidOrganizationLimitReached in all 11 locales. The new readOrgCreateNextStep reads details.next_step for that code only. CreateWorkspaceDialog shows a 'View plans and upgrade' link (workspace.viewPlans) when the step is upgrade_to_team and the host serves getUpgradeUrl(); it shows no link for contact_support or when no entry is served. Premise checked on main: before this change the code was unmapped, so err.message was shown verbatim and there was no next-step action. The cloud producer on origin/main (unpaid-organization-cap.ts) answers 403 with a flat {code,message,userMessage,details:{unpaid_organization_limit,unpaid_organizations,next_step}}. createOrganization throws through toAuthError, which reads the flat body first and the ADR-0112 envelope second. createWithGeneratedSlug rethrows the refusal unchanged, so the code reaches the dialog. Item 2 was not done: neither /auth/config nor discovery states the unpaid limit.",
      "tests": "At 4dd68691, from ui/: vitest 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. The first two attempts failed with 'Cannot find package @objectstack/spec/system' and '@objectstack/formula' because dist was missing; after building spec, client, formula, lint and sdui-parser they passed. Ablation, committed first: the preferUserMessage branch disabled and the setUpgradeUrl read stubbed on disk gave Tests 3 failed | 58 passed (the userMessage pin plus 2 dialog upgrade cases). Restored with git restore --source=HEAD --staged --worktree, porcelain clean. Typecheck: pnpm --filter @object-ui/i18n type-check && pnpm --filter @object-ui/app-shell type-check (includes tsconfig.test.json), after turbo build of '@object-ui/app-shell^...' (72/72), VERDICT command-exit 0. eslint on the 4 touched app-shell files: 0 errors, 1 pre-existing react-hooks/refs warning.",
      "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack derived 42 commands (merge base c151c4993, head 4dd68691); all 42 exited 0, each exit captured before any pipe. --ran reconciliation with exit codes: '42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED (a DERIVED zero)'. check-nul-bytes OK. CI check-runs on 4dd68691 at report time: 22 runs, 17 in_progress, 5 skipped, 0 failed (in_progress). Not run locally: test:repo, Type Check UI and repo lint, all CI-owned. check-platform-checklist is n/a because no exported symbol was renamed or removed.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — git push (branch, 3 pushes), fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/38047/assignees, run 46066520253), post-stamped issue comment on #34221",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · The control plane's own runtime config (service-cloud createStudioRuntimeConfigPlugin, used by cloud-stack) serves no upgradeUrl; only tenant runtimes get one (objectos-runtime cloud-runtime-config-plugin). So on the control plane console, where this cap fires, the new upgrade link stays hidden until cloud serves the key there. The producer sentence still names the step · noted in the PR's Acceptance notes, not filed · dedupe words: upgradeUrl control plane runtime config, createStudioRuntimeConfigPlugin upgradeUrl, unpaid organization upgrade link",
        "carrier: none · Deviation from the claim: the claim's Clause-② says no, but the PR and changeset declare 'yes (widening)' because two i18n keys were added to the published @object-ui/i18n, following the dispatch's stated precedent (changeset 34171-managed-password-refusal-copy)"
      ]
    }
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK
    os-dev-report

    {
      "issue": 34221,
      "status": "done",
      "branch": "claude/issue-34221-unpaid-org-limit",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38047",
      "session": "session_01Q4EjjQkY5yXZrN9BEA3rEK",
      "premise_still_valid": true,
      "summary": "Patch round on two CI reds at 4dd68691. New head is df235f64, with commits 48298e0e and df235f64. (1) zh-Hant.ts was regenerated with `pnpm --filter @object-ui/i18n gen:zh-hant` instead of hand-written; the generator turned 帳號 into 賬號 and 方案 into 套餐. (2) ADR-0060 ratchet: `workspace` is a frozen product namespace in ADR-0060's ceiling. The ADR's remedy is a generic key, not an allowlist entry, so the link label moved from `workspace.viewPlans` to `organization.viewPlans`; `organization` (singular) is not frozen and the key does not lead with a product word. The allowlist and the ADR were not touched. The other new key, `organization.errors.unpaidOrganizationLimitReached`, was already outside the frozen set. The changeset was updated to name `organization.viewPlans`. The PR body still names `workspace.viewPlans` in What changes and Verification; per the dispatch contract the dev does not PATCH a PR body, so the seat should correct that line.",
      "tests": "FAILING: on 4dd68691 in a fresh worktree, `vitest run packages/i18n/src/__tests__/zh-hant-generated.test.ts` gave '× src/locales/zh-Hant.ts is byte-for-byte what the generator writes from its zh-Hans source', Tests 1 failed | 9 passed, VERDICT command-exit 1. The ratchet red was taken from CI (Test UI 10/16) and not re-run locally before the fix. PASSING on the fix tree: zh-hant-generated + product-neutral-renderer.ratchet + all-locales-key-parity + en-zh-key-parity + CreateWorkspaceDialog + orgErrorMessage-4474 gave Test Files 6 passed (6), Tests 157 passed (157), VERDICT 0. The wider `vitest run packages/i18n/ packages/app-shell/src/__tests__/` gave Test Files 135 passed (135), Tests 2349 passed | 13 skipped, VERDICT 0. Push mistake: 48298e0e reached the remote even though the app-shell type-check had failed, because the push was not gated on it. The failure was TS2352 on the test's cast of the zh pack. df235f64 fixes the cast, and on that head `pnpm --filter @object-ui/app-shell type-check` plus the CreateWorkspaceDialog, zh-hant-generated and ratchet test files gave Test Files 3 passed, Tests 78 passed, VERDICT 0.",
      "gates": "The derived gate list at df235f64 is identical to the 42-command list from round 1 (diff empty). Re-run locally after this round's pushes, all exit 0: check-adr-0087-registration --base origin/main, check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:published-files, check:cross-package-test-inputs, check-sdui-manifest. The other 35 derived families were not re-run this round; each was green at 4dd68691, and this round's diff touches only locale files, two app-shell console files and the changeset. CI on df235f64 is in_progress at report time; this report does not wait for it.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — git push (2 pushes: 48298e0e, df235f64); post-stamped os-dev-report comment on #34221",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · The PR body of #38047 still names `workspace.viewPlans` (What changes and Verification). The key is now `organization.viewPlans`, and the changeset already says so · noted, not filed",
        "carrier: cloud · unchanged from round 1: the control plane's runtime config serves no upgradeUrl, so the link stays hidden on the control plane console · noted, not filed"
      ]
    }
  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

    Landed by #38047. Follow-ups: objectstack-ai/cloud#5173, objectstack-ai/cloud#5174.

  9. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clouddomain:uienhancementpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions