Repository navigation
fix(app-shell): upgrade links open the runtime's declared upgradeUrl - #34879
Conversation
The console now reads the top-level `upgradeUrl` that /api/v1/runtime/config already serves (verbatim, absent stays absent) and exposes getUpgradeUrl(). The storage-full banner, the AI usage indicator's call to action and the AI chat quota CTA open it when declared; absent, each keeps today's cloudConsoleUrl() target and its show/hide rule. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d) · 2026-11-17T14:52ZL1: REWORK Read at that head: the file list (9 paths), the full diff, the PR body, card #34622 with triage 6937603697, the seat's Premise corrected 6947939206, claim 6949560908, os-dev report 6951029706, the server producer The code is right, and only one paper item stands between it and an ACCEPT on this same head. Checklist
Must-fix
Should-fixNone. Notes
A new head is not needed for M1. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d), same-head re-read · 2026-11-17T14:54ZL1: ACCEPT The head is unchanged since REWORK 6951571010, so the diff, the body and the check-runs read there still stand. All 52 check-runs are green: Lint & Repo Gates, TypeScript Type Check, Test UI (all 16 shards), Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset and the Governed Surface Queue Guard. Must-fixNone. M1 is closed: claim amendment 6951594578 on #34622 adds Should-fixNone. NotesN1 to N3 from 6951571010 stand:
Landing: not governed (0 of 9 paths, 464 lines), all checks green. Area o3-H lands it. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa Landing (area o3-H) · 2026-11-17T14:55Z
State change: ready + auto-merge enabled. |
Requested by Yibo Wang · project thread
Part of #34622
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa
维护者速读
/api/v1/runtime/config已经下发的upgradeUrl(宿主声明的 Cloud 升级/计费页绝对地址),存储已满横幅的「Upgrade to continue」、AI 用量指示器的 CTA、AI 对话的配额升级按钮,在声明了该地址时直接打开它。upgradeUrl时三个链接的目标和显示/隐藏规则与改动前完全相同;回滚即 revert 本 PR。ui/packages/app-shell/src/runtime-config.ts(upgradeUrl读取与getUpgradeUrl())、ui/packages/app-shell/src/layout/AiUsageIndicator.tsx(showCta的门控)、ui/packages/app-shell/src/console/ai/AiChatPage.tsx(onUpgrade一处)。pnpm --dir ui exec vitest run -t 34622 packages/app-shell/src/runtime-config.test.ts packages/app-shell/src/layout/__tests__/StorageUsageBanner.test.tsx packages/app-shell/src/layout/__tests__/AiUsageIndicator.test.tsx packages/app-shell/src/console/ai/__tests__/AiChatPage.upgradeUrl-34622.test.tsx,预期 24 passed。What changes
runtime-config.tsreads the top-levelupgradeUrlthatRuntimeConfigPluginserves (objectstack#14514, maintainer ruling cloud#1850 option A). It takes a non-empty string verbatim; absent, empty, whitespace-only and non-string values stay absent. Nothing is composed fromcloudUrl. Each payload re-derives the key, so a later payload without it withdraws it. The new getter isgetUpgradeUrl(): string | undefined.StorageUsageBanner("Upgrade to continue"),AiUsageIndicator(the CTA'sshowCtagate and its click) andAiChatPage(theonUpgradeexit only) opengetUpgradeUrl()when it is declared. When it is absent, each one usescloudConsoleUrl()as before, with the same show/hide rule (card item 3).upgradeUrlis declared on a runtime whosecloudUrlis empty, the link is now drawn and opens the declared address. Ruling A says the console renders the link when the key is present.@object-ui/app-shell.Out of scope, per the seat's correction (comment 6947939206): the marketplace "Open on Cloud" link needs a new Cloud-home key (
Clause-②: yes, back to the seat). Nothing underpackages/cloud-connection/**changes, and the avatar menu (#34591) is untouched.Tests
Measured at head
4a23eddd, after a dependency-closure build (pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build, exit 0).runtime-config,StorageUsageBannerandAiUsageIndicatorpins are top-leveldescribeblocks in each component's existing test file.AiChatPagehas no shared harness file, so its pin is the new card-namedAiChatPage.upgradeUrl-34622.test.tsx.cloudConsoleUrl()target, and no link when the runtime names no upstream cloud. The component pins use the real runtime-config reader; onlyfetchis replaced, for the config request.runtime-config.ts,? body.upgradeUrlwas replaced with? undefinedthroughscripts/ablation-replace.mjs. The anchor went from 1 hit to 0 and the blob froma0be844fto8c5e8a2c. 9 declared-path tests went red and the 15 absent/CONTROL tests stayed green, which is the expected direction. The restore was verified: the blob matched HEAD andgit diff HEADwas empty.pnpm --filter @object-ui/app-shell run type-checkexit 0. Both projects ran, andtsconfig.test.jsoncompiles the test files.Ablation run
Acceptance notes
upgradeUrlfor both of its labels, "Upgrade to keep going" and "Add credits to continue" (top-up). The runtime config has one upgrade/billing entry, and the card names the billing/plan page for the AI quota.Test UIruns the full suite.Verification
node scripts/pm/dispatch-gates.mjs --commands: 38 derived families, all run at4a23eddd, every one exit 0. The--ranreconciliation reported 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --dir ui check:new-line-citations: 0 new citations.node scripts/pm/overlap-check.mjs --branch=claude/issue-34622-upgrade-url-links: VERDICT clean, exit 0. It merges cleanly withorigin/main(d947a93c), PR feat(app-shell): send the console UI language as context.uiLocale on the AI chat request #34845 and PR feat(studio): the Studio AI panel matches the console's AI assistant #34851, which both shareAiChatPage.tsx.Generated by Claude Code