Repository navigation
Commit 3bbda33
feat(console): the Studio landing is ordered by what the author came to do (#34747)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBSqEJfSXXrgRvGw4hppNUc2)_
Fixes #34715
repo:objectstack#3 · os-support-ai · session_01WGufzivEnnozveqZfr4fDx
Clause-②: yes (widening)
Metadata-protocol: none
## 维护者速读
- 改了什么:Studio 首页改成按「要做什么」排:已安装的应用在最前,每张卡有「定制」按钮、不再显示「只读」和包
ID,没改动时写「还没有改动」;接着是「自己的应用」和「新建自己的应用」;最后是「不属于某个应用」:「岗位与权限」(原「环境目录」)和「未归属的流程
N」(为 0 时不显示)。说明缩成一句。托管环境里的系统包(`sys.` 开头)不再出现在「已安装的应用」里。
- 为什么改:最常做的事(改已安装的应用)原来排在最下面还标着「只读」;「可写基座」「.custom
定制包」「组织流程」「环境目录」是架构叫法。
- 风险与回滚:只改首页的顺序、文案和一个按钮,不改路由、权限、存储;新增 14 个界面文案键(en/zh)。回滚即还原本 PR。
-
先看:`ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx`(未归属流程计数与
0 时隐藏那段
effect、已安装卡片);`ui/packages/i18n/src/namespaces/studio/zh.ts`(新文案)。
- 两分钟验证:中文界面打开
`/_console/studio`,应看到第一块「已安装的应用」,卡片上有「定制」按钮,页面正文里没有「.custom」「基座」「只读」。
- 需要你做的:无,席位落地。
## What changes
The Studio landing (`BuilderLanding.tsx`) is ordered by what the author
came to do, and its copy says what they can do instead of naming the
package mechanism.
- **A system package is not an installed app** (card comment
6943119575). A kernel package the server lists flat with a `system` /
`cloud` scope stays in the package list tagged `kernel`
(`parsePackages`); the landing drops it by that tag, the same predicate
#34677's `offeredPackages` applies to the switcher (#34593). A
manifest-scoped kernel package was already left out of the list.
- **Installed apps lead the page**, also when there are recent visits
("Recently viewed" now follows the author's own apps, among the other
entries). One hint line under the heading: the app is upgraded by its
vendor, the author's changes are kept separately. Each card carries a
**Customize** button that opens the app in Studio exactly as clicking
the card does (`/studio/<id>/data`). The Read-only badge is gone; the
package id is no longer on the card's face (it is the card's `title`).
Zero changes read "No changes yet" instead of "0 customized, 0 switched
off". The marketplace link sits beside the heading.
- **Your own apps** follow, with the create card renamed **New app of
your own** (was "New package (writable base)") and a one-line
description; the old empty state "No writable packages yet" is replaced
by that card.
- **Outside any app** comes last: **Positions and permissions** (was
"Environment catalog"; still opens `/studio/~all/metadata`, ADR-0146 D1,
name and description only) and **Flows in no app N** (was "Organization
flows"). The count comes from `loadPackageLessSurfaces(client, 'flow',
locale)`, the same read the `/studio/~org/automations` scope uses; the
card is hidden when the count is 0, and shows without a number if the
read fails.
- The lead is one sentence.
- 14 new keys in the studio namespace (en + zh,
`ui/packages/i18n/src/namespaces/studio/`); no edit to the eager
`locales/en.ts`, no second loader. Superseded keys stay in the catalogue
(listed in the changeset); `engine.studio.org.name` and
`engine.studio.pkg.new` are still read by `PackageSwitcher`.
- Checklist item `studio-authoring.org-scope-flows` (revision 4) now
opens the org scope directly when no package-less flow exists, since the
landing draws no entry then. A CLI integration test's comment names the
new heading key.
No route, permission or storage change.
## Tests
<details><summary>New and updated tests (11 landing files, 63 tests
pass)</summary>
- New `BuilderLanding.taskOrder-34715.test.tsx` (7): two flat `sys.*`
rows parsed by the real `parsePackages` (control: both tagged `kernel`)
draw no card, no Customize and no name (fails with the filter removed);
heading order; Customize opens `/studio/app.objectstack.hotcrm/data`; no
id on the card face, id in `title`, lines `6 customized, 1 switched off`
/ `No changes yet`; Positions and permissions → `/studio/~all/metadata`;
en body has no `.custom` / `read-only` / `writable base`; zh body has
none of `.custom` / `基座` / `只读` and shows `未归属的流程2`.
- `BuilderLanding.orgScope-11553`: count 2 + navigation, hidden at 0, no
number when the read fails.
- `BuilderLanding.recentPackages-11863`: new case, with a recent visit
the h2 order is Installed apps, Your own apps, Recently viewed, Outside
any app.
- `customizationCounts-28566`, `customizeCopy-29489`,
`environmentOverlayCopy-12171`, `accessibleNames-12510`,
`newPackageDeepLink-26614`, `setupExit-12513`: pins moved to the new
copy and test ids; each file doubles the package-less flow read so no
request leaves it.
</details>
## Acceptance notes
Premise lines of #34715 measured on `origin/main` f6f5b50 before this
PR: the lead (`engine.studio.landing.description`, zh :3005),
「我的软件包(可写)」/「还没有可写软件包」/「新建软件包(可写基座)」, the org-scope card
(`BuilderLanding.tsx:438`) and env-catalog card (:457) under 「不属于软件包」,
and the installed section last (:485) with the read-only badge (:518)
and the id on the card face (:515) all hold as written.
`check-prior-rulings --card 34715`: thread none; ADR-0146 D1 (positions
and permissions stay in Studio) is honoured by renaming only.
Live readings (real showcase backend `objectstack dev --fresh`, console
from this branch's source, zh-CN and en). Scripts, readings and
screenshots: `/mnt/project-files/objectstack-seat3/34715-live/` (project
share).
1. zh-CN body has no 「.custom」「基座」「只读」; first block 已安装的应用; the card
shows 定制 and 还没有改动, no id. With a recent visit the h2 order is 已安装的应用 /
自己的应用 / 最近访问 / 不属于某个应用 (en: Installed apps / Your own apps / Recently
viewed / Outside any app).
2. No package-less flow: no 未归属的流程 card. After two package-less flows
were written through `PUT /api/v1/meta/flow/<name>` (200): 未归属的流程 2 /
Flows in no app 2, clicking opens `/studio/~org/automations`.
3. Hosted-environment system packages: the real `GET /api/v1/packages`
answer with two flat rows appended (`sys.package-state` scope `system`,
`sys.env-artifact-cache` scope `cloud`): installed cards
`["com.example.showcase"]`, no `sys.*` card, no system package name in
the body, en and zh. Before-leg with the filter removed, same stand-in:
the two `sys.*` cards draw.
4. Customize → `/studio/com.example.showcase/data`; 岗位与权限 / Positions
and permissions → `/studio/~all/metadata`. At 375 px the page has no
horizontal scroll and Customize is 48×44 px.
Scope note: the card's step 1 names a "customizations in this
environment" block between installed apps and the rest; that is #34714,
which builds on this PR.
## Verification
<details><summary>Gates (on d247d94; the delta to 19bfd59 re-ran
landing tests, app-shell type-check, ESLint, test-source-alias,
changeset-fixed, overlap-check, all exit 0)</summary>
- `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/BuilderLanding`: 11 files, 63
tests pass on 19bfd59.
- studio-design directory: 334/335 files pass in the full run;
`DataPillar.validationVerdictHold-27644` (e) timed out at 15 s under
shared-box load and passes alone (9/9); the file is untouched here.
- metadata-admin 4 files 156 pass; `@object-ui/i18n` 102 files, 1894
pass, 13 skipped.
- `pnpm --filter @object-ui/app-shell run type-check` and i18n
type-check: exit 0. ESLint on changed files: exit 0.
- Derived gates (`dispatch-gates --commands`, 70): all exit 0. Three
were first red for environment reasons and re-run green:
`check-plugin-teardown-shape --self-test` (shallow clone, 48 cases pass
after fetch), `vitest run scripts/` in ui (SIGKILL under memory; 171
files / 5077 tests pass at `--maxWorkers=2`),
`check:dual-build-cjs-loads` (needed spec+lint+rest+cli dist; 124
entries load after a serial build). `check:test-source-alias` red on two
edited tests, fixed by a module-top `import '@objectstack/lint'`.
- Console build exit 0; `pnpm check:eager-closure` exit 0.
**i18n-locale-en: 60.2 KB of the 60.5 KB ceiling** (0.4 KB headroom;
this PR does not touch `locales/en.ts`). Aggregate 1892.9 KB / 2431.6
KB.
- `pnpm check:changeset-fixed` exit 0; `check:new-line-citations`: 0 new
citations; platform-checklist and type-check-debt OK.
- `scripts/pm/overlap-check.mjs --branch=HEAD`: VERDICT clean (#34677
shares the studio en/zh files and merges cleanly).
</details>
Deviations: the branch is this thread's pinned branch
`claude/project-thread-eqwj27`, not `claude/issue-34715-*`. The author's
own (writable) cards keep their id and Writable badge; the card's
hide-the-id item names installed cards only.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; ESLint passes on every changed file.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzivEnnozveqZfr4fDx -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1ee3bb8 commit 3bbda33
15 files changed
Lines changed: 615 additions & 199 deletions
File tree
- .changeset
- docs/qa/platform-checklist/areas
- packages/cli/test
- ui/packages
- app-shell/src/views/studio-design
- i18n/src/namespaces/studio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2697 | 2697 | | |
2698 | 2698 | | |
2699 | 2699 | | |
2700 | | - | |
| 2700 | + | |
2701 | 2701 | | |
2702 | 2702 | | |
2703 | 2703 | | |
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | | - | |
| 2714 | + | |
2715 | 2715 | | |
2716 | 2716 | | |
2717 | 2717 | | |
| |||
2768 | 2768 | | |
2769 | 2769 | | |
2770 | 2770 | | |
2771 | | - | |
| 2771 | + | |
| 2772 | + | |
2772 | 2773 | | |
2773 | 2774 | | |
2774 | 2775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
141 | | - | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
| |||
220 | 235 | | |
221 | 236 | | |
222 | 237 | | |
223 | | - | |
| 238 | + | |
224 | 239 | | |
225 | | - | |
| 240 | + | |
226 | 241 | | |
227 | 242 | | |
228 | 243 | | |
| |||
238 | 253 | | |
239 | 254 | | |
240 | 255 | | |
241 | | - | |
| 256 | + | |
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | | - | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
105 | | - | |
106 | | - | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 115 | + | |
123 | 116 | | |
124 | 117 | | |
125 | 118 | | |
0 commit comments