You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e46840
Browse filesBrowse the repository at this point in the historyBrowse files
fix(studio): landing own-app cards drop the package id and Writable badge; Recently viewed hides when it only repeats them (#35094)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_Closes#35018
PR 2 of 2: card item 4, the Studio landing page. The other half (items
1–3, the permission page, the AI panel's 正在看 line and the field panel)
is #35082, `Part of #35018`.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:Studio 着陆页「自己的应用」卡片不再在应用名下显示包 ID(如 `com.qa.mtg`),也不再显示「可写」徽标;包 ID
改为卡片的悬停提示(和「已安装的应用」卡片一样)。「最近访问」在内容和上方卡片完全重复时不显示。
- 为什么改:卡片 #35018 第 4 项:自己的应用全都可写,徽标没有信息量;包 ID 是内部名;最近访问只重复上方卡片。
- 风险与回滚:只改着陆页显示,不改数据、接口、布局和功能(复制按钮、新建卡片、其他分区不变),不加文案键。回滚就是 revert 本 PR。
-
先看:`ui/packages/app-shell/src/views/studio-design/BuilderLanding.tsx`(`recentRepeatsCards`
判断和自己的应用卡片那一段)。
- 两分钟验证:中文 Studio 着陆页(`/studio`),建两个自己的应用:卡片只显示应用名和「复制」,鼠标悬停显示包
ID;把页面上每张应用卡片都打开一次再回来,「最近访问」不出现;再新建一个应用,「最近访问」重新出现。
- 需要你做的:无,席位落地。
## What changes
- **Own-app cards (自己的应用 / Your own apps).** `BuilderLanding`'s own-app
card no longer draws the package id line under the name, and no longer
draws the 可写 / "Writable" badge (`engine.studio.pkg.writable`). Every
card in this section is writable by construction (`cards.filter((p) =>
p.writable)`), so the badge carried no information. The package id moves
to the card row's hover `title`, the place the installed-app card
already keeps it (`title={p.id}` there). The Duplicate button, the
inline duplicate form and the create card are unchanged.
- **最近访问 / Recently viewed.** The row is left out when its entries are
exactly the apps the cards above already show (installed and own cards
together, as a set, any order). It is drawn whenever it adds something:
an app no card shows (for example a kernel package the cards hide), or a
card it does not repeat. Each entry shows the app name only; the package
id is on the entry's hover `title`, as on the cards (folded in at the
seat's request, triage 6967733592).
- No locale key is added, removed or changed.
`engine.studio.pkg.writable` stays: `PackageSwitcher` and `PageShell`
still read it.
- The 可写 / read-only signal elsewhere on the page: the installed-app
cards carry no read-only badge on main either (their section heading and
hint say it), so there was no informative badge left to keep on this
page.
## Why
Card #35018 item 4, measured on main in this PR's before leg (below):
each own-app card read `会议纪要 com.qa.mtg 可写 复制`, and with every app
visited the 最近访问 row repeated the three cards above it.
## Tests
<details><summary>Pins (in the landing's existing
BuilderLanding.recentPackages-11863.test.tsx, two new card-named
describes)</summary>
- `an own-app card shows the app, not its package (objectstack#35018)`:
the card's text holds the name and not the package id, and has no
`Writable` text; no `Writable` anywhere on the page. Second case: the
package id is reachable as the card's hover title
(`getByTitle('com.acme.crm')` inside the card).
- `a Recently viewed entry shows the app, not its package
(objectstack#35018)`: the entry shows `Acme CRM`, not `com.acme.crm`,
and `getByTitle('com.acme.crm')` inside the row returns that entry's
link.
- `"Recently viewed" is left out when it only repeats the cards
(objectstack#35018)`: one recent visit to the only app ⇒ no row (the
name appears once); every card visited, installed included, in another
order ⇒ no row. CONTROL: a recent app no card shows (a kernel package)
keeps the row; CONTROL: a card the row does not repeat keeps the row.
- Fixture triage in the same file: six existing cases had one recent
entry equal to the page's only cards. Each now lists one more app the
row does not repeat, so it keeps testing what it tested (label, loading,
deleted entry, slot fill, stored entry). `the package cards stay beside
the recent row` keeps its assertion with a second card.
`BuilderLanding.accessibleNames-12510` needed only a comment update (the
own card's name no longer has an api name after it).
</details>
<details><summary>Ablations (scripts/ablation-replace.mjs at b43cf93;
each restored, blob 11b989d == HEAD, git diff HEAD empty)</summary>
- Package id line put back on the own card: `names no package id and
carries no Writable badge` 1 failed / 17 passed.
- Writable badge put back on the own card: the same case, 1 failed / 17
passed.
- `title={p.id}` removed from the own card row: `keeps the package id
reachable` 1 failed / 17 passed.
- Fold (at a49e040, restored to blob a49e040): the recent
entry's id line put back ⇒ the new recent-entry pin 1 failed / 18
passed; `title={item.name}` removed ⇒ 1 failed / 18 passed.
- `&& !recentRepeatsCards` removed from the row's condition: the two
hide cases failed, both CONTROLs passed (2 failed / 16 passed).
</details>
<details><summary>Suites (local, under os-verify-lock, at
f961349)</summary>
- `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/BuilderLanding`: Test Files
12 passed (12), Tests 89 passed (89); after the fold (a49e040): 12
files / 90 tests passed.
- `pnpm --filter @object-ui/app-shell run type-check` (src and
`tsconfig.test.json`): exit 0.
- `npx eslint` on the three edited files from `ui/packages/app-shell`:
exit 0.
</details>
## Acceptance notes
- **Live reading** (zh-CN, 1280×800, a fresh showcase backend per leg,
console served from src by vite). Two self-built apps created over HTTP:
`com.qa.mtg` 会议纪要 and `com.qa.tix` 工单跟踪. Before = `BuilderLanding.tsx`
at the merge base, vite restarted with `--force`, served code checked
with `curl`. After = branch head, checked the same way.
- Before: own cards read `会议纪要com.qa.mtg可写 复制` / `工单跟踪com.qa.tix可写 复制`,
2 可写 badges on the page. With all three cards visited, 最近访问 listed 工单跟踪,
会议纪要, ObjectStack Showcase: the three cards again.
- After: own cards read `会议纪要 复制` / `工单跟踪 复制`, 0 可写 on the page, hover
title `com.qa.mtg`. With all three cards visited: no 最近访问 row. CONTROL:
after a third app (客户回访) was created, the row came back, since it no
longer repeats every card.
- **Reading of 「完全重复」.** This PR hides the row when its entries and the
cards are the same set of apps. It keeps the row when there are more
cards than recent entries, because the row then says which of many apps
were last open. If the maintainer means the stricter reading (hide
whenever every recent entry already has a card), the row would show
almost only for kernel packages: a one-line change in
`recentRepeatsCards`, but close to removing the row.
- Folded in (seat and triage 6967733592): each 最近访问 entry no longer
draws its package id in mono under the name; the id is the entry's hover
title. Live: `after-4-recent-no-id.png` (CONTROL case with a third app)
reads 工单跟踪 / 会议纪要 / ObjectStack Showcase with no visible id; hover
titles com.qa.tix / com.qa.mtg / com.example.showcase.
## Verification
- Gates derived by `node scripts/pm/dispatch-gates.mjs --commands` at
f961349 (38), all exit 0 locally. `--ran` with exit codes: `38
derived, 38 run, 0 NOT-MEASURED, 0 UNRUN` (a derived zero, all 38
recorded an exit code). `pnpm check:changeset-fixed`: exit 0.
- `node scripts/pm/overlap-check.mjs
--branch=claude/issue-35018-studio-landing-c` before each push: VERDICT
clean exit 0. Against #35082: no shared file (this PR touches no i18n
file), and a merge of the two heads is clean.
- The CI lanes (Test UI, Type Check UI, repo-wide scans) are CI's.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzfrh8TiPJf1i2kMSoa -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(studio): the Studio landing's own-app cards and 最近访问 entries show the app, not its package id, and 最近访问 is left out when it only repeats the cards
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Two changes on the Studio landing page (`/studio`):
11
+
12
+
-**自己的应用 / Your own apps cards.** A card shows the app's name only. The package id line under the name (for example `app.nb57`) is gone, and so is the 可写 / "Writable" badge: every app in this section is writable, so the badge said nothing. The package id is still on the card's hover title, the way an installed app's card already carries it.
13
+
-**最近访问 / Recently viewed.** The row is left out when its entries are exactly the apps the cards above already show, for example one recent visit to the only app on the page. It is drawn whenever it adds something: an app no card shows, or a card it does not repeat. Each entry shows the app's name only; its package id line is gone and the id is on the entry's hover title, as on the cards.
14
+
15
+
No layout or feature change: the cards, the Duplicate button, the create card and the other sections are as before. No locale keys change.
0 commit comments