Skip to content

feat(studio): the top bar reads ‹ Back to app · APP · Studio; home icon, package switcher and Open app removed - #36519

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-36501-studio-back-to-app
Nov 22, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/issue-36501-studio-back-to-app

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #36501
Clause-②: no
Metadata-protocol: none

维护者速读

  • Studio 的设计人员会看到:左上角从「首页图标 + 应用切换」变成「‹ 返回应用 · 应用名 · Studio」,右上角的「打开应用」没有了,点返回会回到进 Studio 之前那一页。
  • 为什么做:外壳专题(去掉顶栏和平台首页)第 12 项,按设计板图 47 让 Studio 的出口只剩一个、回到原来的应用。
  • 出错会怎样:设计人员点返回可能到错页面或回到默认首页;改动只在界面层,直接撤回这次合并即可恢复原样。
  • 要你做什么:这次改动行数超过三千行(大部分是删掉随切换器一起退场的旧测试),按规则需要你本人批准后才能合并。

What changes

  • StudioBackToApp (new) draws the top bar's left end: 「‹ Back to app」, the app's name, and the "Studio" mark. Where it goes, first match wins:
    1. Came from an app — ConsoleLayout records the app page in view on every app route (utils/appReturnPage.ts, module memory, never browser storage); the link names that app and returns to that exact page, query and hash kept.
    2. Opened directly (a Studio URL in a new tab, a reload — module memory starts empty) — the package's first published app, on its first screen (/apps/PACKAGE for a one-app package, /apps/APPNAME for the first of several, the same addressing the removed Open app used).
    3. No published app (none, or a draft-only app, which has no running front-end) and the organization-flows scope — 「‹ Back to app」 with no name, to the console's default landing (useHomePath(): the declared default app, else the single app, else the launcher — the same policy / resolves).
      Leaving asks first when a pillar holds unsaved work (confirmLeavePillar, the header's existing guard).
  • Removed from the top bar: the Studio-home button, the package switcher (PackageSwitcher component), and the top-right Open app (StudioOpenApp.tsx, deleted). PackageSwitcher.tsx keeps only the three helpers other code still imports (PACKAGE_LIST_TOAST_ID, STUDIO_LANDING_PATH, fetchInstalledPackageRow); offeredPackages and STUDIO_PKG_READONLY_WORD had no other reader and went with it.
  • i18n (studio catalogue, en + zh): engine.studio.backToApp (Back to app / 返回应用), engine.studio.backToAppTitle, engine.studio.backToAppTitleNoApp, engine.studio.mark; the three Open app keys are removed; engine.studio.app.willOpenAfterPublish names 「Back to app」 instead of Open app.
  • Untouched: the pillar switcher, the rails, the right slot / AI panel, Changes and Publish. The report/widget publish region (feat(app-shell): report and widget panels speak business wording, and opening the report editor keeps the page in the session language #36420's) is not touched.

Tests

  • New StudioDesignSurface.backToApp-36501.test.tsx (real surface + real metadata client over a fetch stub): came-from-app names that app and returns to its page with the query; an app other than the package's own is the one named; opened directly names the published app and lands on its home; several apps → the first, by name; no app → no name, to the landing; draft-only app counts as none; the home icon, the switcher and Open app are absent; narrow-bar classes (the name truncates, the link and the mark do not); studioBackTarget order unit cases.

  • pillarNavGuard: the Studio-home guard case became 「Back to app」 — dirty → confirm, cancel keeps the matrix edit, confirm leaves; clean → no prompt.

  • New fetchInstalledPackageRow-7881.test.ts: the objectui#7881 / objectui#7938 wire cases, asserted at the helper the Studio landing's Manage still reads.

  • Updated (each asserted on a removed control): homeLoop-12513, narrowHeader-12509, desktopHint-11795, entryReadsOnce-11797, noAppPackageLabel-12718, notFound-26708, readOnlyPosture-12453, kernelReadOnly-29567, packageLessFlows-11553, oneSurface-28572, autosaveSwitch-11232, packageListErrorPosture; e2e live studio-customize-journey (read-only chip line) and studio-object-designer (F1, the switcher's create-package refresh, removed).

  • Deleted (their subject code is deleted): openApp-34593 (its kernel-row list CONTROL moved into the new file), narrowChip-12611, packageDeletionInference, manageSnapshotRefresh (the switcher's own onManageChanged), packageLookupFailure, packageUserMessage (their wire cases moved to fetchInstalledPackageRow-7881).

  • homeRecoveryRedirectsFollowDeclaration-7373: the Studio site now reads StudioBackToApp.tsx (where the header's no-app landing reads useHomePath()); its behavioural pointer moves from the deleted packageDeletionInference to the new back-link test.

  • Six edited surface tests gained the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited file reaching the surface.

Local gate readings (derived by dispatch-gates.mjs --commands, HEAD a07beaa)

37 derived check:* / self-test commands ran outside the lock: 35 at EXIT=0; check:test-source-alias was red (EXIT=1, the six files above) and is green after the fix (check-test-source-alias OK — ... the source reach judged 36 test file(s) changed since 9abc732132); check:type-check-debt exited 3 (its closure build waits on the shared verification lock and did not get it): NOT MEASURED locally, CI runs it. check:nul-bytes OK (27026 files, no raw control bytes).

Acceptance notes

  • Size: +/- lines exceed 3,000 (mostly deletions of the switcher and its pins), so this lands the Tier H way (an authorized approval).
  • Lost from the Studio top bar with the switcher (all still reachable on the Studio landing, which the app sidebar's "Build with AI" opens): New package, Package info and settings, the organization flows entry, and the chip's read-only lock (the item header's read-only mark stays in every pillar) and package-list failure marker (the failure still toasts on the shared id).
  • Opened directly, the old Open app landed on the surface in focus (?surface=, e.g. that object's list); 「Back to app」 lands on the app's first screen, as the card asks. The app-shell README paragraph on the way back is rewritten to match.
  • The package name is no longer printed in the top bar; for a package with no app nothing names it there.
  • Now-unreferenced switcher catalogue keys (engine.studio.pkg.switchTitle, pkg.heading, pkg.none, pkg.new, pkg.withPair, org.hint, pkg.manage) are left in place for a dead-key sweep; packageApp's icon / branding (read only by the removed chip) are left as well.
  • NOT MEASURED: browser before/after screenshots and the 1280 / 1440 no-wrap reading the card asks for — no browser run in this container this round (the shared verification lock was held by a full dogfood run). The no-wrap contract is pinned by class in the new test.

Verification

Read first: StudioBackToApp.tsx (studioBackTarget, the three-way order), ConsoleLayout.tsx (the one recording effect), the header block in StudioDesignSurface.tsx.

Two-minute check: open an object's list in an app, enter Studio from it, click 「‹ Back to app」 — you land on the same list; reload Studio and click again — you land on the package app's first screen.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY

… and the Studio mark

WIP: tests follow.

Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
…ed PKG and waitFor, import act

Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

维护者速读(席位记录 · head e9654953a6)

  • 改了什么:Studio 左上角改成「‹ 返回应用」加应用名和 Studio 标记。点它回到进 Studio 之前所在的应用页面;如果是直接打开的 Studio,就回到这个包自己的应用,没有应用则回到控制台首页。去掉了左上角的主页图标、包切换器和右上角的「打开应用」。有未保存的改动时,离开前照旧先问一句。
  • 为什么:专题 专题:去掉顶栏和平台首页那一层——登录直接进应用,全局入口进左侧菜单,侧栏第一项是首页(分三个阶段,十二项) #36107 第 12 项。Studio 的出口统一成一个,说的是「回到我刚才的应用」。
  • 风险:只改界面,不改接口和契约。删除量大(−3418 行,主要是包切换器本身和它的测试),所以超过了 3000 行需要人工合并的线。被删的测试逐个列在开发报告 7082653198 里,每个都对应被删掉的切换器或「打开应用」的行为。
  • 要你做什么:批准合并。本 PR 不涉及契约,不欠 L2;超过 3000 行,按规定交人工批准。
  • 席位意见:建议批准。

席位核对

ACCEPT at head e9654953a6 (seat repo:objectstack#2, reviewer of record).

  • Shape: draft → main. Fixes #36501. Clause-②: no · Metadata-protocol: none. l1-face.mjs CLEAN, 13 items. +925 / −3418 across 37 files. Over 3000 lines ⇒ human merge (check-governed-merges.mjs --pr 36519).
  • Contract review: none owed. No contract face, no governed path, Clause-②: no.
  • Premise and behaviour: the seat read StudioBackToApp.tsx. The target order is: the remembered app page (ConsoleLayout → utils/appReturnPage.ts); else the package's first published app (package-id segment for one app, app name for several); else useHomePath with no name. The beforeNavigate veto is kept. Every visible string goes through i18n keys (en and zh).
  • Removed, each with the behaviour its deleted test pinned (dev report 7082653198):
    • openApp-34593: Open app.
    • narrowChip-12611: the switcher chip.
    • packageDeletionInference, manageSnapshotRefresh: switcher manage refreshes.
    • packageLookupFailure, packageUserMessage: their wire cases move to fetchInstalledPackageRow-7881.test.ts, which tests the surviving helper.
  • Gates: check-runs at e9654953a6: 45 success · 13 expected skip · 0 failed · 0 pending, including Test UI 1–16/16, Type Check UI and Lint UI. Round 1 at a07beaa was red on five checks, all rooted in edited tests, and fixed at this head. mergeable_state clean. Local tests NOT MEASURED (the verify lock queue); CI is the test reading. K = 14 (< 15).
  • Changeset read: .changeset/36501-studio-back-to-app.md matches the diff.
  • Accepted deviations:
    • No local test run and no ablation, because of the lock. CI covers it.
    • The 1280/1440 no-wrap reading is pinned by classes, not measured in a browser.
  • Out of scope: the switcher-only studio catalogue keys (engine.studio.pkg.*, org.hint) and the packageApp icon/branding props now have no reader. They are listed in the PR's Acceptance notes for a dead-key sweep (carrier: none). Open PR feat(app-shell): report and widget panels speak business wording, and opening the report editor keeps the page in the session language #36420 (seat 7) has merged since; the later lander merges main.
  • Landing: human merge. pm:awaiting-merge plus a review request to the governed approver. The seat lands it after an approval.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Contract-review-claim: session_01ADHkmRY38EZf38Yy3zthbY · head e9654953a6213d4b74505b8063e7b04bfb8d4353 · 2026-11-22T17:28Z

Taking the review (declaration face, TIER_DEFAULT): the size limb hands this pull to a human, and the hand-off owes a same-head record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Contract review

Served-tier: TIER_DEFAULT
Head-sha: e9654953a6213d4b74505b8063e7b04bfb8d4353
Local-runs: none

Face: declaration. record-recognisers.mjs --paths finds no schema or rules face. The changeset and the PR body read Clause-②: no with no (narrowing) arm. The record is owed only because the size limb (+925 / −3418) routes the pull to a human. Read: the diff at this head, card #36501, and the head's check-runs.

① Derived judgments

  • No contract surface moves. Every changed path is under ui/packages/app-shell and ui/packages/i18n. No packages/spec path, no governed path, no metadata key. Metadata-protocol: none holds.
  • Removals stay inside the app shell. StudioOpenApp.tsx and the PackageSwitcher UI are internal views. The changeset states that no props or exports of the published packages change. The diff bears this out: the surviving switcher helpers (fetchInstalledPackageRow) keep their signatures, and their wire cases move to fetchInstalledPackageRow-7881.test.ts.
  • Catalogue keys: three keys are added in en and zh. The three openApp* keys are removed with their only reader. These are i18n catalogue entries, not a metadata contract.
  • Navigation target: remembered app page, else the package's first published app, else useHomePath. This reads only existing console state. No new API call and no server path.

② Semver level

patch for @object-ui/app-shell and @object-ui/i18n. It is a UI behaviour change with no export or prop change. AGENTS.md: a changed package takes a patch changeset. Correct.

③ Boundary flags

  • Dev deviations (local tests not run because of the verify lock; 1280/1440 no-wrap pinned by classes, not by a browser): accepted. The head's check-runs are 45 success, 13 expected skip, 0 failed, Test UI 16/16 included.
  • Dead keys left behind (engine.studio.pkg.*, org.hint, the packageApp icon/branding props): noted in the PR's Acceptance notes for a sweep, carrier: none. Not a contract question.
  • open_questions: none.
  • SQL push-down: n/a. Client-side navigation only, with no query path and no id materialisation.

Implemented-by: claude/issue-36501-studio-back-to-app
Reviewed-by: session_01ADHkmRY38EZf38Yy3zthbY

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

Hand-off for approval: L1 ACCEPT at head e9654953a6213d4b74505b8063e7b04bfb8d4353, all checks green. Over the 3000-line human-merge threshold (+925 / -3418, mostly the removed package switcher and its tests); no contract face, so no L2 is owed. The seat lands it after an approval is on record.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 22:16
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit cd51dbb Nov 22, 2026
64 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36501-studio-back-to-app branch November 22, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants