This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(app-shell): retire DEFAULT_UPGRADE_URL, so no server upgrade URL means no upgrade CTA - #10517
Merged
objectstack-fleet[bot] merged 1 commit intoSep 25, 2026
Conversation
…ns no upgrade CTA The entitlement dialog filled a missing `upgrade_url` (403 details) or `upgradeUrl` (entitlement summary) with a client-side `/settings/billing`, a path no router serves. The destination is the control plane's to name: when it sends one the CTA links to it verbatim, when it sends none the dialog explains the gate and offers no link. The entitlement state no longer carries a synthesized URL; the row-derived and unknown states have none. Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
objectstack-fleet
Bot
deleted the
claude/issue-10437-retire-default-upgrade-url
branch
September 25, 2026 07:16
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #10437
Clause-②: no
What changed
DEFAULT_UPGRADE_URL('/settings/billing') is deleted frompackages/app-shell/src/environment/entitlements.ts, along with all five places that read it. The control plane names the upgrade destination:entitlementDialogFromError(the 403 path): whenerror.details.upgrade_urlis present, the "Upgrade plan" CTA links to it verbatim. When it is absent or empty, the spec carries nocta, and the dialog still explains the gate. The same function already handledcontact_urlthis way.upgradeDialogSpec(the proactive prompt): whenstate.upgradeUrlis present, the prompt gets a CTA. When it is absent, the prompt has nocta.useEnvironmentEntitlements: the summary'supgradeUrlpasses through verbatim, like its siblingcontactSalesUrl. The row-derived and unknown states carry no URL.EnvironmentEntitlementsState.upgradeUrlbecomes optional.EnvironmentEntitlementDialog: no code change. It already renders the CTA only whenspec.ctaexists. Its header comment cited/settings/billingas a URL that "always lands on the real page". That sentence now states the rule: no URL, no CTA.This follows objectui#7273, which removed the tenant Console's hard-coded upgrade fallback so that "no upstream value ⇒ no link at all" (the
onUpgradeguard inAiChatPageand the AI usage ring'sshowCta). The PR introduces no new pattern and no new i18n keys.DEFAULT_UPGRADE_URLwas not re-exported from the package entry, so the publishedexportssurface does not move. Tree-widegit grep DEFAULT_UPGRADE_URLnow returns 0 hits (control:decideEnvironmentCtahits in 3 files).Why the path was dead
The CTA is a full-page anchor resolved against
apiBase, the control-plane origin. The Console declaressettingsonly as a child route of/organizations/:slug(theDefaultSettingsPageroute inapps/console/src/App.tsx). The control plane mounts its console under/_console. No router serves/settings/billing.Triage guard: what the control plane sends (measured, with a reading gap)
Triage asked for a check of what cloud supplies before the fallback is removed. These sources could be read:
objectstack-ai/cloudis unreadable from this session.GET /repos/objectstack-ai/cloud/issues/1869answers 403: "GitHub access to this repository is not enabled for this session". The emitter ofupgrade_url/upgradeUrlon the entitlement surfaces could not be read at its source. This is a declared reading gap.@objectstack/specdeclares neither key anywhere. objectstackorigin/mainfa00ebfpackages/spechas 0 hits (control:ApiErrorSchemahits in the same tree).@objectstack/spec@17.4.0also has 0 hits; that is npmlatestand the version this repo installs (control:ApiErrorSchemahits in itsdist). The entitlement wire shape is owned by cloud, and there is no spec declaration to align to.RuntimeConfigPlugin(packages/cloud-connection) states the same contract. For its adjacentupgradeUrlkey onGET /api/v1/runtime/config, it says the key is absent by default and that "the Console reads 'no key' as 'no link'". It also names a relative path such as/settings/billingas "the control plane's own currentupgrade_urldialect". That is second-hand evidence that the cloud emitter currently sends a value on the 403 path.useConsoleActionRuntime.test.tsxmodels the 403 asdetails: { upgrade_url: '/settings/billing', plan: 'free' }.This does not swap a tolerant default for a hard failure. When the server omits the URL, the dialog still opens with its title and body, and only the link is withheld. Before this change, that link was a full-page navigation to a path no router serves. When the server does send a URL, behaviour is unchanged; the control pins below prove this on the base.
Triage's p2 question is NOT MEASURED. Whether real hosts hit the default (a cloud summary or 403 without a URL) is a fact about the cloud emitter, which cannot be read here. One structural reading does hold. The row-derived and unknown states never reach the upgrade prompt:
decideEnvironmentCtareturnsupgrade_for_developmentonly whencanCreateDevelopmentEnv === false, and only the summary sets that. So the hook's three reads of the default were dead for the dialog. The default could reach a user only through a summary or a 403 that carried no URL.Tests: red on the base, green on the head
New pins, all in
packages/app-shell/src/environment/__tests__/:entitlements.test.ts, blockno server upgrade_url ⇒ no upgrade CTA (objectui#10437): covers DEV_ENV_PLAN_LOCKED and DEV_ENV_LIMIT without a URL, and an empty-string URL. The control is a server URL becoming the CTA verbatim. UnderupgradeDialogSpec: one pin withholds the CTA with noupgradeUrl, one control passes a summary URL through, and one parity pin checks the no-URL case.useEnvironmentEntitlements.test.tsx, blockno synthesized upgrade URL (objectui#10437): a summary without a URL, the derived state and the unknown state each carry no URL. The derived and unknown pins assert that the key is ABSENT. The control is a summary URL passing through verbatim.EnvironmentEntitlementDialog.test.tsx, blockno server URL, no upgrade CTA (objectui#10437): this block goes through the real builders into the real dialog. A 403 without a URL renders no anchor, and neither does the proactive prompt from a state without a URL. The control is a server URL rendering an anchor to exactly that URL.The control pins use a server URL that deliberately differs from the retired default, so a CTA that carries it can only have come from the server.
Red leg. The implementation was committed first. Then the three implementation files were checked out at base
660d31185, and the on-disk blob hashes were confirmed equal to base (DEFAULT_UPGRADE_URLcounted 3 times inentitlements.ts). The new tests were kept. The run was under atraprestore.vitest runof the three test files gaveTest Files 3 failed (3),Tests 11 failed | 34 passed (45). The 11 failures are exactly the no-URL pins, and each failed on the retired default:expected { label: 'Upgrade plan', …(1) } to be undefined, where the received value carries"url": "/settings/billing"href="/settings/billing", which was expected to be null'/settings/billing', which was expected to be undefined, or itsupgradeUrlkey being presentThe controls passed on the base. Restore was
git checkout HEAD -- …. After it,git diff HEADwas empty and all three blob hashes equalled HEAD's.Green.
vitest run packages/app-shell/src/environment/ packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.test.tsxgaveTest Files 7 passed (7),Tests 117 passed (117).Fixture triage.
entitlements.test.ts: two strictness pins proved that a sibling key is ignored by assertingcta.url === DEFAULT_UPGRADE_URL. They now assert thatctais undefined. That is stronger: reading a siblingupgrade_urlwould now produce a CTA and turn them red. The old pin "falls back to a default upgrade_url when the server omits one" is replaced by the no-URL block. The localization pin asserts the CTA label, so it now sends a serverupgrade_url.EnvironmentListToolbar.test.tsx: itsUNRESOLVEDfixture mirrors the hook's unknown state, which no longer carries a URL, so the fixture'supgradeUrlis dropped. This file is next to the claimed ones and is declared here: one line changed, no assertion changed.upgradeUrl: '/settings/billing'model a server-supplied value and still do.Gates, all at head
6bbeebfc4pnpm exec vitest run packages/app-shell/gaveTest Files 1 failed | 783 passed | 1 skipped (785),Tests 1 failed | 7748 passed | 9 skipped (7758). The one failure is outside this diff; see Acceptance notes.pnpm --filter @object-ui/app-shell type-checkexited 0, and the script nametype-checkwas echoed. It ran after the dependency closure was built withpnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build(exit 0). A--listFilesrun oftsconfig.test.jsonlists all sixenvironment/__tests__files.node scripts/check-changeset-presence.mjsexited 0. It found 7 source files of 1 released package changed and 1 changeset declared:.changeset/10437-retire-default-upgrade-url.md('@object-ui/app-shell': patch).pnpm check:new-line-citationsprintedVERDICT new-cross-file-line-citations: 0 new citation(s)and exited 0.pnpm check:control-bytesprinted OK and exited 0.pnpm changeset:check,check:changeset-claims,check:pending-changeset-literals,check:test-path-roots,check:i18n-keys,check:esm-specifiers,check:self-import,check:unreferenced-sources,check:handler-key-reads,check:phantom-deps,node scripts/check-vi-mock-override-shape.mjsandnode scripts/markdown-test-inputs.mjs --changed..mdor docs file other than the changeset, and no export.Lint, narrowed to the 7 changed
.ts/.tsxfiles and declared. The narrowing rests on three pieces of evidence:eslint --print-configresolves 116 to 119 rules for each file, so all 7 are in scope and none is ignored.--format jsonreports 7 files, 0 errors and 15 warnings. Every warning is on a line this diff does not add (no-explicit-any,set-state-in-effect,only-export-components). The added lines contain noanyand nosetState.parserOptions.projectandprojectServiceare absent in every file's resolved config, and noeslint-rules/rule reads the filesystem. So this diff cannot move the verdict on any untouched file.The repo-wide
pnpm lintis left to CI.Acceptance notes
packages/app-shell/src/console/__tests__/AppContent.inaccessibleAppStrand.test.tsx, test "bounces to the DECLARED landing where the deployment declares one (objectui#7373)", was stopped by the network-escape guard: it reached a real socket athttp://localhost:3000/api/v1/meta(plus/meta/packageand/meta/diagnostics). The same file rerun alone at the same head gaveTests 6 passed (6). This diff does not touch that file or any metadata fetch path. It is recorded in the report as a candidate finding; the seat decides whether to file it.UPGRADE_URLliteral) remains open; the card declares the two halves land in either order.Generated by Claude Code