Skip to content

Commit bb251e8

Browse files
committed
fix(studio): the switcher chip still names an open kernel package; English-only comments
The chip names the open package from the full listed set (naming is not offering), and the Open app comments and changeset drop the Chinese label. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi3ezPzTysQPDEjmVz
1 parent 37c3d4d commit bb251e8

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎.changeset/34593-studio-open-app.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ feat(app-shell): Studio's top bar opens the running app, the package switcher hi
88
Clause-②: no
99
Metadata-protocol: none
1010

11-
- Studio's workbench top bar has an "Open app" button (「打开应用」) that returns to the package's running app in the same tab. It reads the `?surface=` the workbench has in focus, which is the same target the app bar's Edit app hands Studio. From an object it lands on that object's list in the app. From a dashboard, page or report it lands on that interface. Otherwise it lands on the app's home. When the package has several published apps, the button opens a picker. A package whose only app is still a draft gets no button. Unsaved pillar work asks before leaving, as the Home button does.
11+
- Studio's workbench top bar has an "Open app" button that returns to the package's running app in the same tab. It reads the `?surface=` the workbench has in focus, which is the same target the app bar's Edit app hands Studio. From an object it lands on that object's list in the app. From a dashboard, page or report it lands on that interface. Otherwise it lands on the app's home. When the package has several published apps, the button opens a picker. A package whose only app is still a draft gets no button. Unsaved pillar work asks before leaving, as the Home button does.
1212
- The Studio package switcher no longer lists kernel packages. Before, the rows served with only a top-level `scope` of `system` or `cloud` (such as `sys.env-artifact-cache`) were still listed. ADR-0016 §3.8 keeps kernel packages out of the authoring selector, so there is no toggle to show them. `parsePackages` still returns those rows tagged `kernel`, because the app → Studio entry gate reads the tag.
1313
- In the app bar, the entry for a read-only package shows its text next to the eye: "Open {app} in Studio" (「在 Studio 中查看 {app}」, ADR-0146 D5). Below `sm` it is still not drawn, and the app switcher's Studio row stays the phone's way in.
1414
- New strings `engine.studio.openApp`, `engine.studio.openAppTitle` and `engine.studio.openAppPick` (en, zh). The `topbar.openAppInStudio` text now names the app in every locale.

‎ui/packages/app-shell/src/views/studio-design/PackageSwitcher.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ export function PackageSwitcher({
167167
// flat with a kernel `scope` stays in that list, tagged `kernel`, because the
168168
// app → Studio entry gate reads the tag. The switcher hides it here.
169169
const offered = offeredPackages(pkgs);
170-
const listedCurrent = offered?.find((p) => p.id === packageId) ?? null;
170+
// The trigger NAMES the open package, which is not offering it: a kernel
171+
// package opened by its URL is still named from its listed row.
172+
const listedCurrent = pkgs?.find((p) => p.id === packageId) ?? null;
171173
// Only once the list has answered, so the three trigger states stay its own.
172174
const current = listedCurrent ?? (pkgs !== null && openEntry?.id === packageId ? openEntry : null);
173175
// objectstack#28572 (ADR-0146 D3) — a base's paired `<base>.custom` has no

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.openApp-34593.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* objectstack#34593 — the Studio workbench and the running app, both ways.
55
*
6-
* 1. The header offers 「打开应用」/ "Open app", the mirror of the app bar's
6+
* 1. The header offers "Open app", the mirror of the app bar's
77
* Edit app: from the object in focus (`?surface=object:<name>`, the
88
* target Edit app hands Studio) it lands on that object's list in the
99
* app; with no surface in focus it lands on the app's home. A package

‎ui/packages/app-shell/src/views/studio-design/StudioOpenApp.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
22

33
/**
4-
* The Studio header's way back to the running app: 「打开应用」/ "Open app"
4+
* The Studio header's way back to the running app: "Open app"
55
* (objectstack#34593), the mirror of the app bar's Edit app (ADR-0080's
66
* app → Studio bridge, `appStudioRoutePath`).
77
*

0 commit comments

Comments
 (0)