Skip to content

feat(studio): 概览 package overview page — Info and Pending tabs, ⋯ menu in its header - #37546

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-37454-studio-thin-package-overview
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-37454-studio-thin-package-overview

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Requested by Bill · project thread

Fixes #37454
Clause-②: no
Metadata-protocol: none

维护者速读

用户能看到什么变化:在 Studio 里打开一个软件包,左侧菜单第一行变成「概览」,有待发布的修改时旁边显示数量,点数量直接进入待发布。概览页头显示包名、「系统自带/可写」「使用中/已停用」两个标记和包的描述,下面有「信息」「待发布」两栏;原来顶栏左侧的「⋯」软件包菜单搬到了这页页头的右侧。
为什么做:这是 App Studio 改版的第一步(精简的软件包概览)。包的基本信息和等着发布的修改都集中到这一页,不用再去顶栏和设置里分头找。
出错会怎样:在 Studio 里管理软件包的人会碰到。最可能的问题是待发布数字和实际不符,或者从概览发布的结果和顶栏发布不一样;顶栏的发布按钮仍然保留,可以照常用。这个改动可以直接撤回,不涉及数据。
要你做什么:无

What changes

  • New page StudioPackageOverviewPage, reached at /studio/PACKAGE/overview (ADR-0084 § 概览 Overview, amendment 2026-11-26). It is drawn in an item page's frame: StudioItemHeader plus StudioTab.
    • Header: the app mark (or the package icon), the name, and two chips: 系统自带 with a lock on a read-only package or 可写; and 使用中 or 已停用. Both chips come from the package list row's own writable / enabled; a row that does not say draws no chip. The description is the header's note, and the ⋯ menu sits in the header's actions.
    • 信息 Info: read-only rows for name, description, source, version and the package's app (a link that opens it). A read-only package says so beside its source. The id, namespace and type are folded under 技术信息. While the row is read, the card holds an announced loading row (role=status); a failed read says so in place of the fields.
    • 待发布 Pending (?tab=pending): the existing DraftChangesPanel drawn in place. Its tab carries the pending count only while something is pending.
  • DraftChangesPanel gains two optional props. Without them it behaves exactly as before; the body hunk is re-indented, so read it with -w.
    • embedded draws the same header notes and body in a section instead of a Sheet, and does not dismiss toasts on open.
    • reloadKey re-reads the drafts when it moves.
  • StudioDesignSurface
    • Renders the overview branch with the panel wired prop for prop like the top bar's sheet: doPublish (or undefined when publishReadOnly), draftScope, renderPublishRefusal, the pair's customizationOf, and publishing.
    • StudioPendingDraftsContext.Provider now wraps the menu and pillars row, so the menu can read the count.
    • The top bar's Changes / Publish stays; ADR-0084 keeps it until a later card.
  • ⋯ StudioPackageMenu left StudioBackToApp (its menu prop is removed) and now lives in the overview header. Its six rows are unchanged, and it opens aligned to the end. Disable, enable and delete stay in Setup (question 1 ruled B).
  • StudioMenu: the first row of a package's menu, above the groups and under no group's label, is 概览 (a package cube icon). While drafts wait it carries their count as an amber badge, a link of its own beside the row, which opens ?tab=pending. A search lists the row when its name matches. ~org and ~all draw no such row. The menu reads the count from StudioPendingDraftsContext.
  • Address and menu model
    • Address: studioPackageOverviewPath and studioOverviewTab in studioOverviewAddress.ts. The open tab rides the console's reserved tab key (RECORD_DETAIL_TAB_PARAM, urlParams.ts; ui AGENTS rule Convert to monorepo with scoped packages #8), which Studio's item pages already read through ITEM_TOOL_TAB_PARAM; no Studio constant restates it. The builder sits beside studioAddress.ts rather than in it because urlParams.ts imports studioAddress.ts, so the reverse import would be a cycle. studioAddressTable.ts gains the overview family, and its tab row describes the shared key: an item page's tab, and pending on the overview.
    • Menu model: studioMenuOverviewEntry (no entry outside a package; a badge only above zero), studioMenuOverviewMatches, and studioMenuCurrentKey answering overview.
  • Package REST read: ListedPackageManifest now carries enabled and source from the row of GET /api/v1/packages. There is no package metadata type.
  • i18n (en, zh): engine.studio.menu.overview, engine.studio.menu.overviewPending with its singular engine.studio.menu.overviewPendingOne (the catalogue's …One form: "1 change waits for a publish"; zh reads the same either way), and engine.studio.overview.*.
  • Changeset: patch for @object-ui/app-shell and @object-ui/i18n.

Read first (by risk):

  1. StudioDesignSurface.tsx, the overview branch's DraftChangesPanel props. The Pending tab must publish exactly like the top bar.
  2. DraftChangesPanel.tsx, the embedded return and the reloadKey effect deps.
  3. StudioMenu.tsx, renderOverview() and its call above the groups: the badge is a sibling link, not nested in the row's link.

Tests

The broad run, typecheck and gates are on the final head 29bb079. Earlier rounds' ablations ran on 06830bf (page, Pending tab) and 618c0cf (menu row).

  • New StudioPackageOverview-37454.test.tsx (the real surface; the panel probe records the props given to the sheet and to the embedded panel). It covers:
    • the header chips in en and zh, read-only 系统自带 with a lock, and 已停用;
    • the menu in the header and not in the top bar, and no menu without manage_metadata;
    • the Info fields with the technical section folded, and the read-only source sentence;
    • the Pending count and the ?tab=pending URL, with no count when nothing is pending;
    • embedded props identical to the sheet's, and onPublish undefined on both for a read-only package;
    • the branch order: a failed row read says so in place of the fields with the header kept; a read still on the wire shows the announced loading row and neither a failure nor fields, then the fields once it answers; an unknown package at its overview address lands on the not-found state; ~org/overview redirects to the scope's area, read once through the route as the console mounts it and once with the surface alone.
  • New StudioMenu.overview-37454.test.tsx (real provider, sidebar primitive and router). It covers:
    • 概览 is the first link, above every group and under none; it opens the overview, reads 概览 in zh, and is current on the overview including the Pending tab;
    • CONTROL: ~org and ~all draw no row;
    • the badge reads 3 with its aria-label, and one draft reads in the singular ("1 change waits for a publish"); CONTROL: a ledger of 0 and an unknown ledger draw no badge;
    • one click on the badge lands on /overview?tab=pending, and the row lands on the Info tab;
    • a search lists the row on over but not on flow.
  • StudioMenu.test.tsx: the 常用 listing case now asserts that 概览 leads the menu before the 常用 types. Its App Studio 改版(1-1):左侧菜单照前端样式——分组标题可折叠、线条图标不带底色、选中用胶囊加竖条;定义 Studio 专用石墨色 #37452 cases (chevrons, active pill, graphite accent) pass unchanged.
  • Re-pointed, not weakened: StudioDesignSurface.publishCount-11807.test.tsx now runs every case twice, from the top bar and from the Pending tab (describe.each). StudioPackageMenu-37139.test.tsx now opens the menu from the overview header and asserts that the top bar has none. Its no-menu check on ~org and ~all now asks at the overview's own address on each scope, where the menu would be, instead of on pages that never drew it.
  • Extended: DraftChangesPanel.posture-12517.test.tsx covers the embedded panel: no dialog, publish with no options, no toast dismiss (control: the sheet dismisses), a reloadKey re-read (control: an unmoved key reads nothing more), and nothing drawn when closed. studioMenuModel.test.ts covers the overview entry, the badge, the matcher and the current key. studioAddress.test.ts covers the builder, the tab and the table lists.
  • Broad run over studio-design/, preview/ and packages/i18n/ on 29bb079: 449 files, 4720 passed and 13 skipped; lock VERDICT command-exit 0.
  • Typecheck: app-shell tsc --noEmit and tsc -p tsconfig.test.json both exit 0 (the test project at an 8 GB heap).
  • Ablation (each leg went red, and each restore is proven: blob equals HEAD and git diff HEAD is empty):
    • A1: Pending tab onPublish set to undefined. 6 red: 5 Pending-tab publish cases and the prop-parity case.
    • A2: embedded panel dismisses toasts. 1 red.
    • A3: reloadKey dropped from the effect deps. 1 red.
    • A4: embedded branch disabled. 1 red.
    • A5: read-only chip forced off. 3 red.
    • A6: badge drawn at zero in the model. 1 red.
    • B1: the menu row moved below the groups. 1 red (the first-row pin).
    • B2: the badge drawn whatever the count. 2 red (the zero and unknown controls).
    • B3: the badge linked to the row's own address. 1 red (the badge-click pin).
    • C1: the page's failure branch off. 1 red (the load-failure pin).
    • C2: the page's loading branch off. 1 red (the loading pin).
    • C3: the surface lets an unknown package through to the overview. 1 red (the not-found pin).
    • C4a: the surface's own ~org redirect off. 1 red (the surface-alone case).
    • C4b, the control: only the pillar redirect's ~org branch lets the overview through. It stays green because the surface's guard behind it catches the address.
    • C4c: both doors off. 2 red (both cases).
    • C5: the singular label never chosen. 1 red (the one-draft pin).
Ablation log (ablation-replace verdicts)
LEG A1-pending-onPublish :: exit 1 :: Test Files 2 failed (2)  Tests 6 failed | 24 passed (30)
LEG A2-embedded-toast    :: exit 1 :: Test Files 1 failed (1)  Tests 1 failed | 9 passed (10)
LEG A3-reloadKey         :: exit 1 :: Test Files 1 failed (1)  Tests 1 failed | 9 passed (10)
LEG A4-embedded-inplace  :: exit 1 :: Test Files 1 failed | 1 passed (2)  Tests 1 failed | 23 passed (24)
LEG A5-readonly-chip     :: exit 1 :: Test Files 1 failed (1)  Tests 3 failed | 11 passed (14)
LEG A6-badge-zero        :: exit 1 :: Test Files 1 failed (1)  Tests 1 failed | 31 passed (32)
RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok on all four mutated files
LEG B1-first-row         :: exit 1 :: Test Files 1 failed (1)  Tests 1 failed | 9 passed (10)
LEG B2-badge-always      :: exit 1 :: Test Files 1 failed (1)  Tests 2 failed | 8 passed (10)
LEG B3-badge-target      :: exit 1 :: Test Files 1 failed (1)  Tests 1 failed | 9 passed (10)
RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok StudioMenu.tsx
LEG C1-load-failed       :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18)
LEG C2-loading           :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18)
LEG C3-unknown-package   :: exit 1 :: Tests 1 failed | 3 passed | 14 skipped (18)
LEG C5-singular          :: exit 1 :: Tests 1 failed | 10 passed (11)
LEG C4a-surface-guard    :: exit 1 :: Tests 1 failed | 1 passed | 17 skipped (19)
LEG C4b-pillar-only      :: exit 0 :: Tests 2 passed | 17 skipped (19)   (control: the guard behind it holds)
LEG C4c-both-doors       :: exit 1 :: Tests 2 failed | 17 skipped (19)
RESTORE diff-HEAD-bytes=0 status=0 ; hash-ok on every mutated file
os-verify-lock: VERDICT command-exit 0 (every batch)

