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 c8d4b90
Browse filesBrowse the repository at this point in the historyBrowse files
feat(console): Setup gets one Packages entry, the package list's administration face; Installed Apps retires (#36933)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_Fixes#36834
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 管理员在「系统设置 → 应用」里多了一个「软件包」入口,能看到本系统装的全部软件包,可启用、停用、删除;原来的「已安装应用」入口去掉了。
- 落实你在软件包入口这张卡上的裁定:设置里只做管理,设计仍在 Studio。
- 出错时管理员在设置里看不到或误操作软件包;改动只在界面和导航,撤回这次合并即可恢复原样。
- 无
## What changes
**The face selector: the URL parameter `face=admin`.** Setup's entry is
a component nav item with `params: { face: 'admin' }`, and the sidebar
sends a component entry's `params` as the query string, so the entry
opens `.../component/developer/packages?face=admin`. With no `face`, the
page is the development surface exactly as before (Studio's "All
packages" link and each package card's Manage). An old address with
`source=marketplace` and no `face` (bookmarks, and the marketplace
page's "Installed" button) also reads as the administration face. A
`face` value other than `admin`, or a repeated `face`, is refused by
name (`PACKAGES_FACE_UNKNOWN` / `PACKAGES_FACE_REPEATED`), the same way
the page already refuses a bad `source`. No new page, widget, hook or
route.
**The gate: `requiredPermissions: ['manage_platform_settings']`**, the
pattern Setup's Settings hub (`nav_settings_hub`) and Public Forms use.
The server still checks every package write with `manage_metadata`.
- **Setup → Apps → Packages (`nav_packages`).**
`@objectstack/platform-objects` contributes the one entry to
`group_apps`, unfiltered, translated in all 11 Setup locales (zh-CN:
软件包).
- **The administration face**, built from the old Installed Apps view
and extended to every source:
- It lists every package of every source, with modules folded under
their app. Platform packages (system / cloud) stay hidden.
- It has a Source filter (All / Code / Marketplace / Authored) that
writes `?source=` and keeps `face`. Only marketplace rows are asked
about updates.
- Its one header action is New Package. A package created there opens in
Studio at `/studio/ID/data`, the address the Studio landing's package
card opens (`BuilderLanding`'s `open`).
- The detail sheet offers View info, Disable / Enable and Delete, and
Delete keeps the keep-data choice. An authored package also gets "Open
in Studio".
- Not offered: Import, Edit, Publish, Revert, Export, Duplicate, Adopt
loose items, and the pending changes' Publish / Discard.
- **Installed Apps retires.** `MARKETPLACE_INSTALLED_UI_BUNDLE` no
longer carries `nav_marketplace_installed`. It stays exported under its
id, with `navigationContributions: []`, so cloud's import keeps
compiling and registering it. The entry's labels leave the Setup bundle
and its id joins the dead-key tombstone.
- The comments that cited ruling 甲 as the reason Setup had no entry
(`setup-nav.contributions.ts`, `BuilderLanding.tsx`,
`marketplace-ui.ts`) now cite this card's amendment.
### Readers of `nav_marketplace_installed` in this repo
| Reader | What happened |
|---|---|
| `packages/cloud-connection/src/marketplace-ui.ts` | entry removed; the
bundle is now **empty** (no pages, no contributions) |
|
`packages/cloud-connection/src/marketplace-installed-ui-entry.pin.test.ts`
| restated as an absence pin |
| `packages/platform-objects/src/apps/setup-nav.contributions.ts` |
comment rewritten |
| 11 Setup translation files + 10 `*.source-hashes.ts` | key replaced by
`nav_packages` |
| `translations/setup-nav-dead-key-tombstone.test.ts` | id added as dead
|
| `packages/cloud-connection/CHANGELOG.md`,
`packages/platform-objects/CHANGELOG.md` | release-owned history,
untouched |
| `docs/qa/platform-checklist/areas/platform-core.json` | stale
checklist text naming the entry; outside this card's file surface, see
Acceptance notes |
Code that imports `MARKETPLACE_INSTALLED_UI_BUNDLE` still compiles,
unchanged: `packages/cli/scripts/check-app-nav-i18n.mjs`,
`packages/qa/dogfood/test/platform-app-object-entry-views.test.ts`, and
the package index export.
### Read first (by risk)
1. `ui/packages/app-shell/src/views/metadata-admin/PackagesPage.tsx`.
Look at the `authoring` switch in `PackageDetailSheet`, the `adminFace`
branches in the header and toolbar, and `onCreated`.
2. `ui/packages/app-shell/src/views/metadata-admin/packageSource.ts`,
`readPackagesFace`, which reads the legacy `source=marketplace` address
as the admin face.
3. `packages/cloud-connection/src/marketplace-ui.ts`. The bundle is now
empty but keeps its id.
### Two-minute check
Boot any example as admin and open Setup. Under 应用 there are 软件包 and
浏览应用市场, and no 已安装应用. Click 软件包: the list shows the 来源 filter and a
single 新建软件包 button, with no 导入 button.
## Why
The maintainer's ruling on #36834 amends ruling 甲 of #25098. Setup is
where an administrator sees what is installed and turns it on, off or
away. Designing a package stays in Studio. The marketplace-only
Installed Apps entry was a narrower copy of the same list, so it merges
into the new entry's Source filter.
## Verification
Live on `examples/app-showcase` (`objectstack dev --seed-admin`, own
port and file DB), signed in as `admin@objectos.ai`. The console is the
`ui/apps/console` Vite dev server on the current `ui/` source, proxied
to that backend, and was driven with Playwright in zh-CN.
- **Served nav** (`GET /api/v1/meta/app?id=setup`): one `nav_packages`,
with `componentRef: developer:packages`, `params: {face: admin}` and
`requiredPermissions: [manage_platform_settings]`. No
`nav_marketplace_installed` appears in the response.
- **Setup → 应用 → 软件包** opens `?face=admin`. It shows the heading 软件包,
the admin description, a 新建软件包 button, no 导入 button, and rows of every
source (代码 and 自建).
- **Filter**: 应用市场 sets `&source=marketplace` and shows the
empty-marketplace state, because the showcase has no marketplace
installs. 代码 and 自建 each narrow the list. 全部 clears `source` and stays
on `face=admin`.
- **Old link**:
`/apps/setup/component/developer/packages?source=marketplace` opens the
admin face, with the 应用市场 chip on and 新建软件包 present.
- **New package**: 新建软件包, enter a name, save. The page lands on
`/studio/com.default.field-service/data` and shows the toast
已创建软件包「Field Service」.
- **Detail (authored package)**: the sheet's buttons are exactly 查看信息 /
禁用 / 删除软件包 / 关闭, plus the link 在 Studio 中打开 to
`/studio/com.default.dogfood-alpha/data`. These are absent: 编辑, 发布, 还原,
导出, 复制, 导入, 放弃, 收编散落项.
- **Disable, then enable**: after 禁用 and confirm, the sheet shows
软件包已禁用。, the status reads 已禁用, and the button turns to 启用. After 启用, it
shows 软件包已启用。 and the button turns back to 禁用.
- **Delete keeping data**: `DELETE
/api/v1/packages/com.default.dogfood-alpha?keepData=true` returned 200.
**Delete everything**: `DELETE
/api/v1/packages/com.default.dogfood-beta` returned 200. Each time the
sheet closed and the row left the list.
- **Studio unchanged**: its 全部软件包 link opens the page with no `face`,
with no Source picker and with the 导入 and 新建软件包 buttons. The same
package's sheet keeps 查看信息 / 编辑 / 发布 / 还原 / 禁用 / 导出 / 复制 / 收编散落项 /
删除软件包.
Screenshots (zh), in the project files under `issue-36834/`:
- `setup-packages-list-zh.png`: the Setup list
- `setup-packages-detail-zh.png`: the Setup detail sheet of an authored
package
- `setup-packages-detail-code-zh.png`: a code package's sheet (View info
only; code packages are read-only)
- `setup-packages-disabled-zh.png`: the feedback after a disable
- `setup-packages-marketplace-zh.png`: the list filtered to marketplace
- `setup-packages-delete-keepdata-zh.png`: the delete dialog with the
keep-data choice
- `setup-new-package-lands-in-studio-zh.png`: New Package landed in
Studio
- `studio-packages-detail-unchanged-zh.png`: Studio's sheet with every
action
## Tests
These ran on head `bb10cd3592`.
<details><summary>Package tests and type-checks</summary>
- `@objectstack/platform-objects`: `pnpm test` gave 125 files / 2138
tests passed; `typecheck` passed.
- `@objectstack/cloud-connection`: `pnpm test` gave 94 files / 1359
tests passed (lock VERDICT command-exit 0); `typecheck` passed.
- UI, `pnpm --dir ui exec vitest run` over
`metadata-admin/PackagesPage*` and `studio-design/BuilderLanding*`: Test
Files 33 passed (33), Tests 284 passed (284) (lock VERDICT command-exit
0).
- `@object-ui/i18n` tests: 109 files passed. `type-check` passed for
`@object-ui/app-shell` and `@object-ui/i18n`.
- `pnpm check:app-nav-i18n`: OK, with 14 contributors and 11 locales.
Setup has 62 merged nav ids, each labelled in every locale.
</details>
<details><summary>Ablation (one-off, not kept)</summary>
After committing the fix, `const authoring = face !== 'admin';` in
`PackageDetailSheet` was replaced with `const authoring = true;`. The
replacement was made through `scripts/ablation-replace.mjs`, with an
anchor-hit check and a trap restore. The test "the detail sheet offers
View info, Disable and Delete…" went red (1 failed). After the restore,
the blob matched HEAD and `git diff HEAD` was empty.
</details>
<details><summary>Derived gate families</summary>
`node scripts/pm/dispatch-gates.mjs --ran` reported: 78 derived, 78 run,
0 NOT-MEASURED, a derived zero, because every run recorded an exit code
and none was 3. CI runs the rest of the farm.
The local union ran on `bb10cd3592`. All 77 `--commands` families and
`pnpm --dir ui exec vitest run scripts/` (Test Files 172 passed, 2
skipped; Tests 5127 passed) exited 0.
Two of them needed a retry:
- `check:type-check-debt` first returned queue-timeout 99, because a
sibling run held the verify lock. The retry under the same slot exited
0.
- `check:dual-build-cjs-loads` was red on the first pass. The cause was
a half-built local `@objectstack/organizations` dist, a package outside
this diff. After rebuilding it, the gate exited 0 with 124 entry points.
Changeset families: `check-adr-0087-registration`,
`check-changeset-no-major`, `check-empty-changeset` and
`check:changeset-gate-self-tests` all exited 0.
</details>
- **Fix round 1 (head 35bdb5b).** CI's Test Core (1/10) was red at
bb10cd3 in
`packages/cli/test/connect-agent-both-halves-wire.pin.test.ts` (35
expected, 37 got). The CLI composition has no marketplace, so on main
`group_apps` was empty there and got collapsed; `nav_packages` makes it
served again. The two new served Setup ids are `group_apps` and
`nav_packages`. The pin now restates the exact count 37 in both tests,
with a history line citing #36834, and asserts that `group_apps`'s
children equal `['nav_packages']`. Local runs: the four Setup pins 4/4
files and 10/10 tests; platform-objects 125 files and 2138 tests. Delta
comment 7128676644. That test file is outside the claim's file surface,
and the edit was directed by the fix-round order.
- Open draft PR #34223 restates the same count in that pin. It already
conflicts with main on its own; whichever lands second re-counts.
## Acceptance notes
- **Delete's feedback** is the sheet closing and the row leaving the
list. Both faces already behaved this way, and no success notice was
added, because a notice would change the development face too. Disable
and Enable give an inline notice.
- **A code package's sheet** offers View info only. Code packages are
read-only, as they were before, so Disable and Delete appear on authored
and marketplace packages.
- **Stale QA checklist text.**
`docs/qa/platform-checklist/areas/platform-core.json` (around lines
2393, 2404 and 2441) still describes the retired Installed Apps entry.
It is outside this card's file surface and is left for the checklist
owner.
- **Cloud.** The cloud repository's import of
`MARKETPLACE_INSTALLED_UI_BUNDLE` (cloud PR #3488) keeps compiling. The
bundle now contributes nothing, so whether cloud drops the import is
cloud's call.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (Not run locally: the
repo-wide lint is CI's run.)
- [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.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU)_
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzhpykmQZe1yMupC2CU -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(console): Setup gets one Packages entry, the package list's administration face; the Installed Apps entry retires
9
+
10
+
Clause-②: no
11
+
Metadata-protocol: none
12
+
13
+
The maintainer's ruling on objectstack#36834 amends ruling 甲 of #25098: Setup lists what is installed, with the administration actions only, and the marketplace-only "Installed Apps" entry merges into it.
14
+
15
+
-**Setup → Apps → Packages (`nav_packages`).**`@objectstack/platform-objects` contributes one entry to Setup's `group_apps`, gated on `manage_platform_settings` like Setup's other administration entries. It opens the console's `developer:packages` page with `params: { face: 'admin' }`, so the URL carries `?face=admin`. Its label is translated in every locale the Setup bundle carries.
16
+
-**The page's administration face.** With `?face=admin`, the Packages page lists every package of every source, with modules folded under their app. It shows the Name, Version, Status, Source and Update columns, plus a Source filter (All, Code, Marketplace, Authored) that writes `?source=`. Its only header action is New Package, and a package created there opens in Studio, on the address the Studio landing's package card opens. The detail sheet offers View info, Disable / Enable and Delete (keeping the choice to keep the data), plus "Open in Studio" on an authored package. Import, Edit, Publish, Revert, Export, Duplicate, Adopt loose items and the pending changes' Publish and Discard are not offered there. An unknown or repeated `face` value is refused by name. With no `face`, the page is unchanged: Studio's "All packages" link and each package card's Manage keep every action.
17
+
-**Installed Apps retires.**`MARKETPLACE_INSTALLED_UI_BUNDLE` (`@objectstack/cloud-connection`) no longer carries `nav_marketplace_installed`. The bundle stays exported under its id, with an empty `navigationContributions`, so a host that imports and registers it keeps working. The entry's labels are removed from the Setup translation bundle, and its id joins the dead-key tombstone. A bookmarked `/apps/setup/component/developer/packages?source=marketplace`, which the marketplace page's "Installed" button also opens, still shows the list filtered to marketplace installs, on the administration face.
0 commit comments