Skip to content

fix(console): "customized" means overrides + extensions everywhere; Setup → Packages names arrangements apart - #37351

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-37236-customized-meaning
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-37236-customized-meaning

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #37236

Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在 设置 > 软件包 打开一个应用的详情时,「已定制」只数改过和新增的条目;只调整了排列的应用现在显示「已定制 0 项,调整排列 2 处,已停用 0 项」,不再显示「已定制 2 项」,排列明细照常列出。
  • 属于 Studio 改版:按维护者裁定,「已定制」在设置详情、全部元数据页头和列表筛选里只有一个意思(覆盖 + 扩展)。
  • 出错时管理员只会看到这一行数字或措辞不对,不碰任何数据,可直接撤回。
  • 无。

What changes

  • Setup → Packages detail (PackageCustomizationsPanel.tsx): the 「已定制」 / "customized" count is now customizationTotal (overrides + extensions), the one number the All metadata header and both lists' 「customized」 filter already read. Arrangements are named in their own segment, engine.packages.customizations.arranged (en {count} rearranged, zh-CN 调整排列 {count} 处), drawn only when the count is above 0. The "No changes" line now needs all three counts at 0, so an arrangement-only app never reads "No changes".
    • Arrangement-only app: 0 customized, 2 rearranged, 0 switched off / 已定制 0 项,调整排列 2 处,已停用 0 项.
    • No arrangement: unchanged, 1 customized, 0 switched off.
    • The rows (customizationRowsOf) and the 「布局」 tab are unchanged; arrangements are still listed.
  • customizedCountOf is retired, not fixed to delegate. Its only job was the second meaning of 「已定制」. Keeping a second name for customizationTotal would leave two doors to the same number, and the drift this card fixes came in through that second door. Its one caller and its one test go with it.
  • customizationTotal is unchanged, and so are the header (DirectoryPage.tsx) and both filters (ResourceListPage.tsx, useListOrderedNames.ts). They gain pins, not code.
  • i18n: one additive key in en and zh-CN. No key is removed and no released key changes meaning (engine.packages.customizations.customized keeps its text, and it has not been released yet: it arrived with feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166's unreleased changeset).
  • DELIBERATE CORRECTION of an existing changeset, .changeset/36908-remove-studio-home.md (unreleased). Its sentence "The count now includes tab, field-group and action-layout arrangements, so an app whose only change is a tab arrangement shows as customized." would ship false after this change. It now reads: "Tab, field-group and action-layout arrangements are named on their own in that line, not counted as customized."
  • No server, spec or route change.

Tests

One pin per surface, each on an arrangement-only base fixture (two arrangements, no override, no extension):

Surface Pin
Setup detail, en PackageCustomizationsPanel.test.tsx: arrangement-only app reads exactly 0 customized, 2 rearranged, 0 switched off, both rows listed
Setup detail, zh-CN same file: exactly 已定制 0 项,调整排列 1 处,已停用 0 项
All metadata header metadataAreaHost.customizations-28568.test.tsx: no directory-customizations-total, no tile, no failure line
ResourceListPage filter same file: no metadata-only-customizations on the arrangement-only base's list
useListOrderedNames filter same file: with ?customized=1, the ‹ › names keep the row (the filter is not offered), with a HotCRM control that keeps only its customized row

Also: no arrangement means no arrangement segment, and the mixed fixture now reads 2 customized, 1 rearranged, 1 switched off.

Targeted run (head c9c1d9e)
$ cd ui && pnpm exec vitest run PackagesPage.installedAppsUpdates-34722 PackageCustomizationsPanel metadataAreaHost.customizations-28568 customizationMarks
 Test Files  4 passed (4)
      Tests  77 passed (77)
os-verify-lock: VERDICT command-exit 0

# every app-shell test that reads the changed code (45 files, grep of the panel, rows, marks, header, both filters and the detail sheet), on 08fe4e46, the same diff before the last rebase over #37338
 Test Files  45 passed (45)
      Tests  661 passed (661)
Ablations: each pin red alone when its own surface counts arrangements

Each mutation adds + counts.arrangements at one call site through scripts/ablation-replace.mjs (anchor x1 → x0, blob changed, restored to the HEAD blob with an empty git diff HEAD). The tests import source, so there is no dist/ leg.

A1 PackageCustomizationsPanel.tsx   customized: customizationTotal(read) + read.counts.arrangements
   × lists one row per change ... counts them
   × objectstack#37236: an arrangement-only app reads 0 customized beside its arrangement count ...
   × zh-CN: ... an arrangement-only app is 已定制 0 项 beside 调整排列
   Tests  3 failed | 10 passed (13)
A2 DirectoryPage.tsx header   customizationTotal(...) + counts.arrangements > 0
   × the directory header draws no total for a base whose only change is an arrangement
   Tests  1 failed | 12 passed (13)
A3 ResourceListPage.tsx showCustomizedFilter   same mutation
   × the list offers no "customized" filter to a base whose only change is an arrangement
   Tests  1 failed | 12 passed (13)
A4 useListOrderedNames.ts customizedOffered   same mutation
   × the detail ‹ › names: "only customizations" is not offered to it, so it filters nothing out
   Tests  1 failed | 12 passed (13)
each: "ok restored: blob == HEAD and `git diff HEAD` is empty"
Package suite and type-check
pnpm --filter @object-ui/app-shell type-check     VERDICT command-exit 0
pnpm check:type-check-debt                        re-measure: OK, 0 raw tsc errors

NARROWED, declared: the package's full `pnpm test` (2430 test files) was stopped after 70 minutes on the shared box,
26 files in. The 45-file scoped set above replaces it locally; CI's `Test UI` runs the whole package.

Acceptance notes

  • Wording choice: en reads {count} rearranged, matching the line's other participles ("customized", "switched off") and avoiding "1 arrangements". zh-CN reads the ruling's own 调整排列 {count} 处. The new segment uses the line's existing separator (, / ,), not the ruling example's ·, so the line has one separator.
  • "Don't show a 0-count segment" is applied to the new segment only. The customized and switched-off segments keep feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166's behaviour (both always drawn once anything is non-zero), so an arrangement-only app still shows 0 customized, as the card asks.

Verification

Read first: PackageCustomizationsPanel.tsx (the summary line), then the new describe at the end of metadataAreaHost.customizations-28568.test.tsx.

Two-minute check: from ui/, pnpm exec vitest run packages/app-shell/src/views/studio-design/PackageCustomizationsPanel.test.tsx. Expect 13 passed, including "an arrangement-only app reads 0 customized beside its arrangement count".

Gates

Derived union (dispatch-gates.mjs --commands), run on the final head c9c1d9e: 38 derived, 38 run, 0 NOT-MEASURED (--ran reconciliation exit 0).

  • 37 exit 0, plus check:changeset-fixed (outside the derivation, run because .changeset holds its roster) exit 0.
  • 1 exit 1, expected: check-empty-changeset.mjs --base origin/main refuses the edit to .changeset/36908-remove-studio-home.md. This is the DELIBERATE CORRECTION declared above, not a collision. The gate stays red until the dispatching seat confirms the correction by its own record.
  • Push gates: check:test-source-alias exit 0, check:i18n-keys exit 0, overlap-check.mjs VERDICT clean exit 0, check:nul-bytes exit 0.

Generated by Claude Code

… extensions, names arrangements apart (WIP)

Claude-Session: https://claude.ai/code/session_01QSeKYngAThmzrAhkac86ye
Co-authored-by: Claude <noreply@anthropic.com>
…h filters and the Setup detail; changeset

Claude-Session: https://claude.ai/code/session_01QSeKYngAThmzrAhkac86ye
Co-authored-by: Claude <noreply@anthropic.com>
…rt from customized

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c9c1d9e422e98ef60267030df7bbfb07b7f61a87
Local-runs: probe — the seat's L1 pin and ablation run at this head (vitest, three app-shell test files, throwaway worktree); every judgment below rests on the diff, the card and the head's check-runs
Scope: none (no reviewFace hits: no published schema, no governed path; the review is owed for the DELIBERATE CORRECTION and read on the declaration face) + .changeset/36908-remove-studio-home.md, .changeset/37236-customized-means-one-thing.md, the PR body's Clause-②: no / Metadata-protocol: none lines, and the diff files those sentences describe: ui/packages/app-shell/src/views/studio-design/PackageCustomizationsPanel.tsx, ui/packages/app-shell/src/views/studio-design/packageCustomizationRows.ts, ui/packages/i18n/src/namespaces/studio/en.ts, ui/packages/i18n/src/namespaces/studio/zh.ts

① Derived judgments

  • DELIBERATE CORRECTION — confirmed. The note is .changeset/36908-remove-studio-home.md, feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166's pending (unreleased) changeset. It is the only foreign note the diff touches. Check Changeset job 139509776058 names only this file. One sentence changes, in the "What this environment changed on an installed app" bullet:
    • Before: "The count now includes tab, field-group and action-layout arrangements, so an app whose only change is a tab arrangement shows as customized."
    • After: "Tab, field-group and action-layout arrangements are named on their own in that line, not counted as customized."
    • The old sentence would ship false once this PR lands. At this head PackageCustomizationsPanel.tsx sets customized: customizationTotal(read), and customizationTotal is read.counts.overrides + read.counts.extensions (customizationMarks.ts:97-98). An arrangement-only app therefore reads "0 customized", not customized.
    • I judge the new sentence TRUE at this head, clause by clause:
      • "named on their own in that line": the summary <p> joins engine.packages.customizations.arranged (en {count} rearranged, zh 调整排列 {count} 处) between the customized and switched-off segments. It uses the line's own separator.
      • "not counted as customized": see the customizationTotal reading above.
      • The segment is drawn only when state.arranged > 0. The sentence says arrangements are named, not that a zero is named, so it is not overstated.
    • No other sentence in the note becomes false. "The 'n customized, m switched off' line" still names that line, and the panel, the 「Customize in Studio」 link and the one-app-at-a-time list are unchanged.
    • The correction is minimal: one line, +1/−1.
  • The PR's own note, .changeset/37236-customized-means-one-thing.md, read sentence by sentence. True at head.
    • "counts as customized only … overrides and extensions": true.
    • "the same number the All metadata header shows and the same rule its lists' 「customized」 filter uses": true. DirectoryPage.tsx:246/249, ResourceListPage.tsx:741 and useListOrderedNames.ts:173 all read customizationTotal.
    • "named on their own … only when there are any": true.
    • The example "3 customized, 2 rearranged, 1 switched off" / 「已定制 3 项,调整排列 2 处,已停用 1 项」 matches the two catalogues and the separator.
    • "reads '0 customized, 2 rearranged, 0 switched off' instead of '2 customized'": true. It is pinned exactly in PackageCustomizationsPanel.test.tsx.
    • "still lists both arrangements under the section's 「布局」 tab": true for zh-CN (tab.arranged = 布局). In English the tab reads "Layouts" (nit N1 in the seat's L1).
  • Clause-②: no holds. No packages/spec/src/** path is touched.
    • customizedCountOf is removed, but @object-ui/app-shell is private: true, and packageCustomizationRows.ts is not re-exported from its entry.
    • The one new key goes into the studio namespace of @object-ui/i18n, whose catalogues are typed Record<string, string>. The key adds a runtime entry, not a type, so nothing reachable from the package's declarations widens.
    • The claim (7171285434), the PR body and the changeset all read Clause-②: no through readClause2Line (declared, value no, no arm).
  • Metadata-protocol: none holds. No metadata key, value or type changes. The UI reads the existing served counts.arrangements. All three carriers read none through readMetadataProtocolLine.
  • i18n. released-keys-removed.mjs against @object-ui/i18n@18.6.0 lists the same 77 keys at this head as at the merge base f339060f, so the PR removes no released key. No engine.packages.customizations.* key exists at the tag. The new key is in both of the packs the studio namespace carries, en and zh, with {count} in each.

② Semver level

patch on @object-ui/app-shell and @object-ui/i18n is correct for a non-protocol UI fix with one additive string. CI's Guard against accidental major bumps and Require an ADR-0087 disposition steps are success on job 139509776058. The job's one red step, Reject an empty-frontmatter changeset added by this PR, is the DELIBERATE CORRECTION refusal this record confirms. It is not a level failure.

③ Boundary flags

  • The dev's three open questions are answered by the zone's rulings (7175439691), each A, and each is consistent with ruling B (7158100447):
    • Q1, wording and separator: the ruling's 「·」 example was introduced with "for example".
    • Q2, only the arrangement segment hides at 0: 「已定制 0 项」 stays, as the ruling's example implies.
    • Q3, keep the correction: confirmed above.
  • The dev's out-of-scope note (the full app-shell suite cannot finish inside a dev turn) is carried as noted, not filed. It changes nothing here.
  • SQL push-down: the diff only changes client UI arithmetic over the already-served customization read. It adds no id materialisation and no in-app join. Nothing to record.
  • The author is objectstack-fleet[bot] (relay).
  • This record covers this head only.

Implemented-by: claude/issue-37236-customized-meaning
Reviewed-by: session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head c9c1d9e422e98ef60267030df7bbfb07b7f61a87 · 2026-11-25T22:05Z

  • What was read.

  • Shape.

    • Draft against main, authored by objectstack-fleet[bot].
    • First line Fixes #37236, the only closing keyword in the body, and right: the PR delivers the card's whole "Done when".
    • 9 files, +152/−45. Nothing under content/docs/releases/.
    • check-governed-merges --pr 37351: NOT governed, 197 lines, so Tier S.
    • Two files sit outside the claim's literal surface, and both are accepted:
  • Ruling B → code. 「已定制」 is now one number on every surface: customizationTotal (overrides + extensions, customizationMarks.ts:97-98, unchanged).

    • The Setup detail reads it at PackageCustomizationsPanel.tsx.
    • The header reads it at DirectoryPage.tsx:246/249, the list filter at ResourceListPage.tsx:741, and the ‹ › filter at useListOrderedNames.ts:173.
    • customizedCountOf is gone with its one caller and one test. There are zero references at head.
    • Arrangements get their own segment, shown only above 0. The "No changes" line now needs all three counts at 0. Rows and the 「布局」 tab are unchanged. Held.
  • Pins at head: pass, and red on ablation. Seat run, throwaway worktree at this head.

    • Three files pass: PackageCustomizationsPanel.test.tsx, metadataAreaHost.customizations-28568.test.tsx and PackagesPage.installedAppsUpdates-34722.test.tsx, 69 of 69 tests.
    • Each ablation was applied alone, and each file was restored to the HEAD blob with an empty git diff HEAD:
    # Mutation Red
    A1 Setup detail customized + counts.arrangements 3 of 13: mixed, en arrangement-only, zh-CN
    A2 header gate + arrangements 1 of 13: header pin
    A3 ResourceListPage filter gate + arrangements 1 of 13: list filter pin
    A4 useListOrderedNames gate + arrangements 1 of 13: ‹ › names pin (its HotCRM control stays green)
    A5 drop state.arranged === 0 from the "No changes" test 2 of 13: en and zh arrangement-only
    A6 always draw the arrangement segment 1 of 13: "no arrangement, no arrangement segment"
    A7 customizationTotal itself + arrangements 7 of 69, across all three files

    A1–A4 reproduce the PR's own ablations. A5–A7 are the seat's own.

  • DELIBERATE CORRECTION. It is justified, minimal (+1/−1, one sentence) and declared in the PR body with the old and new sentence. The diff changes code, so the confirmation is the same-head TIER_DEFAULT contract-review PASS (references/landing-operations.md). That record is posted beside this one and judges the sentence TRUE clause by clause.

  • Check Changeset red, accepted as red by design. Job 139509776058 fails only at the step Reject an empty-frontmatter changeset added by this PR. Its error names .changeset/36908-remove-studio-home.md and the DELIBERATE CORRECTION class. The ADR-0087 and major-bump steps are success. All three 〈路径分叉〉 conditions hold:

    • (1) The source says the red is by design on the pushed branch. check-empty-changeset.mjs prints the correction remedy ("the dispatching seat confirms it by its own record"). pr-automation.yml (the "Past a designed red" block) names the foreign-changeset refusal on a PR that corrects a note and adds its own as RED BY DESIGN, left standing.
    • (2) The job does not run on merge_group: pr-automation.yml triggers on pull_request only, and Check Changeset is not a required context.
    • (3) This comment names the gate and the reason. No PR comment carried it before this one, because the zone's note 7175439691 is on the card.
  • i18n.

    • released-keys-removed.mjs against @object-ui/i18n@18.6.0 finds the same 77 keys at head as at the merge base, so no released key is removed. engine.packages.customizations.* is absent at the tag.
    • The new engine.packages.customizations.arranged is in both packs the studio namespace carries (en, zh), with {count} in each.
    • check:i18n-keys is green in the push gates, and Lint UI and Test UI are success.
  • Clause-②. no is right: app-shell is private, and the studio catalogues are Record<string, string>.

    • The card's newest Claim: (7171285434), the PR body and the new changeset each read Clause-②: no through readClause2Line: declared, value no, no arm.
    • Each reads Metadata-protocol: none through readMetadataProtocolLine.
    • The claim matches the body. Skills-docs: is not owed.
  • Check-runs at head. 58 runs: 44 success, 13 skipped (all expected), 1 failure (Check Changeset, above).

    • Lint & Repo Gates, TypeScript Type Check, Type Check UI, Lint UI, all 16 Test UI shards, Build & E2E UI, Live E2E UI, Dogfood Regression Gate and Governed Surface Queue Guard are success.
    • l1-face.mjs --pr 37351 flags only that red.
  • K = 6, merge-tree clean. The merge base is f339060f, and origin/main is 134b71db. main moved one commit (test(runtime): get_record_context answers one caller with the same bytes on the /mcp and stdio doors over a real kernel #37350) since the zone read K = 5. git merge-tree --write-tree origin/main c9c1d9e4 exits 0, and so does the same check against Version Packages chore: version packages (next) #35129 at 62818bba.

  • 维护者速读. Four lines of Chinese business prose:

    • who, where, before and after;
    • the topic (Studio 改版) and the one meaning;
    • display-only risk, which can be reverted;
    • 「无」.
      There are no code names, paths, ruling letters or bare card numbers. The example 「已定制 0 项,调整排列 2 处,已停用 0 项」 matches the en pin's two-arrangement fixture and the zh catalogue. Accurate.
  • N1 — The new changeset says the arrangements are listed "under the section's 「布局」 tab". In English that tab reads "Layouts" (tab.arranged). "the section's Layouts tab (「布局」)" would read right in both languages. This is prose only and needs no new head.

  • N2 — The os-dev report (7175069802) quotes the zh-CN pin as 「…调整排列 2 处…」. The test pins a one-arrangement fixture, 「已定制 0 项,调整排列 1 处,已停用 0 项」, which the PR body's table states correctly. This is a report wording slip only.

No must-fix, no should-fix.

  • Landing. The zone lands it: Tier S, not governed, under 3,000 lines. K = 6 < 15, so no main merge is owed first.
    • Post the same-head TIER_DEFAULT record and this comment on the PR, then run pr_ready + automerge_enable.
    • The DELIBERATE CORRECTION is confirmed by the same-head record. The seat accepts the red-by-design Check Changeset, so the PR enters the queue carrying it.
    • On MERGED, Fixes #37236 closes the card. The zone then removes pm:dispatched and the assignee, and leaves an ACCEPT → PR #37351 comment pointer line on the card that names this comment's id.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Landing · 2026-11-25T22:06Z · head c9c1d9e4 · zone a4-S (#37236)

  • L1 ACCEPT from seat repo:objectstack#4 at c9c1d9e4 (7175934679), with no must-fix and no should-fix. TIER_DEFAULT PASS (7175924037) confirms the DELIBERATE CORRECTION of the unreleased .changeset/36908-remove-studio-home.md.
  • Carried red: Check Changeset is red by design. The seat's L1 records its gate and reason: the correction is source-declared, and the check runs on pull_request only, not on merge_group. The seat ruled to land with it carried.
  • Nits, recorded and not blocking:
    • N1: 「布局」 in the changeset reads "Layouts" in en.
    • N2: the report's zh pin count.
  • check-governed-merges.mjs --pr 37351: NOT governed; 197 changed lines, under 3,000.
  • Checks on the head, newest run of each: 44 success, 13 expected skips, 1 red (the carried Check Changeset above).
  • K: GitHub compare puts the head 6 commits behind main, under 15. merge-tree with origin/main is clean.
  • Clause-②: no, Metadata-protocol: none. Final report 7175069802; finalized-head note on 「已定制」有两种算法:Setup 详情计入排列调整,全部元数据页头和列表筛选不计 #37236.
  • Action: ready, then auto-merge through the merge queue.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 22:07
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 84a27e7 Nov 25, 2026
58 of 59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37236-customized-meaning branch November 25, 2026 22:29
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…p → Packages (objectstack-ai#37362)

Fixes objectstack-ai#37139
Fixes objectstack-ai#37349

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 在 Studio
打开一个软件包时,有「管理元数据」权限的人会在顶栏左侧应用名(没有应用时是包名)右边看到「⋯」,里面是编辑软件包信息、导出、复制为新软件包、还原到上次发布、收编散落项、在设置中管理;「设置
> 软件包」页头的「新建」旁边多了「导入」。
- 属于 Studio 重构专题:Studio 首页删掉后,这些整包动作在界面上没有入口,这次补回来;顺带删掉 17
条已经没有页面在用、也从没发布过的界面文案。
- 出错时最多是某一项该灰没灰、或该能点却灰了,真正的操作仍由服务器把关,开发视图不变,可以直接撤回。
- 请确认一件事:「复制为新软件包」在只读的安装包上按开发视图的做法灰掉了(服务器本来就拒绝复制只读包),而菜单表里这一项写的是「—」。

## What changes

**One copy of each whole-package action.**
`metadata-admin/packageActions.tsx` (new) holds what the development
face's detail sheet used to write inline: the page's `/api/v1/packages`
request helper, `revertPackage`, `exportPackageFile`, `adoptLooseItems`
(+ `adoptedText`), `EditPackageDialog` (moved; still re-exported from
`PackagesPage`), the Adopt confirmation (`AdoptLooseItemsDialog`) and
the Duplicate form (`DuplicatePackageForm`). `PackageDetailSheet` now
imports them; its testids, texts, requests and answers are unchanged
(the existing sheet suites pass as they were).

**Studio's 「⋯」 (`studio-design/StudioPackageMenu.tsx`, new).** Drawn by
`StudioDesignSurface` into a new `menu` slot of `StudioBackToApp`, right
of the app / package name and left of the Studio mark, only when the
page has a current package that exists (never `~org` or `~all`) and
`useCanAuthorMetadata()` holds. The six items, in the table's order:

| Item | Runs | Greyed when |
|:--|:--|:--|
| Edit package info / 编辑软件包信息 | `EditPackageDialog` on the manifest
`/api/v1/packages` lists | read-only package |
| Export / 导出 | `exportPackageFile` | never |
| Duplicate as a new package / 复制为新软件包 | `DuplicatePackageForm` in a
dialog → `duplicatePackage` | read-only package (see Acceptance notes) |
| Revert to last publish / 还原到上次发布 | a confirmation, then
`revertPackage` | read-only package, or a known pending count of 0 |
| Adopt loose items / 收编散落项 | `AdoptLooseItemsDialog`, then
`adoptLooseItems` | read-only package |
| Manage in Setup… / 在设置中管理… | navigates (through the unsaved-work veto)
to `setupPackagePath(id)` | never |

A greyed item carries its reason as its `title`. Writability or a
pending count Studio has not learned yet greys nothing (the server's
gate stays the authority, the same courtesy posture as the rest of
Studio). Answers are toasts. After a revert or an adoption the surface
bumps its publish nonce (pillars and the pending count re-read) and
emits the metadata-refresh pulse; saved package info renames the bar's
package name in place. 「发布全部草稿」 is not in the menu.

**Setup → Packages (`PackagesPage.tsx`).** Import now sits in the
administration face's header beside New Package, the same input and
handler as the development face (also in the folded `⋯` on a narrow
header). `?package=ID` on that page opens the package's detail sheet
once the list has loaded, then drops the param with a replace (the
`?new=package` pattern); an id the list does not name opens nothing.
`PACKAGES_PACKAGE_PARAM` and `setupPackagePath` live in
`packageSource.ts`. This is a page-local query param, not a route.

**i18n.** Additive:
`engine.studio.packageMenu.{trigger,editInfo,duplicate,revert,manageInSetup,noChanges,duplicateTitle,duplicateDescription,revertTitle,revertDescription}`
in studio `en` and `zh`. Export and Adopt reuse the development face's
own labels.

**Rider objectstack-ai#37349 (its own commit, `chore(i18n): remove the studio rows no
screen reads`).** Removes 17 rows from studio `en` and `zh`:
`engine.studio.menu.typeCount` and
`engine.studio.newApp.{title,description,advancedHint,id,help.id,help.name,help.description,help.namespace,help.version,help.type,help.defaultDatasource,help.dependencies,nsDerived,created,exists,failed}`.
`ui/scripts/check-i18n-dead-keys.mjs` lists exactly these 17 as
confirmed, and a `git grep` outside the catalogue finds no reader.
`engine.studio.newApp.nameTaken` and `engine.studio.newApp.appFailed`
are still read by `PackageFormDialog` and stay. Released-ness, measured
on `npm pack @object-ui/i18n@18.6.0`: its `dist/namespaces/studio/en.js`
and `zh.js` carry none of the 17 (only the different
`engine.studio.landing.newApp` / `newAppDescription`); control
`engine.studio.changes` is present. So this is a plain removal:
`Clause-②: no`, no Removed-translation-keys list.

⛔ No server, spec or route change. The development face is not retired.

## Tests

- `studio-design/StudioPackageMenu-37139.test.tsx` (new, 26 cases), real
`StudioDesignSurface`, metadata client and `MePermissionsProvider` over
a fetch stub:
- en and zh-CN: the 「⋯」 sits right of the name with the six items in
order, labelled; no publish-all item.
- en and zh-CN: greyed states — writable with changes greys nothing; a
read-only installed package greys Edit, Duplicate, Revert, Adopt with
the read-only reason; no pending changes greys Revert alone with its
reason.
- en and zh-CN: none on `~org`, none on `~all`, none without
`manage_metadata` (with a same-page control that has it).
- behaviour: Export reads the export door and downloads; Revert's Cancel
sends nothing and its confirm sends `POST …/revert`, after which the
pending count clears; Adopt confirms then sends `POST …/adopt-orphans`
and says 3 moved; Duplicate opens on 「Copy of Sales」 / `ID-copy` and
sends the duplicate body; Edit opens the edit dialog on the listed
manifest; Manage in Setup… lands on
`/apps/setup/component/developer/packages?face=admin&package=ID`.
- one copy: both surfaces import the six shared names from
`packageActions`, and neither spells the revert or adopt request in
place.
- `metadata-admin/PackagesPage.installedAppsUpdates-34722.test.tsx` (the
admin face's harness): the three assertions that said the admin face has
no Import now say it has; new describes pin, in en and zh, Import before
New Package in one header group and Import installing the file and
re-reading the list (development-face control); and `?package=ID`
opening that package's detail (Disable, Delete) and dropping the param,
with an unknown id opening nothing.

<details><summary>Local runs (head 178bfae; its tree is the f332471b
tree the runs read)</summary>

```
# scoped set, after rebasing on 80da086 (objectstack-ai#37351 and objectstack-ai#37348 included)
pnpm --dir ui exec vitest run --maxWorkers=2 PACKAGES_PAGE_SUITES PACKAGE_FORM_DIALOG_SUITES \
  EditPackageDialog CreatePackageDialog* StudioDesignSurface*  StudioPackageMenu-37139 \
  PackageCustomizationsPanel StudioAreaAppOpen-36906 studioAppEdit  packages/i18n/
 Test Files  223 passed (223)
      Tests  2862 passed | 13 skipped (2875)
os-verify-lock: VERDICT command-exit 0

pnpm --filter @object-ui/app-shell type-check        VERDICT command-exit 0   (src + tsconfig.test.json; --listFilesOnly reads both pin files)
pnpm check:type-check-debt                            re-measure OK, 0 raw tsc errors; VERDICT command-exit 0
```

NARROWED, declared: app-shell's whole package suite (2432 test files)
was started and stopped by me after 31 minutes on the shared 4-core box
with no file reported; the 223-file set above replaces it locally. CI's
`Test UI` runs the whole package.
</details>

<details><summary>Ablations: each pin group red alone (ablation-replace,
anchor x1 -> x0, restored to the HEAD blob, git diff HEAD
empty)</summary>

The tests import source through the ui vitest aliases, so there is no
dist leg.

```
1 StudioBackToApp: the {menu} slot deleted                  -t "six items"                 x en-US, x zh-CN        2 failed
2 menu: readOnly = false                                    -t "read-only installed"       x en-US, x zh-CN        2 failed
3 menu: noChanges = false                                   -t "nothing changed"           x en-US, x zh-CN        2 failed
4 surface: packageId !== null -> scopeSegment.length > 0    -t "~org"                      x en-US, x zh-CN        2 failed
5 surface: canAuthorPackage -> true                         -t "without manage_metadata"   x en-US, x zh-CN        2 failed (control passed)
6 PackagesPage: actions back to adminFace ? newPackageButton -t "Import beside New Package" x header en/zh, x import en/zh  4 failed (control passed)
7 PackagesPage: ?package= effect opens nothing               -t "one package"               x opens-that-package    1 failed
```

Ablations 1 and 4 were first sent with a spelling the tool refused
before running anything (an empty replacement; a replacement contained
in its own anchor), so those first attempts measured nothing; the rows
above are the re-runs with `--delete` and a distinct replacement.
</details>

<details><summary>Gates</summary>

- Derived union (`dispatch-gates.mjs --commands`, the same 39 on the
pre-rebase head 975fe6a3 and on 178bfae): `--ran` reconciliation 39
derived, 39 run, 0 NOT-MEASURED, exit 0.
- 37 ran on 975fe6a3 (the same two commits before the rebase onto
80da086), all exit 0.
- `check:type-check-debt` first answered exit 3 (PREREQUISITE NOT MET:
it queued behind my own suite on the lock), then exit 0 under the lock
on the rebased tree; `pnpm --dir ui exec vitest run scripts/` exit 0
there (172 files passed).
- Push gates on 178bfae's tree: `check:test-source-alias` exit 0,
`check:i18n-keys` exit 0, `overlap-check.mjs` VERDICT clean exit 0,
`check:new-line-citations` 0 new.
- `ui/scripts/check-i18n-dead-keys.mjs` lists the 17 rider rows as
confirmed before the rider; the rider grep is empty after it.
</details>

## Acceptance notes

- **Duplicate is greyed on a read-only package**, though the table's
column says 「—」 for it. The server refuses that duplicate
(`DUPLICATE_SOURCE_NOT_A_BASE`, `requireDuplicableSource`) and the
development face does not offer it there, so 「behave exactly as on the
development face」 and the server both point that way. Raised in the
report's open questions; flipping it is one line.
- **Revert asks first in the menu; the development face's Revert still
runs at once.** The table asks for the confirmation; the dispatch keeps
the development face unchanged, so the confirmation is the menu's own
(new `revertTitle` / `revertDescription` keys). The request is the
shared `revertPackage`.
- **Carried from objectstack-ai#37134's report:** a Studio-only author (holds
`manage_metadata`, not Setup → Packages' `setup.access` +
`manage_platform_settings`) still has no New Package door. Not in this
card's menu table, so not built here. Relatedly, such an author's
「Manage in Setup…」 leads to a page Setup refuses them; the table gives
that item no greyed state, so it is drawn as specified. Both are in the
report's open questions.
- The development face is not retired; per the card, that is asked once
this lands.

## Verification

Read first: `studio-design/StudioPackageMenu.tsx` (the greyed-state
rules and where each answer goes), then
`metadata-admin/packageActions.tsx` (the moved code; diff it against the
removed lines of `PackagesPage.tsx`), then the `?package=` effect in
`PackagesPage.tsx`.

Two-minute check: from the repo root, `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/StudioPackageMenu-37139.test.tsx`.
Expect 26 passed.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYmjeYX4T3tqfUCDu4K)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…e redirect; the pillar-era code with no reader goes (objectstack-ai#37383)

Fixes objectstack-ai#36909

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:Studio 的旧地址(以前的「数据 / 自动化 / 权限 / 界面」分区链接、收藏夹、AI
给过的链接、服务器发的草稿审阅链接)都还能打开原来要看的页面,而且一次就跳到位;清理本身用户无感。
- 为什么做:Studio 重构专题的收尾——分区已经被左侧菜单和全屏设计器取代,这一单删掉分区留下的、已经没人读的代码。
- 出错会怎样:如果哪条旧地址漏了,打开它会落到「页面不存在」或错误的列表页;这是纯前端改动,撤回这个 PR 即可恢复。
- 要你做什么:无。

## What changes

No Studio pillar draws a page any more. This PR makes the route, not the
builder, answer every retired pillar address, and deletes what the
redesign left with no reader.

**1. One redirect table, mounted on the route**
(`studioPillarRedirectModel.ts`, `StudioPillarRedirect.tsx`,
`StudioRoute.tsx`).
`/studio/PACKAGE` and `/studio/PACKAGE/:tab` now render
`StudioPillarRedirect`. A retired pillar address redirects once; any
other segment renders the builder (the sharing overview `owd`, or the
not-found state).

| old address | lands on |
|---|---|
| `/studio/PACKAGE`, `/studio/PACKAGE/data` |
`/studio/PACKAGE/metadata/object?package=PACKAGE` |
| `/data?surface=object:NAME` (all three spellings, `?action=` kept) |
`/studio/PACKAGE/metadata/object/NAME?package=PACKAGE` |
| `/data?changes=review` (the server's `studioChangesReviewLink`) |
`/studio/PACKAGE/metadata/object?changes=review&package=PACKAGE` |
| `/automations[?surface=flow:NAME]` | the flow list, or
`/metadata/flow/NAME?package=PACKAGE` |
| `/access[?surface=permission:NAME / owd:overview]` | the permission
set list, the set's matrix (its holder read, as before), or `/owd` |
| `/interfaces[?…]` | the object list, with the "interface editing
moved" notice |
| `/studio/~org` and every `/studio/~org/…` |
`/studio/~org/metadata/flow[/NAME]?source=runtime` |

A base's `.custom` pair keeps each pillar's old rule (Data and
Automations in the pair's area; Access and Interfaces on the base).

**2. One hop (carry item from 7157423170).** Every target in the area is
put where the area would put it (`settledAreaAddress`, built on a new
`studioAddressParts` parser in `studioAddress.ts`), so the area never
redirects a second time. Before: `/data` took two redirects, bare
`/studio/PACKAGE` three, `/studio/~org` two. The publish toast's "Open
Access" now opens the package's permission sets, and the Changes sheet's
link to a permission set opens that set's page, directly instead of
through the old Access address.

**3. Removed, with every reader gone** (all in `@object-ui/app-shell`,
`private: true`, last published 18.2.0 — nothing published narrows):
- `AREA_PILLAR_FOR_TYPE`, `areaItemPillarPath`, `studioPillarItemPath`
(`metadataArea.ts`); `StudioMetadataArea`'s pillar redirect branch.
- `STUDIO_ITEM_PILLAR` (empty since objectstack-ai#36903), `studioItemPillar`,
`studioPillarItemAddress`, `studioSurfaceQuery`,
`StudioItemOptions.spelling` (`studioAddress.ts`). `studioItemPath` now
always returns the metadata address.
- `STUDIO_ORG_SCOPE_PILLAR` (`studioAddress.ts`, its `studioScope.ts`
re-export and the package entry). Kept only as data where a redirect
needs it: the literal `'automations'` inside the redirect table.
- `STUDIO_HOME_PILLAR` from the package entry (the console no longer
reads it). It stays inside app-shell: `studioHomePath` /
`studioChangesReviewPath` mirror the server's `/data?changes=review`
link, which this card may not change.
- The `?surface=` mirror half and the capture half with it
(`useSurfaceDeepLink`, `useSurfaceDeepLinkCapture`,
`useSurfaceDeepLinkMirror`, `parseSurfaceTarget`,
`resolveSurfaceDeepLink`) and their test file.
`useSurfaceActionDeepLink` and the qualifier keys stay (the object
designer and the redirects read them).
- The channel's subscriber half: `useRequestedSurface`, `SurfaceRequest`
and the `requested` state (carry item: no reader since objectstack-ai#37168).
`useSurfaceNavigator` + `SurfaceDeepLinkProvider` stay: the Changes
sheet's security block uses them.
- In `StudioDesignSurface`: the in-surface Data / Automations /
Interfaces redirects, `PILLARS`, the Access landing branch,
`PILLAR_FOR_SURFACE_TYPE`, and the pillar re-entry counter whose value
nothing read.
- `studioMenuModel.ts` needed only the sharing overview's section, not a
pillar map: `PILLAR_TYPE` went; the menu marks nothing current on a
retired address (it never draws one).

**4. `studio.app.ts`: no change needed.** All 15 `metadata:resource` /
`metadata:directory` entries were walked through the console's real path
(`/apps/studio/metadata/TYPE?package=PACKAGE` →
`setupMetadataStudioPath`): each lands on
`/studio/PACKAGE/metadata/TYPE?package=PACKAGE` (or `~all` with no
package), a settled area address, none on a pillar. Reading in
Verification.

**5. Card item 3** (`engine.studio.pillar.*`) was already gone on main
(the claim's Premise). This diff removes no translation call site;
`ui/scripts/check-i18n-dead-keys.mjs` exits 0.

## Tests

Pins (each ablated, below):
- **Table** — `studioPillarRedirectModel.test.ts` walks 22 old addresses
(every package pillar, bare package, a `.custom` pair, every `~org`
address, the three `?surface=` spellings) to their literal targets, plus
the Access mapping; `studioAddress.test.ts` holds every
`STUDIO_ITEM_TYPES` row's `redirectsTo` equal to what the table returns
for each spelling. Route-level:
`StudioRoute.metadataArea-28561.test.tsx` walks 14 old addresses through
the real `studioRoutes` and the real redirect.
- **`/data` single hop** — `the old /data address reaches the object
list in one redirect` (the area's `areaLocationRedirect` answers null
for the target); route-level, the location probe records exactly `[old,
new]`.
- **CONTROL** — `/owd`, `/owd?object=…`, area addresses and an unknown
segment are not redirected (pure and route-level: the probe records
`[url]` only).
- **Changes sheet → permission set** —
`StudioDesignSurface.heldDataCreate-26845.test.tsx` (last describe): the
sheet's request for a permission set lands on
`/studio/PACKAGE/metadata/permission/NAME` on a writable base, and on
the `.custom` pair's address on a read-only base with a pair. Narrowing
`requestSurface` back to objects alone turns both red (`Tests 2 failed |
3 passed`).

Updated: 38 app-shell surface tests now mount the console's route shape
(`StudioPillarRedirect` around the builder on `:tab`); the console route
tests expect the new landings; the publish toast test expects the
permission set list.

## Acceptance notes

Not filed (dead code / drift, no defect class); carrier: none.
- Client producers still write old addresses that now cost one redirect:
`studioHomePath` callers (command palette, app no-access state, AI chat
page, `appRoute`, `PackagesPage`, `PackageCustomizationsPanel`) and
`setupMetadataRedirect`'s `packagedAutomationStudioPath` /
`packagedActionsStudioPath` (two hops for those legacy Setup bookmarks).
Left alone: two of those files belong to an in-flight branch, and the
address they write still works.
- The copilot's surface context (`StudioAiCopilot`) still reads `:tab`
and `?surface=` as its pillar context (cloud#1610 contract); on current
pages it reads the area path instead.
- The surface keeps its `~org` non-area fallback and its pair→base
redirect for owd/unknown segments; the route no longer reaches the
first.

Finding for the seat (class a, user-visible misleading text), not fixed
here: the not-found state at `/studio/PACKAGE/bogus_pillar` says "pick
Data, Automations, Interfaces, Access or All metadata above"
(`engine.studio.notFound.pillar`, en and zh) — none of those exist any
more.

## First read (by risk)

1.
`ui/packages/app-shell/src/views/studio-design/studioPillarRedirectModel.ts`
— the table; the `.custom` pair rules and the `~org` catch-all.
2. `ui/apps/console/src/components/StudioRoute.tsx` — the two routes
that now render the redirect, and the lazy boundary it rides.
3.
`ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx`
— the removed in-surface redirects and the `requestSurface` permission
branch.

## Verification

Two-minute check: open
`/studio/com.example.showcase/data?changes=review` in the Console
(`OS_PORT=3000 pnpm dev`, Console on :5180). Expected: the address bar
shows
`/studio/com.example.showcase/metadata/object?changes=review&package=com.example.showcase`,
the Objects list is open, and the Changes drawer is open over it.

All readings below are on tree `26ec30e1` (the rebased head),
byte-identical to the pushed head `2322b402` (`git diff --quiet` between
them exits 0; see Process notes).

<details><summary>Type-check</summary>

- `pnpm --filter @object-ui/app-shell type-check` (both programs,
`tsconfig.json` and `tsconfig.test.json`): `VERDICT command-exit 0`, 0
`error TS`.
- `pnpm --filter @object-ui/console type-check`: `VERDICT command-exit
0`, 0 `error TS` (run on the pre-rebase head `3a7bc226`; the rebase
brought no console change).
</details>

<details><summary>Tests</summary>

- Full app-shell suite, pre-rebase head `3a7bc226` + the guard fix:
`Test Files 1 failed | 2429 passed | 1 skipped (2431)`, `Tests 1 failed
| 23308 passed`. The one failure was `studioAddress.guard.test.ts` (my
parse prefix spelled the Studio root outside `studioAddress.ts`); fixed
by `studioAddressParts`, then that guard passes.
- Rebased head `26ec30e1`: `vitest run
packages/app-shell/src/views/studio-design
packages/app-shell/src/views/metadata-admin
packages/app-shell/src/console apps/console/src/components` → `Test
Files 1442 passed (1442)`, `Tests 14059 passed | 1 skipped`.
- Pins: `studioPillarRedirectModel.test.ts` +
`StudioRoute.metadataArea-28561.test.tsx` → 64 tests pass.
</details>

<details><summary>Ablations (one per pin; each via
`scripts/ablation-replace.mjs`, anchor hit x1, mutation landed on disk,
restored to HEAD blob `85ed9932ab4b`, `git diff HEAD` empty
after)</summary>

- **Table** — the Automations case maps through `dataPillarRedirect`
instead: red, exactly the Automations rows — 4 in
`studioPillarRedirectModel.test.ts` and 2 route-level ones.
- **`/data` single hop** — `settledAreaAddress(...)` dropped from the
Data case: `Tests 14 failed | 50 passed (64)`, the one-hop pin `the old
/data address reaches the object list in one redirect` among them, and
every route-level `/data` and bare-package row (the probe saw a second
hop).
- **CONTROL** — the `default:` arm redirects to the object list instead
of `null`: `Tests 8 failed | 56 passed (64)`: all pure and route-level
CONTROL cases, plus the `/access?surface=owd:overview` row (its `/owd`
target then redirects again).
- Restored leg: both files plus a scratch walk of `studio.app.ts` →
`Test Files 3 passed`, `Tests 66 passed`.
</details>

<details><summary>`studio.app.ts` walk (scratch test, not
committed)</summary>

Each `metadata:resource` / `metadata:directory` entry through
`/apps/studio/metadata/TYPE?package=PACKAGE` →
`setupMetadataStudioPath`, then `areaLocationRedirect` on the result: 15
of 15 land on `/studio/PACKAGE/metadata/TYPE?package=PACKAGE`
(directory: `/studio/PACKAGE/metadata?package=PACKAGE`), section
`metadata`, settled (no second redirect). With no package: 15 of 15 on
`/studio/~all/metadata/TYPE`, settled. Types: object, app, view, page,
dashboard, report, dataset, action, hook, flow, agent, tool, skill,
email_template.
</details>

<details><summary>Gates</summary>

- Before the pushes: `pnpm check:test-source-alias` exit 0; `ui` `pnpm
check:i18n-keys` exit 0; `node scripts/pm/overlap-check.mjs` `VERDICT
clean exit 0` against origin/main and open PRs objectstack-ai#37380, objectstack-ai#37368, objectstack-ai#37362
(and earlier objectstack-ai#37351, objectstack-ai#37347, objectstack-ai#37348).
- `node ui/scripts/check-i18n-dead-keys.mjs` exit 0; the diff removes no
translation call site.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: OK, 2 anchors judged, 0 lost.
- `dispatch-gates --commands`: 38 derived families. 37 exit 0 locally
(list in the report). `pnpm check:type-check-debt` is NOT MEASURED
locally: the first run hit my 500 s timeout while waiting on the verify
lock my own test run held (exit 124, not a red); CI's run is the
reading.
- `pnpm check:nul-bytes` exit 0.
</details>

## Process notes

- One push (`3a7bc226`) went out before I re-ran the three pre-push
gates; I ran them on that head right after (all exit 0).
- The final rebase could not be pushed: the permission classifier
refused the `--force-with-lease`. I did not retry it. Instead the branch
keeps its pushed history, merges `origin/main` (`1691563a`) and replays
the two later commits; the resulting tree is byte-identical to the
rebased, tested tree.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYngc1UxywCSQwtqdZz)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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 size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

「已定制」有两种算法:Setup 详情计入排列调整,全部元数据页头和列表筛选不计

2 participants