Acceptance notes

  • The claim's file surface was amended to add StudioMenu.tsx for the 概览 row and its badge only. studio-tokens.ts, studioAccent.ts, studioTitleRow.tsx and PageShell.tsx are untouched.
  • The row is drawn in StudioMenu.tsx and not through buildStudioMenu, which builds only the domain groups: adding a kind there would change the per-kind records the menu keys on. The row reuses the sidebar primitive's SidebarMenuButton, so its active state is the same graphite pill as every entry. In the real browser the current-row background reads rgba(53, 57, 64, 0.1) in light and rgba(208, 210, 216, 0.18) in dark, the same on the 流程 entry and on the 概览 row, and the 5 group chevrons are drawn.
  • The icon is a package cube (Package). A first cut used LayoutDashboard, which the browser showed to be indistinguishable from 应用's LayoutGrid.
  • Mockup 4 comparison.
    • Header, chips, description, tabs, the Info card and the folded 技术信息 match.
    • Not in this card's governing text: the standalone 导出 button (export stays a ⋯ row, six rows unchanged) and the 发布历史 tab.
    • The source line shows the row's own source (代码。只读:不能直接修改。). The mockup's pair-aware sentence (你的修改会单独保存…) is copy for a later pass.
  • The overview's ?tab= is the console's reserved key from urlParams.ts (ui AGENTS rule Convert to monorepo with scoped packages #8), not a Studio constant. Its builder lives in studioOverviewAddress.ts and not in studioAddress.ts: urlParams.ts imports studioAddress.ts and lists its STUDIO_RETURN_PARAM at module scope, so a back-import would be a cycle whose load order decides whether that list reads an uninitialised binding.
  • reloadKey is a prop added to the load effect's deps and not a key= bump, following ui AGENTS rule Convert to monorepo with scoped packages #8 on forced reloads.
  • The top-bar Publish is unchanged and stays until the card ADR-0084 names for its removal.

Verification

Two-minute check: run the showcase example and open /studio/com.example.showcase/overview. Expect:

  • the header with ObjectStack Showcase, 系统自带 with a lock, 使用中 and the description, with ⋯ at the right;
  • 信息 with 基本信息 and a folded 技术信息;
  • 待发布 listing any drafts, with 全部发布 at the bottom.

Real browser: Chromium at deviceScaleFactor 2, light and dark, on the showcase with 3 AI-style view drafts in its customization pair.

  • Shots taken: the Info tab, the Info tab with 技术信息 open, the ⋯ menu open with its six rows, the Pending tab with a count of 3, the Pending tab after publishing, the menu with 概览 first and its badge (full page and close-up), and a badge click landing on the Pending tab.
  • In the menu, the first links are 概览, its badge (3, 3 项修改待发布), then 对象. Clicking the badge lands on /studio/com.example.showcase/overview?tab=pending with the Pending tab open and 概览 current.
  • Clicking 全部发布 in the Pending tab sent POST /api/v1/packages/com.example.showcase.custom/publish-drafts. _drafts then read empty and the tab count disappeared.
Derived gates (dispatch-gates --ran)
Run reconciliation — 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none of them is 3).
every one of the 39 :: exit 0 (incl. check:nul-bytes, check:published-files, check:type-check-coverage, check:test-source-alias,
check:cross-package-test-inputs, check-adr-0087-registration, check-empty-changeset, check-changeset-no-major)
pnpm --dir ui exec vitest run scripts/ :: Test Files 172 passed | 2 skipped (174) · Tests 5130 passed | 2 skipped · lock VERDICT command-exit 0
check-platform-checklist --changed-from origin/main: OK — 2 anchor(s) judged, 0 lost

Generated by Claude Code

@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
…udio-thin-package-overview

Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4
Co-authored-by: Claude <noreply@anthropic.com>
…ens the Pending tab

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Final green head (2026-11-26T13:54Z): ad57b709e643fec2304f17ecb21efea8cf2bee5d. CI read once: 45 success, 13 skipped, 0 other. The area PATCHed the PR body to Fixes #37454 from the dev's prepared text (read-back identical), so PR-body guards re-run on that body. Sent to seat repo:objectstack#5 for L1. os-dev reports: 7192209474 (round 1) and 7193948346 (round 2), both on #37454.

Area notes for L1:

  1. Surface: claim amendment 7192233242 adds StudioMenu.tsx for the 概览 row and its badge only. The claim had marked that file read-only by mistake, so round 1 stopped and asked. studio-tokens.ts, studioAccent.ts, studioTitleRow.tsx and PageShell.tsx are untouched. The App Studio 改版(1-1):左侧菜单照前端样式——分组标题可折叠、线条图标不带底色、选中用胶囊加竖条;定义 Studio 专用石墨色 #37452 menu styling is re-measured unchanged in the browser.
  2. Scope as governed (docs/adr/0084 #amendment-2026-11-26-overview): Info is read-only with the technical fields folded away. Pending embeds DraftChangesPanel with new optional embedded / reloadKey props. The ⋯ menu moves with its six rows. The top-bar Publish stays until App Studio 改版(1-5):去掉 Studio 顶栏改左右两栏——左上角两行(标志加折叠;返回加软件包切换器和「新建软件包」)、只读小锁、折叠窄栏 #37456. The badge is drawn only while drafts are pending. ~org / ~all draw no 概览 row.
  3. Publish parity: publishCount-11807 now runs every case from both the top bar and the Pending tab. A browser publish from Pending posted publish-drafts and cleared the count.
  4. Ablations: A1–A6 (round 1) and B1–B3 (round 2) all go red.
  5. Screenshots: objectstack-seat5/topic-37424/cards/shots-37454/, light and dark, showing the Info tab, the technical fold, the ⋯ menu, the Pending tab, 概览 first with its badge, and a badge click landing on Pending.
  6. Not filed (copy choices against mockup 4): the source sentence wording, and the standalone 导出 button and 发布历史 tab. The last two are phase 2 by the governing text.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head ad57b70 · 2026-11-26T13:55Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: ad57b709e643fec2304f17ecb21efea8cf2bee5d
Local-runs: none

Read: card #37454 (body, claim 7190624039, reports 7192209474 and 7193948346, amendment 7192233242), the final-head comment 7194013036, the P1-3 row of epic #37424's phase table (7184108099), ADR-0084 § 概览 Overview on main, the PR body, and the net diff origin/main...ad57b709 (22 files, +1758/−434). Check-runs on the head: 47 success, 15 skipped, 0 failed or pending.

① Derived judgments

Acceptance, line by line.

  • 概览 is the first menu row, above the groups and under no group. It carries the pending count as a badge only while the count is above zero, and a click on the badge opens ?tab=pending. ~org and ~all draw no row. Met (StudioMenu.tsx renderOverview, studioMenuOverviewEntry).
  • The header reuses StudioItemHeader. It shows the name, 系统自带 (with a lock) or 可写, 使用中 or 已停用, the description, and the ⋯ menu with its six rows unchanged. Disable, enable and delete stay in Setup (Q1 = B). Met. A row with no boolean enabled draws no chip, so nothing is guessed.
  • The Info tab is read-only: name, description, source, version and app. The id, namespace and type are folded under 技术信息. Met.
  • The Pending tab is DraftChangesPanel drawn in place. It gets doPublish, or undefined when publishReadOnly, plus draftScope (the pair, per ADR-0146 D3), renderPublishRefusal, customizationOf and publishing, the same props the top-bar sheet gets. The two differ only in posture (the default review) and include (used only when no package is open), and neither changes the publish request. Met.
  • "Publishing behaves exactly as from the top bar": publishCount-11807 now runs every case through both doors with describe.each, and no expectation was loosened. Met.
  • Read-only posture: there is a lock chip, the source line says the package is read-only, and onPublish is undefined on both doors (tested). Met.
  • The copy says AI drafts (engine.studio.overview.pendingNote). Met.
  • There is no package metadata type. The page reads the package REST list. The top-bar Publish stays until App Studio 改版(1-5):去掉 Studio 顶栏改左右两栏——左上角两行(标志加折叠;返回加软件包切换器和「新建软件包」)、只读小锁、折叠窄栏 #37456. Met.
  • The epic's P1-3 row ("概览 first entry, Info + Pending tabs, ⋯ moved") is met in full. The 导出 button and the 发布历史 tab are phase 2 under the governing text, and the PR rightly leaves them out.

Surface.

  • Every path is inside the claim: studio-design/**, preview/DraftChangesPanel.tsx, the studio i18n namespace files and one changeset.
  • StudioMenu.tsx gains only the 概览 row: imports, the context read, renderOverview, its call, and the row joining the no-matches condition. That is within amendment 7192233242.
  • studio-tokens.ts, studioAccent.ts, studioTitleRow.tsx and PageShell.tsx are untouched.
  • DraftChangesPanel keeps its default behaviour. Its body is moved into a shared fragment, and its new props are optional.

New address and menu-model entries.

  • The overview family has a builder that the address test pins, and the table lists it.
  • Deep links: /studio/PACKAGE/overview?tab=pending opens Pending (tested). An unknown ?tab= value falls back to Info (tested).
  • Back and forward: switching tabs replaces the history entry, as flowDesignerTabs and objectDesignerTabs do. The badge pushes a new entry.
  • An unknown or uninstalled package hits the existing pkgMissing not-found branch, which comes before the overview branch. ~org/overview redirects to the org scope, and ~all never reaches the branch. Package-less scopes draw no row and no page. All of this is correct, but none of it is tested on this address (S2).

States.

  • Loading: a spinner.
  • Error: loadFailed with the envelope's message in role=alert, so a 403 shows its sentence.
  • Empty: 未填写, and the app row is dropped when the package has no app.
  • Permission refused: no ⋯ without manage_metadata (tested), and the header is still drawn.
  • Pending inherits the panel's own empty, loading and error states.

Accept sets and public surface.

  • No server route, spec or protocol file changes.
  • ListedPackageManifest gains the optional fields enabled and source, read from the row as served.
  • DraftChangesPanel gains the optional props embedded and reloadKey.
  • StudioBackToApp loses its menu prop. StudioBackToApp is not exported from the app-shell index, and StudioDesignSurface was its only consumer.
  • All of these sit in @object-ui/app-shell, which is private: true: it is versioned but not published to npm.
  • @object-ui/i18n is published. It gains 22 studio catalogue keys, purely additive. They change no accept set.
  • Each of these changes is judged right.

i18n. en and zh add the same 22 keys. Every key is used, and the reused keys engine.packages.source.* and engine.studio.pkg.readonlyHint exist in both files. No new strings are hard-coded. See N2 and N3 for wording and a11y.

Tests.

  • The new overview tests run the real surface, and the new menu tests run the real provider, sidebar and router. They include real controls: ~org and ~all draw no row, a ledger of 0 or null draws no badge, a writable chip is kept beside 已停用, no ⋯ without manage_metadata, the sheet still dismisses toasts, and an unmoved reloadKey reads nothing more.
  • The re-pointed tests (11807, 37139, StudioMenu.test) are not weakened.
  • The PR body reports ablation legs A1–A6 and B1–B3, each going red.

Findings.

  • S1 (should-fix) — STUDIO_OVERVIEW_TAB_PARAM = 'tab' is minted as a new literal in studioAddress.ts. The ui AGENTS rule Convert to monorepo with scoped packages #8 that the PR body cites says ?tab= constants live in urlParams.ts, and RECORD_DETAIL_TAB_PARAM already holds 'tab'; ITEM_TOOL_TAB_PARAM aliases it. The new STUDIO_QUERY_PARAMS row also says tab is "Read on the overview only", but Studio's item pages already read ?tab= through ITEM_TOOL_TAB_PARAM on metadata addresses. Fix: alias the existing constant, and reword the row so it covers both readers.
  • S2 (should-fix) — Several paths on the new address have no test:
    • the overview's own failure state (studio-overview-load-failed) and its loading state;
    • an unknown package at /studio/PACKAGE/overview landing on not-found;
    • ~org/overview redirecting.
      The code is right today, but nothing pins the branch order that keeps a missing package off the overview. One failing-list case and one unknown-id case would close the gap.
  • N1 (nit) — Push-down. The Info tab reads the whole GET /api/v1/packages list and picks one row on the client (rows.get(packageId)), although GET /packages/:id serves the same projection. The page states a reason: it shares the request the surface already sends. That holds on a cold mount. Entering 概览 from another Studio page, and each refreshKey move, still sends a full-list read. The list is the package registry and no SQL is involved, so this is not a Prime Directive 5 breach. A single-row read is the narrower choice.
  • N2 (nit) — The loading row is a p holding only an aria-hidden spinner, so assistive tech gets nothing while the read is in flight. It needs a role=status with sr-only text.
  • N3 (nit) — In English, engine.studio.menu.overviewPending reads "1 changes wait for a publish" at a count of 1. The badge's aria-label and the tab title both use this key.
  • N4 (nit) — In StudioPackageMenu-37139, the "no ⋯ without a current package" checks on ~org and ~all now pass vacuously. The menu is drawn only on the overview, which those scopes never reach, so the checks can no longer fail on the gate they name.

② Semver level

  • The changeset bumps @object-ui/app-shell and @object-ui/i18n by patch.
  • Metadata-protocol: none is right: nothing a metadata author can write changes. Under AGENTS.md checklist step 3, none takes patch, so the level is right.
  • Published packages: @object-ui/i18n only. @object-ui/app-shell is private, versioned under privatePackages, and not published to npm.
  • Clause-②: no is right. No published accept set or public surface widens: the i18n keys are additive catalogue entries, and every API change is in the private app-shell.
  • No narrowing arm is owed. The changeset body carries both declaration lines, and they match the PR body.

③ Boundary flags

  • Round-1 open_questions (how the 概览 row lands, given StudioMenu.tsx was read-only): answered by amendment 7192233242 (option A). The diff stays within it. The PR is back to Fixes #37454.
  • Round-2 open_questions: none.
  • out_of_scope_findings (the mockup's pair-aware source sentence; 导出 and 发布历史): agreed, not owed here. 导出 and 发布历史 are phase 2 in ADR-0084. The source sentence is copy that a later pass can take up.
  • Deviations: the broad suite ran on 618c0cf, and ad57b70 only swaps one icon import. CI on ad57b70 is green, so nothing is outstanding.
  • SQL push-down: no new id materialisation and no in-app join over SQL-backed data. The one client-side filter is N1, and the page gives its reason.

Implemented-by: claude/issue-37454-studio-thin-package-overview
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: ad57b709e643fec2304f17ecb21efea8cf2bee5d
REWORK — L1, seat repo:objectstack#5

  1. Shape: open draft against main, Fixes #37454. 22 files, +1758/−434. Not governed. Clause-②: no (app-shell is private and the i18n keys are additive), Metadata-protocol: none, patch. Every file is inside the claim plus amendment 7192233242; StudioMenu.tsx gains only the 概览 row.
  2. Premise: every line of card App Studio 改版(1-3):精简版软件包概览页——菜单第一项「概览」带待发布数字,信息页签只读、待发布页签接住发布,「⋯」软件包菜单搬进页头 #37454 and of epic 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424's P1-3 row is met. The Pending tab uses the same publish wiring as the top-bar panel, and the publish-parity test runs every case from both doors. A read-only package shows the lock. Deep links to ?tab=pending work, and unknown packages land on the existing not-found state.
  3. Gates: contract record 7194215496 reads PASS, with two should-fix findings. CI on this head: 47 success, 15 skipped, 0 failed.
  4. Owed for the delta:
    • S1: STUDIO_OVERVIEW_TAB_PARAM = 'tab' is a new literal in studioAddress.ts. ui AGENTS rule Convert to monorepo with scoped packages #8, which the PR body itself cites, puts ?tab= keys in urlParams.ts, which already holds 'tab'. Reuse or move it there. Correct the address-table row too: Studio item pages already read ?tab=, so the key is not "read on the overview only".
    • S2: pin the overview's branch order. Add tests for a load failure, the loading state, an unknown package at /studio/PACKAGE/overview, and the ~org/overview redirect, each with its ablation.
    • N3 ("1 changes wait for a publish" at a count of 1): fix it with plural-aware text in the same push. N2 (a screen-reader label on the loading row): fix it if cheap. N1 (one package picked from the full list) and N4 (two ⋯ checks that can no longer fail; delete or re-point them if cheap) are accepted.
  5. Out of scope and where it went: none.
  6. Next: push, then knock. The delta reads S1 and S2. After ACCEPT, area ux-37424 lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Final green head for the delta round, against the seat's REWORK 7194226440: 29bb079fc13dad60882e6380b1235bb6b1ea6207. CI was read once: 58 check-runs, 45 success, 13 skipped, 0 failed. The os-dev report is 7196412422 on #37454. The area PATCHed the PR body with the dev's prepared delta (read-back below).

What changed:

  • S1: STUDIO_OVERVIEW_TAB_PARAM is gone. The overview's ?tab= now rides RECORD_DETAIL_TAB_PARAM from urlParams.ts. The overview builder moved to a new pure module, studioOverviewAddress.ts, inside studio-design/**. Importing urlParams.ts back into studioAddress.ts would have made a module cycle, because urlParams.ts reads STUDIO_RETURN_PARAM at module scope. The STUDIO_QUERY_PARAMS row now names both readers: an item page's tab, and pending on the overview.
  • S2: the overview's branch order is pinned for load failure, loading, unknown package → not-found, and ~org/overview → org scope. The last one is read through both doors, the console route and the surface alone. Ablations C1–C5: each goes red, except C4b, a control that stays green on purpose because the surface's guard sits behind the pillar redirect.
  • N3: a singular …One key at count 1. N2: role=status with sr-only text. N4: the ~org/~all checks now ask at /overview, so they can fail again. N1: accepted as is.
  • 14 files, +218/−51, all inside the claim and amendment 7192233242. No browser pass this round: the URL is unchanged, and the only visible change is copy.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 29bb079fc13dad60882e6380b1235bb6b1ea6207
Local-runs: none

This is a delta review against my record on ad57b709. It covers the seat's REWORK 7194226440 (S1, S2 and N3 owed; N2 optional; N1 and N4 accepted), the dev's report 7196412422, the area's delta note 7196450289, git diff ad57b709..29bb079f (two commits, 14 files, +218/−51, with no merge of main) and the net diff against origin/main (23 files, +1931/−440).

Check-runs on the new head: 46 success, 15 skipped and 1 in progress. The one in progress is a second Check Changeset run that the PR-body edit started at 15:35Z. The first Check Changeset run on this head finished with success at 15:12Z. Nothing has failed.

① Derived judgments

Surface. Every new or changed path is under studio-design/** or the studio i18n namespace files, and the changeset line is reworded.

  • The new module studioOverviewAddress.ts is inside the claimed glob.
  • StudioMenu.tsx changes only in the 概览 badge's label, so it stays inside amendment 7192233242.
  • The read-only files are still untouched.

Prior findings.

  • S1: closed.

    • STUDIO_OVERVIEW_TAB_PARAM is deleted. The page, the builder and the address table now use RECORD_DETAIL_TAB_PARAM from urlParams.ts, the key ITEM_TOOL_TAB_PARAM aliases.
    • The STUDIO_QUERY_PARAMS row now names both readers: an item page's tab, and pending on the overview.
    • I checked the reason given for the move: urlParams.ts imports STUDIO_RETURN_PARAM from studioAddress.ts, so the builder could not stay in studioAddress.ts without a cycle. The new module imports both and nothing imports it back.
    • The URL is unchanged: studioPath accepts a URLSearchParams query, and the existing builder test still expects /studio/crm/overview?tab=pending.
    • studioAddress.test now also pins that the builder writes the reserved key.
  • S2: closed. A new describe, "the overview's branch order", adds these pins:

    • a failed row read gives role=alert in place of the fields, and the header stays;
    • a read still on the wire gives a role=status loading row with neither a failure nor fields; as a control, the fields appear once the read answers;
    • /studio/com.nowhere.pkg/overview lands on not-found, with no overview and no menu;
    • ~org/overview redirects to studioOrgScopePath(). This is read twice, once through the pillar redirect and once on the bare surface.

    The dev reports ablations C1–C5, all red except C4b. C4b is a stated green control. The pillar door alone cannot be singled out because the surface's own guard sits behind it, and C4c shows that turning off both doors goes red. That reasoning holds.

  • N1: open, accepted by the seat. Nothing changed: the page still picks one row out of the full GET /packages list.

  • N2: closed. The loading row is role=status with sr-only engine.studio.overview.loading, in both en and zh. The loading test pins it.

  • N3: open, narrowed. The menu badge now picks engine.studio.menu.overviewPendingOne at a count of 1. That follows the catalogue's existing …One pattern (for example publishedAllCountOne), and the en and zh forms are pinned. But my N3 named two places, and the Pending tab's count title in StudioPackageOverviewPage.tsx still calls tFormat('engine.studio.menu.overviewPending', …) without the singular. With one draft, its hover title still reads "1 changes wait for a publish". It stays a nit: the tab's count is visible text, and the title is only a tooltip. See N5.

  • N4: closed. The ~org and ~all no-⋯ checks in StudioPackageMenu-37139 now ask at /overview and also assert that no overview is drawn. A branch reorder that drew the overview there would now fail them.

i18n. en and zh each gain the same two keys, menu.overviewPendingOne and overview.loading, so both files hold 24 matching new keys in all. The zh singular reads the same as the plural, which is right for Chinese. No new strings are hard-coded.

Accept sets and public surface. Nothing new is published.

  • The added exports (studioOverviewAddress.ts, STUDIO_MENU_OVERVIEW_PENDING_ONE_KEY) and the moved exports (the builder and tab helpers out of studioAddress.ts) are all inside the private @object-ui/app-shell. None is re-exported from its index.
  • @object-ui/i18n gains two additive catalogue keys.
  • Each change is judged right.

New findings.

  • N5 (nit) — In StudioPackageOverviewPage.tsx, the title on the Pending tab's count, studio-overview-tab-pending-count, still uses only the plural key. Choosing engine.studio.menu.overviewPendingOne at a count of 1, as StudioMenu.tsx now does, would finish N3. This is the open remainder of N3, given its own id. It does not affect correctness.

② Semver level

  • No change of level. @object-ui/app-shell and @object-ui/i18n still take a patch, and Metadata-protocol: none is right.
  • @object-ui/i18n is published and @object-ui/app-shell is private.
  • The changeset body now names the singular key. Clause-②: no is still right: the new locale keys are additive, and the module move is inside the private package.

③ Boundary flags

  • open_questions: none. out_of_scope_findings: none.
  • The deviation (C4b, a green control) is answered above.
  • The dev ran no browser pass this round. I accept that: the URL is unchanged, and the visible change is an sr-only string and a label's wording.
  • The seat accepted N1 and nothing changed it, so it stays open as a nit with its reason recorded.
  • SQL push-down: there is no new data read in the delta. The client-side filter is still N1.

Implemented-by: claude/issue-37454-studio-thin-package-overview
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对 (delta)

Head-sha: 29bb079fc13dad60882e6380b1235bb6b1ea6207
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: draft against main. Two commits with no merge of main, every path inside the claim plus amendment 7192233242. Not governed, not security-touching. Patch, Clause-②: no: right (@object-ui/i18n gains two additive keys).
  2. Closed: S1 (?tab= reuses RECORD_DETAIL_TAB_PARAM; the builder's move to studioOverviewAddress.ts avoids a real cycle), S2 (the four branch-order pins; C4b green by design), N2 and N4.
  3. Gates: delta record 7196540280 (TIER_DEFAULT) reads PASS, with no open should-fix. CI on this head: 0 failed.
  4. Accepted deviations: N1 (as before), N3 narrowed to N5 (the Pending tab's count tooltip still uses the plural key at 1). N5 can ride on the next touch of this page.
  5. Out of scope and where it went: none.
  6. Landing terms: not governed, under 3000 lines, no decision owed. The area lands it once the body-edit run of Check Changeset is green. The PR touches ui/**/locales/en.ts, so check the shared-budget leg at landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Landing (area ux-37424): the seat's delta L1 is ACCEPT (7196548452) on head 29bb079fc13dad60882e6380b1235bb6b1ea6207. The delta record 7196540280 is PASS with no open should-fix. The PR is not governed, is under 3000 lines and owes no decision, so the area lands it: ready plus auto-merge. N5 (the Pending tab's count tooltip at 1) rides on the next touch of this page, per the seat.

Landing legs, read by hand: landing-k can't answer, because no Test Core ran on this UI-only head. The last green PR run started at 15:10Z on the merge ref, and main has had no first-parent commit since 15:09Z, so the effective K is 0. Shared-budget leg: the PR touches ui/packages/i18n/src/namespaces/studio/{en,zh}.ts, which is not a ui/**/locales/en.ts book input, so it touches no book. Locale leg: no translations/ file. Nothing says to merge main first.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 15:39
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45851357602 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (13/16) — 失败步骤: Run the ui tests (shard 13/16)

    × a name save keeps the id and the email, takes the new name, and remounts nothing 13ms
    FAIL   dom  packages/auth/src/__tests__/AuthProvider.test.tsx > updateUser keeps the signed-in identity (objectstack#36972) > a name save keeps the id and the email, takes the new name, and remounts n
      ↳ 失败原因: AssertionError: expected 2 to be 1 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • packages/auth/src/__tests__/AuthProvider.test.tsx — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 10 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Queue triage (area ux-37424), for queue build 45851357602. The only red is Test UI 13/16: ui/packages/auth/src/__tests__/AuthProvider.test.tsx, "a name save … remounts nothing" (expected 2 to be 1).

Read as a flake: re-armed once, per triage step 2/3. If it goes red again on the same test, the area stops and files it as a flake card, and does not re-arm again.

Merged via the queue into main with commit 4e10d4b Nov 26, 2026
63 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37454-studio-thin-package-overview branch November 26, 2026 16:13
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…nner its height back (objectstack-ai#37588)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDJAbBe3iTrFcF7GZrucZ32)_

Fixes objectstack-ai#37528

## What changes

- `ChromeBannerSlot` (`app-shell/src/layout/chromeBannerHost.tsx`): when
the console's standing banners (impersonation, read rate, storage) are
drawn **in place** above the routes, a `display: contents` wrapper
measures them (`ResizeObserver` on each child, `MutationObserver` for
banners that come and go) and publishes the summed height as
`--os-chrome-banners` on the document root; cleared on unmount and while
nothing is drawn. Drawn into an app layout's host (desktop, inside an
app, objectstack#36112) nothing is published, as that host sits inside
the content area.
- The console's full-height shells take the viewport less that property,
through `CONSOLE_FULL_HEIGHT` (module-local constants, literal Tailwind
classes): `AppShell` in `@object-ui/layout` (height, and a `min-h-` that
tailwind-merge puts in place of the sidebar wrapper's own `min-h-svh`),
`StudioDesignSurface`, `HomeLayout`, `AiChatPage`, the two organization
layouts, the app-unavailable / no-app screens in `AppContent`, and
`StudioRoute`'s access-required screen. The property is unset outside
the console and on an ordinary session, so every class there computes to
the plain viewport height.
- The banner keeps its place in flow (objectui#4467) and its `sticky`;
nothing about where it is drawn changes.

## Why

While an administrator impersonates a user, the banner sat in flow above
a shell that still took `100svh` / `100vh`, so the document was taller
than the window by the banner's height: list footers and bulk action
bars fell below the fold and the page grew a second scrollbar.

Measured on `main` (4116465) in a local console against
`examples/app-crm` (`--fresh`), impersonating a seeded user,
`document.documentElement.scrollHeight` against `innerHeight`:

| page | 1280×768 before | 1280×768 after | 390×844 before | 390×844
after |
|---|---|---|---|---|
| `/home` | 768 / 768 (redirects into the app) | 768 / 768 | 921 / 844 |
844 / 844 |
| an app list (`crm_lead`) | 768 / 768 (objectstack-ai#36112 host) | 768 / 768 | 921 /
844 | 844 / 844 |
| `/studio` | 821 / 768 | 768 / 768 | 921 / 844 | 844 / 844 |

The first push fixed `/home` only: the sidebar wrapper's own `min-h-svh`
and Studio's access-required screen still overflowed, which the second
commit covers.

## Verification

- New `layout/__tests__/chromeBannerHost.bannerHeight-37528.test.tsx` (5
cases: in place publishes the summed height and clears on unmount; no
banner publishes nothing; a resize and a banner going away republish;
drawn into the host publishes nothing; every full-height class reads the
property with a `0px` fallback). With `chromeBannerHost.tsx` restored
from `main`, 3 of the 5 go red (the two "nothing published" cases are
controls).
- `pnpm --dir ui exec vitest run` over `packages/layout/`,
`packages/app-shell/src/layout/`, `src/console/__tests__/`,
`src/console/home`, `src/console/ai`, `src/console/organizations`,
`src/views/studio-design`, the print stylesheet pin,
`apps/console/src/components` and the boot-redirect pins: all green
(3,325 + 3,862 tests). `ai-surface-unavailable` in `ConsoleShell` is
deliberately left on `h-screen`: `bootRedirectCoverage.test.tsx` reads
that class as the full-viewport cover.
- `type-check` for `@object-ui/app-shell` and `@object-ui/layout`:
clean. `eslint` on the changed files: 0 errors.
- The full UI suite runs in this PR's CI.
- `overlap-check`: exit 0 (shares `StudioDesignSurface.tsx` with objectstack-ai#37546
and `AiChatPage.tsx` with objectstack-ai#37539, both merge cleanly).

Clause-②: no
Metadata-protocol: none

## 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` on the changed files passes (the
full `pnpm lint` runs in CI).
- [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.
- [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (full
local suite not run; CI carries it)

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ccess group (objectstack-ai#37602)

<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgU5DKF7KXCzL3BS7FYTB4qi)_

Fixes objectstack-ai#37565

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 岗位、能力、权限集、共享规则的全环境目录,从 Studio 菜单搬到 Setup 的“访问控制”分组,名为“岗位与权限”。
- Studio 菜单不再有这一项;对能进 Setup 的用户,旧的书签和链接只跳转一次,直接落到 Setup 的新页面;不能进 Setup 的
Studio 用户仍在 Studio 里看这些列表。
- 进入门槛没有放宽:新入口和新页面都要求进入 Studio 所需的同一项权限,外加 Setup 本身的权限。
- 在目录里点开某一条,仍在 Studio 的编辑器中打开;Studio
找不到包时的默认落点暂时改为“无包”范围,等“移入包”功能上线后一并撤掉。

## What changes

- **New Setup entry**: `nav_access_directory` ("Positions and
Permissions", icon `key-round`) in Setup's `group_access_control`,
contributed by
`packages/platform-objects/src/apps/setup-nav.contributions.ts`, with
`requiredPermissions: ['studio.access']`. Labels in all 11 locale packs,
source hashes updated.
- **New Setup page** `security:access-directory`
(`/apps/setup/component/security/access-directory`), registered in
`builtinComponents.tsx`. It serves the directory and each environment
type's list (`permission`, `position`, `capability`, `sharing_rule`,
`?scope=environment`) by mounting the existing metadata-admin directory
and list pages under the cross-package leg's host shape (no package,
writable), rooted at the page. Without `studio.access` it renders an
alert naming the capability and reads nothing.
- **Rows open the item editor in Studio**: an item, a create and a
history under the Setup page go to
`/studio/~all/metadata/<type>/<name>?scope=environment`, the editor the
environment scope uses today, because an environment item is edited by
name and may belong to no package.
- **Studio's `~all` menu entry is retired** (`studioMenuModel.ts`, its
label key and icon). The package-less menu's access rows point at the
Setup page's type lists for a user holding `setup.access`; without it
they keep the Studio environment-scope lists
(`/studio/~all/metadata/<type>?scope=environment`).
- **Old addresses redirect once**: `/studio/~all`,
`/studio/~all/metadata` and a list of one of the four types in the
environment scope, including Setup's old `/apps/setup/metadata/...`
catalog addresses, land on the Setup page in one hop for a user holding
`setup.access` (inside Studio read from the set Studio's entry gate
hands its pages; on Setup's old aliases from the session's capability
answer, read fail-closed). Without it, the leg keeps them and a bare
`/studio/~all/…` lands on `/studio/~all/metadata`. The cross-package
list of any other type, and item pages, stay in Studio.
- **Studio's no-package fallback** (`studioEntryFallbackPath`,
`newPackageDoorPath`) now lands on
`/studio/~org/metadata/flow?source=runtime` instead of the retired
directory. ⚠️ This is temporary: `~org` retires with the Phase 4 "move
into package" door (Q3 ruling 7184753035), and the fallback moves with
it.
- The Studio package-not-found button's label
(`engine.studio.notFound.allMetadata`, key unchanged) now names where it
goes: "Open organization flows" / 打开「组织流程」.
- Surface added with the area's approval (claim amendments on objectstack-ai#37565;
the third adds the `setupMetadataStudioPath` call sites in
`ui/packages/app-shell/src/console/AppContent.tsx` and
`ui/apps/console/src/AppContent.tsx`): a one-line re-export of
`ACCESS_DIRECTORY_PATH` (and, in the rework, `holdsSetupAccess`) from
`ui/packages/app-shell/src/index.ts`; a doc-comment-only edit in
`StudioEntryRedirect.tsx`; one sentence each in
`content/docs/permissions/authorization.mdx` and
`content/docs/permissions/permission-sets.mdx`, and two lines of
`content/docs/permissions/administrator-guide.mdx` (the matrix editor's
path and the where-to-find table row), re-pointed at Setup → Access
Control (second claim amendment); and `StudioPaletteGroups.tsx` drops
the retired kind's icon key and its import, which the full build refused
to compile.

### Answer to objectstack-ai#37424 comment 7188504633 (a)

The package's 全部类型 directory still lists `datasource` where the package
holds one, and that tile still opens Setup → Datasources (the
directory's href override). This PR does not change that; removing the
menu row is objectstack-ai#37564's job. The new Setup access directory lists only the
four environment types and never `datasource`.

## Tests

- New: `views/setup/accessDirectory.test.ts` (address model: what lands
on Setup, what stays in Studio, one hop both ways) and
`views/setup/AccessDirectoryPage.test.tsx` (gate refusal with control,
the host shape, the four lists, scope added, items/create/history open
in Studio).
- Re-pointed, not weakened: every test that pinned `~all` now pins the
Setup page or the Studio item editor, and the retired entry is pinned
absent (`studioMenuModel`, `StudioMenu`,
`StudioPaletteGroups.surfaceScope-36900`, `setupMetadataRedirect`,
`AppContent.setupMetadataStudio-28578`, console
`AppContent.legacyRedirects`, `AppContent.systemHubRoutes`,
`StudioRoute.metadataArea-28561`, `StudioEntryRedirect`,
`HomePage.noAgentsBuildChip-26614`,
`StudioDesignSurface.metadataArea-28561`,
`StudioMetadataArea.routes-28561`, `StudioPackageMenu-37139` (its
`~all/overview` case now lands on Setup, plus an item page the leg still
draws), `StudioDesignSurface.notFound-26708`, `SidebarAppMenu-36112`,
`AppContent.emptyNavigationLanding-12079`,
`AppContent.noAppComponentRoutes` (the zero-app legacy directory alias:
one hop to Setup, then the no-apps empty state that branch renders for
every Setup page; ablated: identity `studioAddressAfterSetupMove` turns
it red), `AppContent.pseudoRouteSegments`), and the live e2e
`declared-sharing-rules-reach-13091` lists from the Setup page.

## Acceptance notes

- The access rule does not widen: the Setup entry and the page both
require `studio.access` on top of Setup's own access, with parity with
the Studio gate pinned by test.
- Sequencing: `studioMenuModel.ts` and `StudioMenu.tsx` are also edited
by objectstack-ai#37454 (PR objectstack-ai#37546); main is merged once after it lands. Whichever of
this PR and objectstack-ai#37564 lands second merges main.

## Verification

Rework round (seat L1 at `4320d105`), pushed on the same branch, no
rebase. Head `0471b08e`; CI result is reported on the PR once green.

- M1: parity with the Studio gate, pinned on each of that gate's own
policy cases (holder, operator, tenant owner, reported empty set, no
reported set), with an ablation that turns the parity tests red.
- S1: full-chain `toEqual([from, to])` restored in both
`AppContent.systemHubRoutes` tables and the `TO_SETUP_DIRECTORY` block
of `AppContent.setupMetadataStudio-28578`.
- S2: both branches tested in `studioMenuModel`, `StudioMenu`,
`StudioMetadataArea.routes-28561` and console
`StudioRoute.metadataArea-28561`; ablating the four `setup.access` reads
turns 12 cases red.
- S3 (delta review): Setup's old catalog aliases (`/apps/*/metadata…`,
`component/metadata/directory`, `system/{positions,roles,permissions}`)
take the same `setup.access` branch, a set never reported counting as
none. Both branches and the no-answer case are pinned in
`setupMetadataRedirect`, `AppContent.setupMetadataStudio-28578`, console
`AppContent.systemHubRoutes` and `AppContent.legacyRedirects`; ablating
the branch (42 cases) or reading it fail-open turns them red.
- N1/N2: the i18n comment and the two doc sentences corrected (only the
`?scope=environment` lists redirect, and only for a user who can open
Setup).
- Unit: all 20 test files this branch touches green. Type-check:
`@object-ui/app-shell`, `@object-ui/console` green. Gates:
`check:test-source-alias`, `check:i18n`, `check:nul-bytes`,
`check:doc-authoring`, `check-affected-docs` green.

Earlier round, at `4320d105`: CI 61 success, 0 failed; derived gates (67
commands) green, full `pnpm build` and `pnpm console:build` green.

- Browser, showcase app booted locally, signed in as the seeded admin,
light and dark (8 screenshots):
- `/apps/setup/component/security/access-directory` shows the directory
of the four types, with **Access Control → Positions and Permissions**
selected in Setup's sidebar.
- `/studio/com.example.showcase/metadata`: the Studio menu's Access
group no longer carries the cross-package entry.
- An old link, `/studio/~all/metadata/position?scope=environment`, lands
on
`/apps/com.objectstack.setup/component/security/access-directory/position?scope=environment`
and lists the 17 positions.
- Follow-up noted, not in this card: the Setup page reuses the
directory's own heading ("All Metadata Types"); a page-specific heading
would read better.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Utp6CZhAqkgRyMYuZeZt9S

<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6CZhAqkgRyMYuZeZt9S -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…il (objectstack-ai#37579)

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgPUWudpC44JvVj61ofRTo8S)_

Fixes objectstack-ai#37456

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:Studio 不再有顶栏。左栏顶部两行:第一行 Studio
标识和收起按钮;第二行「返回应用」和软件包切换器(应用图标、名称,只读带锁,末行「新建软件包」)。变更和发布在「概览 ›
待发布」;组织流程(~org)没有概览,左栏保留一行「变更 N」。「新建应用」按钮去掉。手机宽度顶部一条细栏打开菜单。左栏收起后成窄栏。
- 为什么做:App Studio 改版去掉顶栏(ADR-0084 2026-11-26 修订)。
- 出错会怎样:最坏是某个入口找不到(发布、返回),不丢数据;撤回即恢复。
- 要你做什么:暂无(区域审完后合入)。

## What changes

Two halves on one branch. **Half 1** gives Studio's left column the two
top-left rows the ADR-0084 amendment (`#amendment-2026-11-26-frame`,
`#amendment-2026-11-26-homes`) gives it, built as their own files so
objectstack-ai#37553's split of `StudioDesignSurface.tsx` is not disturbed. **Half 2**
(after objectstack-ai#37454 / PR objectstack-ai#37546 merged; `main` merged once) deletes the top
bar.

### Half 2: the top bar is gone

- **`StudioDesignSurface.tsx`.** The header is deleted with everything
only it used: the create-app button, state and dialog; the Publish
button, its disabled / read-only reasons and the posture state; the
now-unused imports. Each tenant's home, per the amendment's table: way
back → the package row; ⋯ → 概览's header; Changes + Publish → 概览's
Pending tab, with the count as the menu's `studio-menu-overview-pending`
badge; Save / Cancel → the item header; assistant / panel toggle → the
title row's end; menu toggle → Studio's row; Create app → nowhere (the
silent item 5). The changes sheet stays for the ~org scope and now
passes `posture="review"` explicitly. The switcher's pick opens the
package's 概览 (`studioPackageOverviewPath`).
- **`StudioTopLeft.tsx`.** `StudioScopePendingRow`: on the package-less
~org scope, which has no 概览, a "Changes · N" row
(`studio-scope-changes`) under the package row (compact on the rail)
opens the existing sheet and its `doPublish`. `StudioMobileStrip`: below
768 px a strip (`studio-mobile-strip`) holding the menu trigger and
Studio's mark, since the drawer otherwise has no door.
- **`StudioBackToApp.tsx`.** The top bar's `StudioBackToApp` is removed;
`studioBackTarget` and `StudioBackButton` stay.
- **`studio-tokens.ts`.** `STUDIO_HEADER`,
`STUDIO_HEADER_PACKAGE_COLUMN`, `STUDIO_HEADER_WIDE_WORD` removed.
- `StudioRoute.tsx` draws no bar, so it is untouched.

- **Copy repointed (S1).** `engine.studio.newApp.appFailed` now points
to the 应用 row in the package's menu.
`engine.studio.data.draftObjectHint` now points to 概览 › Pending. The
stale "Save in the top bar" strings (the two permission-set notes,
`customize.saveFooter` and `inspector.draftFooter`) now say "page
header" / 「页头」, in both en and zh.
- **Missing-package way back (S2).** `StudioMissingPackageStrip` in
`StudioTopLeft.tsx` is mounted when the package is missing, at every
width. It holds `StudioBackButton` plus Studio's mark and name, in the
place where the bar's way back used to be.

### Half 1: the rows

- **`StudioTopLeft.tsx` (new).** Row 1 (`StudioBrandRow`): Studio's
graphite mark, its name (`engine.studio.mark`, the existing key, which
objectstack-ai#37566 renamed through objectstack-ai#37581 so it now reads App Studio / 应用搭建), the
collapse control. Row 2 (`StudioPackageRow`): the way back, then the
package switcher. Collapsed on desktop, the column is a rail
(`studio-rail-head`): expand control, way back, app logo, stacked.
- **`StudioPackageSwitcher.tsx` (new).** A popover naming the open
package by its app (logo via `AppMark`, label via `navItemLabelText`,
else the package name), with a lock when read-only. The list holds the
openable packages: kernel packages out, `.custom` pairs folded ("with
PAIR"), ~org / ~all not listed; a search box; the current row checked.
Picking a package passes `beforeNavigate` (the unsaved-changes guard)
and opens it. The last row, **New package** (authors only), opens the
existing `CreatePackageDialog` (objectstack-ai#37134) and opens the created package.
The list reloads on `objectui:packages-changed`; a failed read toasts
under the shared `PACKAGE_LIST_TOAST_ID`.
- **`StudioBackToApp.tsx`.** Adds `StudioBackButton`, the chevron-only
way back with the same target as `studioBackTarget`. Its own testid
(`studio-package-back`) so it does not clash with the top bar's
`studio-back-to-app` while both exist.
- **`StudioTitleRowFallback.tsx` (new).** The panel control (and save /
assistant) for a page that draws no title row (loading, not found). It
registers as a title row after the page in document order, so the page's
own title row always wins and this draws only when there is none.
- **`StudioMenu.tsx`.** A `head` slot at the top of the menu header;
`collapsible` moves from `offcanvas` to `icon` (the rail); search and
the advanced toggle hide on the rail; each menu item gets a tooltip,
shown only on the rail.
- **`StudioDesignSurface.tsx`.** Mounts `StudioTopLeft` as the menu's
head and `StudioTitleRowFallback` after the pillars. The top bar's own
menu toggle is removed (the toggle now lives in row 1, so the page never
draws two).
- **i18n.** `engine.studio.pkg.switcher`, `.search`, `.noMatches`,
`.newPackage` (en, zh).

## Tests

**Half 2**
- `StudioDesignSurface.noTopBar-37456.test.tsx` (new, 8 cases) walks
every former tenant at its new home: no top bar (control: the rows are
drawn); the way back first in the package row and the one menu toggle in
Studio's row; the phone strip opens the drawer; a switcher pick lands on
`/studio/X/overview`; ⋯ only in 概览's header; badge → Pending → Publish
POSTs `/api/v1/packages/<id>/publish-drafts`; a read-only Pending has no
Publish; no Create app anywhere.
- `notFound-26708` is re-pointed: in all 4 pillar cases it requires the
way back on the missing-package strip (`studio-package-back`, target
`/home`). The ablation (strip not mounted) turns 4 red.
- `StudioTopLeft-37456.test.tsx`: +2 cases, the ~org Changes row
(expanded and on the rail) and its control (a package scope draws none).
`packageLessFlows-11553` gains the row → sheet path.
- Re-pointed from the bar to the new homes (same claims):
`backToApp-36501`, `graphite-37455`, `rightSlot-12725`,
`desktopHint-11795`, `accessSegment-12452`, `interfacesRetired-36502`,
`copilotDoors`, `copilotDraftBadge`, `itemDraftLine`, `metadataArea`,
`packageListErrorPosture`, `pillarNavGuard`, `StudioPackageMenu-37139`,
`StudioPackageOverview-37454`, `entryReadsOnce-11797`,
`publishBackfill-12929` (badge → embedded panel → open the row),
`customizePublish-28562`, `saveBar-36511`,
`PackageFormDialog.newAppStep-36748`.
- Deleted, because what they pinned no longer exists:
`narrowHeader-12509` (the bar's narrow layout),
`createAppAccessibleName` and the app cases of
`CreateItemDialog.labels-13128` / `createTaken-26917` (Create app is
gone), `publishPosture-12517` and `publishReadOnlyReason-12303` (the
bar's Publish; the Pending tab's read-only posture is pinned in
`noTopBar-37456` and objectstack-ai#37454's suite), `changesCount-11787` (its claim, a
saved draft counts before its own re-read, is held by
`metadataArea-28561`).
- Ablations (each restored, `git diff HEAD` empty): `scopePending` never
passed → 2 red in `packageLessFlows-11553`; the strip returns null → 2
red (`noTopBar`, `desktopHint`); the pick goes to the bare package path
→ 1 red (`noTopBar`).

**Half 1**

- `StudioTopLeft-37456.test.tsx` (new, 11 cases): the two rows and their
order; naming by the app; the lock on a read-only package and its
control (writable: no lock); the list folds a pair and checks the open
package; pick opens a package; re-picking the open one does nothing; a
declined leave keeps the page; search and its empty state; New package
(authors only) opens the create dialog and then the created package; the
package-less scope; the rail; the fallback with and without a page title
row.
- Re-pointed, not weakened: `homeLoop-12513` now asserts the way back is
the first button of the package row and the toggle sits in Studio's row;
`rightSlot-12725` waits for the assistant inside the list's title row
(the fallback holds it while the list loads); the
`PackageFormDialog.newAppStep-36748` door census adds the switcher's New
package door.
- `ui/e2e/studio-left-menu-36899.spec.ts`: re-pointed, not loosened. The
collapsed case pinned the column off the canvas; the amendment's rail
replaces that, so it now asserts a 3rem rail at the left edge with the
content beside it, and still asserts the collapse cookie and the reload.
- Ablations (each restored, `git diff HEAD` empty): the lock condition
forced false, the lock case red; the fallback's `drawn` forced false,
the fallback case red.

<details><summary>Readings</summary>

- Half 2 at 748026a: studio-design, i18n, `__tests__`, StudioRoute,
DraftChangesPanel and newAppStep suites, `Test Files 314 passed`, `Tests
2843 passed`; app-shell `tsconfig.test.json` 0 errors; eslint 0 errors;
derived gates 39/39 exit 0 (`vitest run scripts/` at 2 workers).
- Half 1: `StudioTopLeft-37456`, `homeLoop-12513`, `rightSlot-12725`,
`PackageFormDialog.newAppStep-36748`, the studio-design and i18n suites:
16 test files, all passed. At the head: `StudioTopLeft-37456` `Tests 11
passed (11)`.
- `@object-ui/app-shell` sources and `tsconfig.test.json`: 0 errors;
full workspace build (docs excluded) 123/123 tasks green.
- Derived gate families (`dispatch-gates.mjs --commands`, 39): 37 exit 0
in the batch run; `check:test-source-alias` was red on the new suite (a
clocked first load of `@objectstack/lint` through the create dialog) and
is fixed by a module-top import, now OK; `vitest run scripts/` was
killed by the container's memory limit in the batch and passes alone at
2 workers: `Test Files 172 passed | 2 skipped (174)`.

</details>

## Acceptance notes

- **A gap in ADR-0084's homes table: ~org Changes / Publish.** The table
sends Changes + Publish to 概览's Pending tab, but the package-less
organization-flows scope (~org) has no 概览 (`studioMenuOverviewEntry`
returns null there), so deleting the bar would have left its drafts with
no way to publish. Per the area's call, ~org keeps a "Changes · N" row
in the left column (`StudioScopePendingRow`, within the `StudioTopLeft`
files) that opens the existing sheet and its existing `doPublish`;
nothing new on the server. Pinned by `StudioTopLeft-37456` +
`packageLessFlows-11553` with an ablation, and shot light/dark. S3: the
table gains this row in docs/adr follow-up objectstack-ai#37685.
- **N5:** the read-only reason for keyboard and assistive-tech users is
follow-up objectstack-ai#37687. N1–N4 are accepted as they are.
- **Leftover i18n keys** (`engine.studio.app.*`, `backToApp`, `publish`,
`publishTitle`) are now unreferenced; some were already dead before this
card. Left in place for a sweep, not removed here.
- **Follow-up objectstack-ai#37580:** the list page's New on a read-only package as
disabled-with-tooltip (`ResourceListPage.tsx`, outside this card's
surface).
- **Studio's name** reads the existing `engine.studio.mark` key. objectstack-ai#37566
renamed it to App Studio / 应用搭建 through objectstack-ai#37581, and
`StudioTopLeft-37456` pins the exact name (`/^App Studio$/`).
- **The ~org scope's name in the switcher** is 「组织元数据」 / "Organization
metadata" (a new key, `engine.studio.pkg.orgScope`, en and zh), because
that scope's menu lists more than flows. The maintainer asked for this
in the card thread on 2026-11-26. The menu row keeps 「组织级流程」.
- **Main was merged three times**, each time because of a conflict that
blocked CI or landing (objectstack-ai#37581, objectstack-ai#37542, objectstack-ai#37637, then objectstack-ai#37602). Main's
incoming test assertions are kept wherever they still hold without the
bar. Only the assertions that pinned the bar itself were dropped: the
`studio-back` text and accessible name, `studio-back-app-name`, the
bar's `studio-mark`, and the settle on the bar's Create app button. Two
auto-merged objectstack-ai#37542 pins that anchored on `studio-shell-header` are
re-pointed, not loosened (`graphite-37455` via `studio-top-left`,
`pillarsClaimSlot-12725`).
- `ui/e2e/studio-left-menu-36899.spec.ts` is **re-pointed, not
loosened** (see Tests).
- `ui/e2e/live/studio-customize-journey.spec.ts` is **re-pointed, not
loosened**. Its `publishPair` clicked the deleted top bar's Publish. It
now opens the menu's 概览 badge, publishes the pair in the embedded
`draft-changes-panel`, and still asserts that the pair's
`publish-drafts` POST answers 200 with `published`. The full live lane
passed 23/23 locally.
- Screenshots (Chromium, dsf 2, light and dark, showcase app): no top
bar, switcher open, rail, 概览 Pending, ~org Changes, phone strip and
drawer; with the area beside mockups 1 and 3 (`shots-37456/final/`).

## Verification

Read first, by risk:
1. `StudioDesignSurface.tsx` hunks: what the header held and that each
piece is either rehomed or deliberately gone (Create app); the sheet's
explicit `posture="review"`; `packagePath={studioPackageOverviewPath}`.
2. `StudioScopePendingRow` and `StudioMobileStrip` in
`StudioTopLeft.tsx` (the ~org gap; the phone's only door to the menu).
3. The deleted tests and the reason each claim is gone or held elsewhere
(Tests, half 2).
4. `StudioPackageSwitcher.tsx`: the pick path (`beforeNavigate` before
every navigation, including after create) and the list filter (kernel
out, pairs folded).
5. `StudioMenu.tsx`: `collapsible="icon"` and the `RAIL_HIDDEN` classes
(a missed class leaves a half-drawn control on the rail).
6. `StudioTitleRowFallback.tsx` and its mount point in
`StudioDesignSurface.tsx` (it must stay after the page in document
order).
7. `StudioBackButton` in `StudioBackToApp.tsx` (same target as the top
bar's way back).

## 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; `pnpm lint` passes.
- [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: n/a.
- [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 with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Utp6CYYe7UScDrgUJxx5iP

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ways listed in the menu (objectstack-ai#37599)

<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg2QYE8ncGrwckXw5L9fxrXY)_

repo:objectstack#5 · os-bill · session_01Utp6CbgELiNQU6e7me1RQy

Fixes objectstack-ai#37564

Clause-②: no
Metadata-protocol: none
Container & model: `M`, `mode:thread`, `model: CONTRACT_REVIEW_TIER
(dispatch-gates --tier: MANDATORY docs/adr/**; served at tier, read from
the thread's session record)`, `effort: xhigh (reason: ADR-0084 revision
plus a spec registry value, standing ADR-revision order)`

## 维护者速读

- 用户能看到什么变化:在 Studio
左侧菜单里,「数据集」从「界面」组的「高级」折叠里挪到「数据」组,紧跟在「对象」后面;「岗位」从「高级」折叠里挪到「访问」组,紧跟在「权限集」后面。两项始终显示,软件包里一个都没有也显示。
- 为什么做:属于「Studio 是开发软件包的入口」这一轮菜单整理,落实你 11 月 26 日对架构记录 ADR-0084
的裁定:数据集是图表和 AI 问数共用的语义层,归数据;数据集和岗位都是常用项。记录里的类型归组表同步改成和菜单一致。
-
出错会怎样:只影响这两类在菜单、类型目录里的位置和分组徽标,数据集本身的读写、图表、问数都不受影响,可以直接撤回。有一个对外可见的值变了:类型列表接口里数据集的归组由「界面」变成「数据」,按归组挑数据集的外部代码要跟着改。
- 要你做什么:批准并合入(改了架构记录,属于受管文件,需要 os-zhuang 和 hotlong 批准)。没有需要你裁定的问题。

## What changes

Nine files, +192 / −34 against `main` (merge base `9a65a48f`: `main` has
been merged in twice, each time for a neighbour that landed; head
`d2c2cb98`). This PR carries out ADR-0084's [Amendment (2026-11-26),
"Placements, and what moves to
Setup"](https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0084-application-builder-information-architecture.md#amendment-2026-11-26-moves)
for two rows, `dataset` and `position`, and decides nothing.

| Where | What changes |
|---|---|
| `packages/spec/src/kernel/metadata-plugin.zod.ts` | One value: the
`dataset` row of `DEFAULT_METADATA_TYPE_REGISTRY` reads `domain:
'data'`; it was `'ui'`. A comment above the row says why. The row keeps
its place in the block and its `loadOrder` (55). |
| `ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.ts`
| `dataset` and `position` move into the common rows, **by name**:
`dataset` directly after `object`, `position` directly after
`permission`. Each row carries its reason in a comment: a dataset's
schema requires one object, and a position is one slot per name in the
environment (ADR-0150 D7), so the rule's tests alone would sort each of
them advanced. Twelve common rows, twenty advanced. |
| `docs/adr/0084-application-builder-information-architecture.md` | The
type-to-group table: `dataset` is row 2 of 数据 Data, tier 常用, and the
five data types behind it are each one place later; its 界面 UI row is
gone; `position` keeps its place and its tier reads 常用. One note under
the table and one dated mark on the amendment's "not redrawn today"
paragraph say the two rows are rewritten and that `datasource` and
`form` still wait for their own changes. Nit N8 of the contract record
on PR objectstack-ai#37470: the 2026-11-24 top note's 2026-11-26 mark now links
`#amendment-2026-11-26-position`. Still 32 rows of the pinned shape, in
one table. |
| Four test files under `ui/packages/app-shell/src/views/studio-design/`
and `packages/spec/src/kernel/metadata-plugin.test.ts` | The pins,
below. |
| `.changeset/37564-dataset-data-domain-common-tier.md` |
`@objectstack/spec` patch, `@object-ui/app-shell` patch. |

**What follows from the registry value, with no edit.** The menu, the
type directory and the type page's group badge read the served `domain`,
so all three show datasets under 数据 Data. `studioMenuModel.ts` and
`StudioMenu.tsx` are not touched: the model reads the placement list and
needs no special case.

**A served value changes.** `GET /api/v1/meta/types` answers `domain:
"data"` for the `dataset` entry, and the listing is ordered by domain
and then by type, so the entry now sits first among the data types. Read
on a live showcase backend built from this branch: `data:dataset
data:field data:hook data:mapping data:object …`. Code that finds the
entry by `type` sees no difference. The changeset says this in the
release note.

**Why `Clause-②: no` and `Metadata-protocol: none`.** No accepted set
widens or narrows: the `domain` enum keeps its six values, no author
writes the registry, and a `*.dataset.ts` item validates and loads as it
did. No export, key or type is added, and the constant's declared type
is the same. `pnpm --filter @objectstack/spec check:generated` reads
"All 14 generated artifacts are up to date", so neither the API surface
nor the authorable surface moved.

**Not touched, as the card says.** The `datasource` row, and `form`
(ADR-0159): `form` is not registered at this base, so it has no row. The
`typescript-serializer.ts` entry that maps `dataset` to `['Dataset',
'ui']` is the spec subpath the schema is imported from, not the domain;
the schema still lives in `ui/dataset.zod.ts`.

**Read first**, by risk:

1. `packages/spec/src/kernel/metadata-plugin.zod.ts`, the one-value hunk
on the `dataset` row: it changes a served value.
2. `docs/adr/0084-application-builder-information-architecture.md`, the
table hunk: governed text, and the order of the 数据 Data rows is what the
pin test compares to the placement list.
3.
`ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.ts`,
the two rows that move into the common block.

**Two-minute verification**: after `pnpm --filter @objectstack/spec
build`, run `pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts`
and expect `Tests 17 passed (17)`. It reads the registry, the placement
list and ADR-0084's table, and fails if any two of the three disagree.

## Tests

- `packages/spec/src/kernel/metadata-plugin.test.ts`: a new case pins
`dataset` under `data`, `dashboard` and `report` under `ui`, and the
six-value domain set. 41 of 41.
- `studioMenuPlacement.test.ts`: the literal lists (twelve common,
twenty advanced), a case for the two placements by name, and a new block
that reads the three groups this change touches as ADR-0084 lists them.
The existing block that compares the list with the ADR's Order and Tier
columns, row by row, passes against the rewritten rows. 17 of 17.
- `studioMenuModel.test.ts` and `StudioMenu.test.tsx`: the served
fixture gains `dataset` under `data`; the common tier, the always-listed
set and the fold are pinned with both types above the fold; a new block
in `StudioMenu.test.tsx` asserts that 数据 draws object then dataset, 访问
draws permission then position, neither is inside the fold, and each
links to its type page on an empty package, with a control (`hook` stays
in the fold).
- `StudioPaletteGroups.surfaceScope-36900.test.tsx`: the command palette
draws the menu's entries, so `position` now follows `permission` there
and its list is read. Two expectations, test only.
- The four UI files together: 92 of 92 on `c2e09545`. On the merged head
`2762c831` the affected run (every test file that reads the placement
list, the directory grouping or the package overview) is 85 files, 730
tests, all passed, and the spec pin is 41 of 41. After the second merge,
on `d2c2cb98`: the same selection is 85 files, 747 tests, all passed
(the 17 tests more are `main`'s), and the spec pin is 41 of 41.

**Reverse verification**, read on `c2e09545` (neither merge changes the
registry row, the placement list, or a line this PR adds to or removes
from these pins), each mutation made with `scripts/ablation-replace.mjs`
on a committed tree and restored to `HEAD` (blob equal to `HEAD`, `git
diff HEAD` empty after each):

| Mutation | Reading |
|---|---|
| Registry: `dataset` back to `domain: 'ui'`, spec rebuilt, `dist` read
back as `ui` | spec pin: 1 failed, 40 passed.
`studioMenuPlacement.test.ts`: 5 failed, 12 passed (the ADR's group
against the served domain, the order inside the group, and the new group
block). |
| Placement list: `position` back to `advanced` | 14 failed, 78 passed,
in all four UI files. |
| Placement list: `dataset` back to `advanced` | 12 failed, 80 passed,
in three UI files. The palette file stays green: its fixture serves no
dataset. |

After the registry leg the package was rebuilt from the restored source
and `scripts/ablation-dist-preflight.mjs … --absent` read the marker
gone from all 614 built files; both pins passed again (41 of 41, 17 of
17).

## Acceptance notes

- **The card's acceptance, line by line.** The menu draws dataset under
数据 directly after 对象, and position under 访问 directly after 权限集, both
outside the 高级 fold: read off a live Console on the showcase package in
zh-CN, light and dark (`数据: 对象 24 · 数据集 4`, `访问: 权限集 9 · 岗位 10`; the
opened fold lists 18 entries and neither of the two). The dataset page's
group badge reads 数据. The pin test is green against the rewritten rows.
A spec test covers the registry value.
- **Screenshots.** Eight PNGs, light and dark: the dataset list with the
menu, the menu alone, the menu with the fold opened, and the position
list. They are in the project's shared files under
`objectstack-seat5/topic-37424/cards/shots-37564/` and attached in the
project thread; the relay cannot upload images to a PR.
- **One test outside the two the claim named.** The affected-test run
named `StudioPaletteGroups.surfaceScope-36900.test.tsx`, which pins the
entries a package always lists. The area confirmed it is inside the
claim's class before the edit was pushed.
- **The claim was posted by the area**, not by this thread (comment
7193675575 on the card). The dispatch order asked the thread to write
it; `os-dev.md` says a dispatched executor writes no claim and no
assignee, and that file wins over an order.
- **Neighbours.** `main` has been merged into this branch twice, each
time because a neighbour landed in a shared test file.
- First, at `4e10d4bf`, after PR objectstack-ai#37546 (card objectstack-ai#37454) landed at 16:13Z.
One conflict, in `StudioMenu.test.tsx`: `main` asserts that the overview
row leads the menu, and this branch's list of common types holds
`dataset` and `position`; both are kept.
- Second, at `9a65a48f`, after PR objectstack-ai#37602 (card objectstack-ai#37565) landed and the
merge queue removed this PR at 19:13Z for a merge conflict. One
conflict, in `studioMenuModel.test.ts`, on two adjacent lines of one
test: `main` builds the environment's menu with the Setup directory, and
this branch's comment on the next line no longer calls `position` an
advanced type. `main`'s call and this branch's comment are kept.
`StudioMenu.test.tsx` and the palette test merged without a conflict.
- PR objectstack-ai#37422 shares the registry file; `overlap-check.mjs` reads it as
merging cleanly with this head.
- **Contract record.** Comment 7196507657 on this PR reads PASS on
`c2e09545`, and the delta record 7198537944 reads PASS on `2762c831`,
each with no must-fix and no should-fix. Nit N1 is closed (the mark on
the "not redrawn today" paragraph opens with its date); N2 stays as the
accepted deviation the record names. Since the delta record, the lines
this PR adds and removes against its merge base are byte-identical in
all nine files (`git diff 4e10d4b 2762c83` against `git diff 9a65a48
d2c2cb9`, per file, added and removed lines only): the second merge
changed only what `main` brought.
- **Tier H by path.** `docs/adr/**` (AGENTS.md Prime Directive objectstack-ai#14):
approvers os-zhuang and hotlong, and the maintainer merges. The PR stays
a draft. The `Rule-change` line is left out, as the template asks for a
diff that does not touch `.claude/**`.
- **No docs page is owed.** No page under `content/docs/`, no skill and
no README places `dataset` in a Studio group or describes the menu's
tiers. The Docs Drift Check lists three pages that name
`DEFAULT_METADATA_TYPE_REGISTRY` (`concepts/metadata-lifecycle.mdx`,
`plugins/adding-a-metadata-type.mdx`, `protocol/objectui/concept.mdx`);
each was re-read, and none states `dataset`'s domain.

## Verification

- Head `d2c2cb98`: six commits on the branch, of which two are merges of
`main` (at `4e10d4bf` and at `9a65a48f`) and one dates the mark. No
message names a card.
- Gate list derived on `d2c2cb98`: `node scripts/pm/dispatch-gates.mjs
--commands` prints 98 commands, line for line the 98 derived on the two
earlier heads.
- All 98 exited 0 on `d2c2cb98`, each exit code captured before any
pipe, after `pnpm install --frozen-lockfile` and a full rebuild of the
merged tree (123 of 123 tasks, none cached). `--ran` reconciliation: `98
derived famil(ies) accounted for — 98 run, 0 NOT-MEASURED`.
- The same list was 98 of 98 on `2762c831` (after the first merge) and
on `c2e09545`. Two reds of the very first pass were the container, not
the diff, and each passed when run again alone:
`check-plugin-teardown-shape.mjs --self-test` needs a pinned fixture
commit that a shallow clone lacks; `pnpm --dir ui exec vitest run
scripts/` was killed by the container's memory limit while another test
run shared the box.
- Tests on `d2c2cb98` under the verify lock: spec pin 41 of 41; affected
UI run 85 files, 747 tests, all passed. On `2762c831`: 85 files, 730
tests, all passed. On `c2e09545`: 82 files, 664 tests; 662 passed on the
first run and the 2 that failed were the palette expectations above,
fixed in that head.
- Type checks were run locally on `c2e09545` (`pnpm --filter
@objectstack/spec run typecheck`, `pnpm --filter @object-ui/app-shell
run type-check`, `eslint` on the seven changed source and test files,
`pnpm --dir ui run check:new-line-citations`: each exit 0). They were
not run again locally on either merged head; the type-check lanes are
this PR's check-runs. The three reverse verifications were not run again
either, for the reason given above them.
- `overlap-check.mjs` on `d2c2cb98`: clean against `origin/main`
`1dbf19a1` and the one open PR head that shares a file.
- `dispatch-gates --tier`: `docs/adr/**` is the mandatory contract tier;
changed lines 226 against the human-merge threshold 3000: under.
- `check-prior-rulings --paths` on the ADR, the registry file and the
placement list (read on `c2e09545`; neither merge changed the ADR): the
2026-11-24, 2026-11-25 and 2026-11-26 amendments of ADR-0084 are the
rulings in force; this PR changes no decision of any of them.
- CI was green on `c2e09545` and on `2762c831` (72 check-runs: 60
success, 12 skipped, none failed). CI on `d2c2cb98` is this PR's
check-runs; the third report on the card cites them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Utp6CbgELiNQU6e7me1RQy

<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6CbgELiNQU6e7me1RQy -->

---------

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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants