Repository navigation
feat(console): the design mode is entered from the app-name menu; the page header drops Edit app and Open in Studio (#36485) - #36621
Conversation
…he page header drops Edit app and Open in Studio Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
…eset Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
…sign-entry-app-menu
|
repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm Flake reading — PR #36621 @ f7d907a · 2026-11-23T04:18Z
|
|
repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm 席位核对ACCEPT — PR #36621 @ f7d907a (head of record, full sha on the PR) · card #36485 · L1 first read by area s2-B (area order rule 9) · 2026-11-23T04:36Z · no contract review owed (
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45112953275 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
…the design mode (objectstack-ai#36366) (objectstack-ai#36629) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9XUZ1viPwnt3ZWuPpxejiN3)_ Fixes objectstack-ai#36366 Clause-②: yes (widening) Metadata-protocol: added Skills-docs: follow-up objectstack-ai#36630 ADR notes: carrier objectstack-ai#36086 (seat posts them) ## 维护者速读 - 管理员在设计模式里点页头最右边的「页头按钮」,能把列表页和记录页的动作分成「固定」(最多三个,可拖动排序)和「更多」(也可排序),保存后所有成员看到的页头都跟着变;记录页的设置同样作用于侧边预览和手机底栏。 - 属于「运行界面的设计模式」专题,解决按钮多时挤掉记录名、管理员又改不了页头的问题。 - 设置错了,管理员在同一面板里改回或取消即可;对象不写这项设置时,页头和今天完全一样。 - 无。 ## What changes `actionLayout` is a new optional key on `ObjectSchema` and `ObjectExtensionSchema`, in the format of the maintainer's ruling (2026-11-22T14:50Z, quoted in release 7087101113: 「objectstack-ai#36366 改成"列表"和"记录"两组,每组分"固定"和"更多"两段,等 objectstack-ai#36363 合并后,卡标记为p1,剩余任务放回队列」) and seat rulings 7077698148 / 7080672229: `actionLayout: { list?: Arm, record?: Arm }`, `Arm = { pinned: string[] (at most 3, required, may be []), more?: string[] }`. - **spec** (`packages/spec/src/data/object-action-layout.ts`): the shape and its refusals at every door (more than three pinned, a name twice in one part or across both, a malformed name, a built-in the scope does not have), each with a named reason; the object form offers one JSON row per arm under Advanced. Generated artifacts regenerated (api-surface, export-origins, authorable-surface, dropped-refinements counts, references); liveness row `object/actionLayout` is `live`, drilled into `list` / `record` and each into `pinned` / `more`, citing the record header, the list header, the fold and the design mode. - **objectql + metadata-protocol (patch round 2, M1)**: `actionLayout` is the third key of `CUSTOM_ARRANGEMENT_KEYS`, beside `fieldGroups` and `relatedLists` (ADR-0146 D10). Only the base's paired `.custom` package writes it on an `object_extension`; the one judge `judgeExtensionArrangement` refuses any other package's, each door in its own way: publish, restore and draft promotion answer `VALIDATION_ERROR` / 400; marketplace install refuses the package body with `VALIDATION_ERROR` / 422; `os validate` and `os build` exit non-zero and print the row; the registry fold skips the key and leaves a note. The registry applies the pair's arms last, in `applyCustomArrangement`, by role, arm by arm. A manifest's `objectExtensions` entry now carries the key to the fold (`objectExtensionContribution` dropped it). - **lint**: `validateObjectActionLayout` refuses, in `os validate` / `os build` / `os lint`, a name in either part that is no action of the object or is not placed in the scope its arm arranges. - **`@object-ui/types`**: `arrangedHeaderActions(actions, arm, scope)`, the one reader; `pinned` become buttons in pin order, the names `more` gives lead the overflow in that order, unnamed ones follow in their default order. - **console**: the synthesized record header (record page, the side preview's embedded mount, the phone's bottom bar) and an authored `page:header` with `placedActions: true` read `actionLayout.record`; the list header reads `actionLayout.list` with `$import` / `$export`. Under the design mode, 「Header buttons」 at the end of the header opens a two-part panel (「Pinned to header」 at most 3, 「Other」 = More), both parts draggable, a dot moving an action between them, a fourth pin refused with a toast; the mode's Save writes the object's own package when writable, else the installed object's customization package's `object_extension`, through the one writer of an installed object's arrangement, `saveObjectExtensionArrangement` (patch round 3). - **i18n**: `designMode.pins.*` in every hand-written locale, including the new `designMode.pins.stale` (names the arm sets that the scope no longer offers); zh-Hant regenerated. Object-form translations for the two arm rows in all 11 metadata-forms locales. ### 待审假设 (assumptions for review, shown to the maintainer, not ruled) 1. The key name `actionLayout`. 2. The `record` arm is a scope, not a page: the record header, the side preview and the phone bottom bar all read it. 3. An action the scope places that neither part names goes to the end of More, in its default order. 4. A hidden pinned action leaves its slot empty; no other action takes its place. 5. No arm (or no key) = today's drawing, exactly. 6. Among built-ins, only the list scope's `$import` / `$export` can be named, and only in `pinned`: one in `more` is refused with its reason (not pinned, the page still draws its own Import / Export menu). The record scope has none. 7. Only the base's paired `.custom` package writes `actionLayout` on an `object_extension`. Each arm it writes replaces the served arm for that scope whole, after every other layer (a tenant's arm for the same scope included); an arm it leaves out stays. 8. A `page:header` authored with its own `actions` list keeps that list; the design mode offers it no 「Header buttons」. 9. Save refuses: more than 3 pinned, a name in both parts, an unknown name, an action of the other scope (the last two at `os validate` and in the design mode's Save; see Acceptance notes for the server door). 10. Names the arm sets that the scope no longer offers are listed in the panel as left out and skipped by the reader. 11. With no list arm, the panel says "No button is pinned: every action is in More." while the bar end shows the page's Import / Export menu (`Import ▾`), and 「Other」 lists Import: for a built-in, 「Other」 means "in the page's Import / Export entries". The wording is kept as is. Out of scope: objectstack-ai#36494 (row menu and right-click), objectstack-ai#36495 (the `locations` vocabulary), objectstack-ai#36496 (the `selection` arm). ### Tests changed because the surface grew (named, each recounted by measurement, not by hand) - `packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts`: `object` 51 → 52. - `packages/platform-objects/src/apps/translations/object-collapsed-sections-echo-decisions.test.ts`: leaves 119 → 125, `advanced` 106 → 112. - `packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts`: positive control 760 → 763. - `ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts`: paired spans 127 → 131 and 127 / 127 / 0 → 131 / 131 / 0 (main's 127 after objectstack-ai#36370, measured again after the merge). - `ui/packages/app-shell/src/layout/__tests__/designModeHeaderPinsSave-36366.test.ts`: its `input` helper now types the pins as `ObjectPins` (the type-check read the old `string[]` shape as nine TS2353). - The CLI transcripts in `content/docs/deployment/cli.mdx`, `deployment/validating-metadata.mdx`, `getting-started/build-with-claude-code.mdx` and `ui/react-pages.mdx`: author-time rules 76 → 77, as `check:docs-transcript-drift` derives. - `packages/spec/src/compose-stacks-merge-collection-refusal.test.ts`, `packages/spec/src/compose-stacks-merge-config-object-refusal.test.ts`: `actionLayout` added to the config-object key list. ## Tests **Patch round 3, head `8a85482aea`** (L2 delta S5, N4, N5; S1 waits on objectstack-ai#36635 and is untouched). - **Merge**: `origin/main` `6e643cc43e` merged in `d871e26fdb` with no conflict (it brings objectstack-ai#36624's one writer and objectstack-ai#36621's app-menu entry). `origin/main` `9c283a11bf` still merges cleanly. - **S5, the L2-preferred route**: the installed-object branch of `saveObjectPins` now calls `saveObjectExtensionArrangement`, handing it only the composed `actionLayout`. That module's patch type is `{ [K in CustomArrangementKey]?: ExtensionArrangementValue... }`, a list for `fieldGroups` / `relatedLists` and `ObjectActionLayout` for `actionLayout`; its docblock names the header buttons as a caller. The writable-package branch, which writes the object itself, is unchanged. S3 holds: the composed value is the arms the stored extension holds with each changed arm replaced. New `designMode.pins.pairNotWritable` in the 11 locales (zh-Hant regenerated). - **Pins** (`designModeHeaderPinsSave-36366.test.ts`, 13 tests): a pair the server answers not writable is refused after the ensure call and before any read or write; through the one writer the stored `relatedLists`, `fieldGroups` and held list arm are kept and the publish announces itself; the S3 pins and the call-order pins (now ensure, get, layered, save, publish) pass. Ablation: composing over no stored `actionLayout` turned 2 red (the S3 held-arm pin and the S5 kept-keys pin), restored blob equals HEAD's. - **Docs and wording**: `actions.mdx` now reaches 「Header buttons」 through the app name at the top of the sidebar, then 「Edit app」. Changeset: `[]` pins none; the spec bullet names the built-in refusal in `more`; each door's own answer. `object.zod.ts`: the `actions` guidance and the comment above `membershipKeys` name `actionLayout` as a pair-only key beside `fieldGroups` and `relatedLists`. - **Reruns**, all exit 0: closure build; `check:generated` (no drift); ui 16 files plus `packages/i18n/` (122 files / 2134 passed, 13 skipped); spec 101 files naming `ObjectExtensionSchema` or the guidance (6725 passed); spec typecheck; app-shell, components and i18n type-check; 23 gate families (i18n, docs, changeset, liveness, facade, nul-bytes and others). Lines in the seat file. **Patch round 2, head `49a31750bc`** (L2 review M1, S2, S3, S4; the ADR-0085 §2 sentence and objectstack-ai#36086 untouched). No merge: `origin/main` `d7411fa373` merges cleanly. - **M1, chosen semantics: per-arm replacement, the pair only, applied last.** Measured first: every door already reads `CUSTOM_ARRANGEMENT_KEYS` through the one judge, so the mechanism applies as is. The five doors and where they call it: 1. publish, restore and draft promotion of an `object_extension`: `objectExtensionItemRefusal` in `packages/metadata-protocol/src/protocol-object-extension-item.ts`; 2. `os validate`: `packages/cli/src/commands/validate.ts`; 3. `os build`: `packages/cli/src/commands/compile.ts` (both CLI doors through `packages/cli/src/utils/extension-arrangement.ts`); 4. marketplace install: `packages/cloud-connection/src/marketplace-install-local-plugin.ts`; 5. the registry fold: `applyCustomArrangement` in `packages/objectql/src/registry-custom-arrangement.ts`, run last in `foldExtendersOntoDefinition`, skips a non-pair package's key and names it in a warning. The round-1 priority fold (`foldExtensionActionLayout`, `actionLayout` in `OBJECT_FOLD_SCALAR_KEYS`) is removed; `registry.ts` is back at main's 6426 lines. - **Pins replacing "partner 250 beats pair 150"**: a partner's `object_extension` save with `actionLayout` answers `VALIDATION_ERROR` / 400, one issue at `actionLayout`, nothing stored or served, the pair's save served (`packages/objectql/src/protocol-custom-arrangement.test.ts`); in the registry, partner at 250 against the pair at 150, and a partner registered after the pair, both serve the pair's arm (`registry-extension-action-layout.test.ts`); the judge names the path and prescribes the action's own `locations` and `order` (`protocol-extension-arrangement.test.ts`). - **S2**: `actionLayout` no longer yields to a tenant: the pair applies last, per arm, so a tenant's arm for another scope stays and the pair's arm wins for its own scope (two pins). - **S3**: the design-mode Save writes only the arms whose staged value differs from the served one, merged into the arms the document already holds; nothing changed means no call (three pins). - **S4**: chosen to refuse: the schema refuses a `$` built-in in `more` with its reason, the Save never writes one there, and the `pinned` describe, the form help (11 locales) and the docs say the list page still draws its own Import / Export menu; the `more: ['$import']` examples are gone. - Reruns, all `command-exit 0`: spec test 974 / 29634 and typecheck; metadata-protocol test 365 passed, 9 skipped; objectql test 634 / 14360; lint 228 / 9474; platform-objects 125 / 2126; typecheck of metadata-protocol, objectql, lint, cli; cli unit extension-arrangement files 3 / 48; cloud-connection install arrangement 1 / 5; ui 36366 files 6 / 59; `@object-ui/app-shell` type-check; `check:generated --fix` regenerated `content/docs/references/**` and rechecked green. Gate families this round's files touch: 25 run, exit 0; `check:i18n-coverage` exit 3, PREREQUISITE NOT MET (example apps unbuilt), NOT MEASURED locally, CI runs it. Lines in the seat file `objectstack-seat2/36366-gates-ran.txt`. - **Ablation, the per-arm fold**: `ablation-replace.mjs` replaced `layout = { ...(layout ?? running), [scope]` with `{}` as the base (blob `67155de2c30c` → `6f6b1a29855b`); 2 failed / 11 passed (arm by arm; the S2 tenant arm kept); restored blob equals HEAD's, `git diff HEAD` empty. - **Files beyond the claim (round 2)**: `packages/spec/src/data/field-customization.ts`, `packages/spec/src/data/object-extension-arrangement.test.ts`, `packages/metadata-protocol/src/protocol-extension-arrangement.ts` and its test, `packages/objectql/src/registry-custom-arrangement.ts`, `packages/objectql/src/engine-registration.ts`, `packages/objectql/src/protocol-custom-arrangement.test.ts`, `packages/cli/src/utils/extension-arrangement.ts` (comment only). **Patch round 1, head `6303c52011`.** The branch was merged with `origin/main` at `4ef1ea9779` (objectstack-ai#36612 landed) in `ebd99fe0dd`, then the changeset's Skills-docs line was changed. Only the families that merge touched were rerun, all exit 0: - ui i18n tests: 106 files / 1978 tests. - The 268 app-shell files below: 2294 tests. - platform-objects tests: 125 / 2126. - `@object-ui/app-shell` and `@object-ui/i18n` type-check. - `check:i18n` and `check:i18n-stale-fill`. - `gen:zh-hant` (no diff). - The four changeset gates. All of the following ran at head `564840dc1b`, the final commit of round 1, after the merge of `origin/main` at `ceaa70efcc`. Every heavy run went through `os-verify-lock.sh`; each line quotes its `VERDICT`. | Package | Command | Result | |---|---|---| | `@objectstack/spec` | `test` | 881 files / 28066 tests passed (`command-exit 0`) | | `@objectstack/spec` | `typecheck` | `command-exit 0` | | `@objectstack/objectql` | `test` | 634 / 14356 passed (`command-exit 0`) | | `@objectstack/objectql` | `typecheck` | `command-exit 0` | | `@objectstack/lint` | `test` | 228 / 9474 passed (`command-exit 0`) | | `@objectstack/lint` | `typecheck` | `command-exit 0` | | `@objectstack/metadata-core` | `test` | 27 / 1056 passed (`command-exit 0`) | | `@objectstack/metadata-core` | `typecheck` | `command-exit 0` | | `@objectstack/metadata-protocol` | the changed pin file | 18/18 passed | | `@objectstack/metadata-protocol` | `typecheck` | `command-exit 0` | | `@objectstack/platform-objects` | `test` | 125 / 2126 passed (`command-exit 0`) | | `@objectstack/platform-objects` | `typecheck` | `command-exit 0` | | `@object-ui/types` | tests | 390 / 10512 passed | | `@object-ui/types` | `type-check` | `command-exit 0` | | `@object-ui/components` | tests | 507 passed, 1 skipped / 4940 passed (`command-exit 0`) | | `@object-ui/components` | `type-check` | `command-exit 0` | | `@object-ui/i18n` | tests | 106 / 1978 passed (`command-exit 0`) | | `@object-ui/i18n` | `type-check` | `command-exit 0` | | `@object-ui/app-shell` | `type-check` | `command-exit 0` | | `@object-ui/app-shell` | tests (narrowed, see below) | 268 / 2294 passed (`command-exit 0`) | **The app-shell tests at the final head are narrowed, and this is declared.** - What ran: the 268 test files that name `RecordDetailView`, `objectViewPageHeader`, the design-mode header pins or `PageHeaderActions`, or whose names match those modules, objectstack-ai#36499's record tabs, or this card. - Why not `vitest related`: it ran out of heap at 4 GB. - The full app-shell suite last ran at `72ec1b2a2`, before the merge: 2416 files passed, 1 skipped / 22791 tests (`command-exit 0`, the lock held for 5634 s). CI runs the whole suite. **Found and fixed in this round:** `@object-ui/app-shell` `type-check` was red with nine TS2353 errors. The save test's `input` helper still typed the pins as a record of string arrays. vitest does not type-check, so the tests stayed green. Fixed in `649fc028b6`. <details><summary>Ablation (one reading): the More order</summary> - Target: `arrangedHeaderActions` in `ui/packages/types`, the line that ranks a `more`-named action. - Mutation: `scripts/ablation-replace.mjs` replaced `const moreAt = name && !seen.has(name) ? moreRank.get(name) : undefined;` with `undefined`. The anchor count went 1 → 0 and the blob changed `33d1f1de663b` → `2af6af57c9fb`. - `@object-ui/types` is aliased to `src` in `ui/vitest.config.mts`, so no build was needed. - Mutated run: 3 failed / 46 passed. All three `more`-order tests went red: the side preview and the authored `page:header` in `RecordDetailView.actionLayout-36366.test.tsx`, and the list toolbar in `objectViewPageHeader.actionLayout-36366.test.tsx`. Their controls without `more` stayed green. - Restore: `git checkout HEAD --`. The blob after restore read `33d1f1de663b` (HEAD's), and `git diff HEAD` was empty. </details> <details><summary>Gates: dispatch-gates at 564840d</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 130 families. All 130 ran, one line each (`command :: exit N`) in the seat file `objectstack-seat2/36366-gates-ran.txt`. - `--ran` reconciliation: "130 derived, 130 run, 0 NOT-MEASURED, 0 UNRUN". - Two families first exited 3 (PREREQUISITE NOT MET: the client and workspace dists were unbuilt): `check:skill-examples` and `check:dual-build-cjs-loads`. Both read 0 at the same head after the client and ui closure builds. - Found red in this round, and fixed: - `check:facade-delegation-only` (registry.ts at 6433 lines against a ceiling of 6426) now reads 6426. - `check:docs-transcript-drift` (four transcripts quoted 76) now reads 77. - Local-only families: - `check:skill-frame-freshness`: exit 0. - `check:dev-prereqs`: exit 1, "The workspace is not built". Some workspace packages have no `dist` on this box. That is a machine-state reading, not about this diff. </details> ## Acceptance notes - **Server save door.** It refuses only a malformed arrangement. Live reading on the CRM example (dev server, admin): `PUT /api/v1/meta/object_extension/crm_opportunity?package=com.example.crm.custom` with `actionLayout.list.pinned` naming 4 actions answered `422` `INVALID_METADATA`. The message read: "`actionLayout.list.pinned` names 4 actions; at most 3 are drawn as buttons, and every other action goes to 「More」. Keep the first 3 and move the rest to `more`." - A name that is no action of the object, or one not placed in the arm's scope, is refused only by `os validate` / `os build` / `os lint` (`object-action-layout-unknown` / `-not-placed`) and by the design mode's Save. - The lint rule is CLI only: the runtime snapshot carries no stack `actions`, so an action bound by `objectName` would read as unknown there. - **Door-level code+status.** The schema refusals are pinned in `packages/spec` (`object-action-layout.test.ts`); the door's `INVALID_METADATA` / 422 is the live reading above. Since patch round 2 the writer refusal is pinned at the save door with `VALIDATION_ERROR` / 400 (`protocol-custom-arrangement.test.ts`). - **`registry.ts` is a facade at its line ceiling.** Since patch round 2 the fold lives in `registry-custom-arrangement.ts`, and `registry.ts` differs from main only in one docblock line (6426, the ceiling not raised). - **The CLI transcripts count 77 author-time rules.** The new lint rule is the 77th. `check:docs-transcript-drift` derives 77 for `validate` and `build`, and four transcripts that quoted 76 now say 77: `deployment/cli.mdx`, `deployment/validating-metadata.mdx`, `getting-started/build-with-claude-code.mdx`, `ui/react-pages.mdx`. - **Live-run wording.** With no list arm, the panel's sentence and the bar's `Import ▾` menu: kept as is, listed as 待审假设 11. - **Export was not offered on the CRM opportunity list in the live run** (that view has no export door), so the run pinned Import. The record scope was not run live: `crm_opportunity` declares no actions of its own. The record header, the side preview and the phone bar are covered by the unit tests below. - **Merged with main, conflicts kept both sides.** - objectstack-ai#36583 (now on main): `designMode.recordTabs` and this PR's `designMode.pins` are both kept in the 11 locales. - objectstack-ai#36411 (now on main): `de-quote-pairing-3876.test.ts` recounted by running it, 131. - objectstack-ai#36612 (now on main): `ObjectViewPageBarActions` reads its Object settings path, then this PR's list arm. `exportDoor` is `exportPinned ? undefined : barEnd?.exportDoor`, and `moreShown` is `!!objectSettingsPath || !!description || !!listFavorite || (ioInMore && (importInMenus || !!exportDoor))`. - **Overlap with open PRs** (`overlap-check --branch=HEAD` at `ebd99fe0dd`, exit 1): - objectstack-ai#36606 conflicts in `de-quote-pairing-3876.test.ts`. - objectstack-ai#36525 conflicts in `protocol.meta-types-degenerate-derivation.test.ts` and `object-lifecycle-panel-echo-decisions.test.ts`. - Whichever lands second recounts. objectstack-ai#36624, objectstack-ai#36587, objectstack-ai#36386 and origin/main merge cleanly. - **Landing class.** The diff changes more than 3,000 lines, so under AGENTS.md §7(c) it lands like Tier H. - **Owed outside this PR.** The ADR-0085 §2 and ADR-0146 D10 notes (`carrier: objectstack-ai#36086`), and `skills/objectstack-ui/rules/actions.md` (objectstack-ai#36630). - **Follow-up, outside this diff (N5).** The door comments in `packages/cli/src/commands/compile.ts`, `packages/cloud-connection/src/marketplace-install-local-plugin.ts` and `packages/metadata-protocol/src/protocol-object-extension-item.ts` (step 8) still name only `fieldGroups`, `relatedLists` and `place`; the code reads `CUSTOM_ARRANGEMENT_KEYS` and already refuses `actionLayout`. Comment-only, carrier: the seat. ## Verification - One command (expect 3 files, all green): `pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/objectViewPageHeader.actionLayout-36366.test.tsx packages/app-shell/src/views/RecordDetailView.actionLayout-36366.test.tsx packages/app-shell/src/views/RecordDetailView.phoneFace-27058.test.tsx` - One click: run the CRM example, open Opportunities, click the app name at the top of the sidebar, then **Edit app** in its menu, then **Header buttons** at the end of the bar. Click the dot beside Import and press **Save**. Outside the design mode the bar shows a plain **Import** button where `Import ▾` was. - Live-run screenshots (seat files, `objectstack-seat2/36366-shots/`): - `1-list-header-before.png`: the bar with `Import ▾`. - `2-panel-before.png`: the panel, 0/3 pinned, Import in 「Other」. - `3-panel-import-pinned.png`: 1/3, Import pinned. - `5-list-header-after.png`: the bar with an Import button. - `6-server-door-422.txt`: the door's 422 reading. https://claude.ai/code/session_01ADHkmQwVVCVuN69B7ThYrP 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#2 · os-steve · session_01ADHkmQwVVCVuN69B7ThYrP --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…of 2026-11-21) (objectstack-ai#37045) <!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67x8Be2AAcUBhodBsvnWLd3Xs)_ Fixes objectstack-ai#36086 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;十二份内部设计记录在与现行代码不一致的地方各加一条注明日期的补注,原决定文字不动,只有访客模型里一句已被裁决撤回的接口说明照裁决改掉。 - 为什么做:这是本周的设计记录修订合集;AI 席位改代码前会读这些记录,这十五处已与上线代码不一致,会把 AI 带偏。 - 出错会怎样:只改说明文字,不动代码和功能;补注若写错,读记录的 AI 和人会拿到错误说明,整个合并可以直接撤回。 - 要你做什么:审阅后批准一次(设计记录必须由你亲手批)。 ## What changes Seventeen append-only dated notes, for the 15 rows of this week's card whose code is on `main`, in twelve records. Each note sits directly under the passage it amends, says what `main` does now, and links its card and its landing PR. One clause is rewritten, in ADR-0138, as its row and the ruling on it ask. No other decision text is rewritten, struck or reordered. Six records whose header indexes their amendments gain a pointer entry there (ADR-0050, 0066, 0090, 0138, 0151, 0158). | # | ADR · section | What it said | What `main` does | Landing PR | Note location | |:--|:--|:--|:--|:--|:--| | 1 | ADR-0158 · Open item 12 | Which aggregates count as "raw" is left to the aggregate card | `sum`, `avg`, `min` and `max` over a `record`-mode quantity are refused unless the query groups by the quantity's own `unitField`: ObjectQL aggregate `INVALID_FIELD` / 400, `summary` field `INVALID_METADATA` / 422, cube measure `INVALID_FIELD` / 400 on each query. `count`, `count_distinct`, a `fixed`-mode quantity and a plain number are not judged. No error code is added | objectstack-ai#36060 | under Open item 12; status entry | | 2 | ADR-0066 · D2 ⑧ | View All and Modify All are the bits that vote on every field of an object | A set may carry `viewAllFields`: a read vote, never an edit vote, on every field of the object. The set's own `readable: false` row beats it. It grants no object access, no record and no admin posture | objectstack-ai#36085 | under D2 ⑧, after the 2026-11-15 note; status entry | | 3 | ADR-0090 · D5 | The high-privilege list refused on an `everyone` binding | The list gains `viewAllFields` on any object entry | objectstack-ai#36085 | under D5; status entry | | 4 | ADR-0090 · D12, condition (a) | No `viewAllRecords` or `modifyAllRecords` on `'*'` | Condition (a) also refuses `viewAllFields` on `'*'`; the bit on a named object stays inside the boundary | objectstack-ai#36085 | under D12's 2026-10-17 amendment | | 5 | ADR-0151 · D3 | The bits the agent ceiling removes | The clamp also clears `viewAllFields` on every object entry; assigning a set that carries it to an account is refused by name | objectstack-ai#36085 | under D3; header entry | | 6 | ADR-0050 · Decision 2, the 2026-10-20 note | "a per-list open mode, if ever wanted, is the list's existing `navigation.mode`" | On an object's list `navigation.mode` is deprecated and no longer picks how a record opens: the name opens the full page, the hover icon the side panel. `none` still means the rows open nothing. A page block still honours every value | objectstack-ai#35910 | under Decision 2, after the 2026-10-20 note; status entry | | 7 | ADR-0050 · the same note | The create form is chosen by convention from the object's form views | The console's record create and edit forms are the object's own, laid out by `fieldGroups`, less a `showOnCreate: false` field on a create. An internal form view steers nothing there. A public form and a named form an action opens keep their own definition | objectstack-ai#36543 | second note under Decision 2 | | 8 | ADR-0052 · section 5b, tier 1 | "Opt-in (like Feed Tracking) keeps the stream from becoming change-noise" | Old and new values show by default. Off per object with `enable.fieldHistory: false`, per field with `fieldHistory: false`. An entry serves a field's values only to a reader who is served that field | objectstack-ai#36399, objectstack-ai#36580, objectstack-ai#36613, objectstack-ai#36641, objectstack-ai#36661 | under tier 1 | | 9 | ADR-0146 · D1 | Studio is where metadata is edited | A workspace administrator also edits in the running app: the menu and the pinned header actions in design mode, a dashboard on its page, a report on its builder page, a view's settings on the view. Each save is one item's draft and publish, and writes nothing over a pending draft | objectstack-ai#36397, objectstack-ai#36437, objectstack-ai#36629, objectstack-ai#36405, objectstack-ai#36644, objectstack-ai#36411, objectstack-ai#36848 | end of D1, after the 2026-11-24 amendment's table | | 10 | ADR-0146 · D5 (two card rows) | The bridge draws on the app switcher row and the app bar entry | From 768 px up the entries are two rows of the app-name menu. "Design layout" turns on design mode. "Edit app" opens Studio, and reads "View in Studio" for a read-only package. The page header draws neither | objectstack-ai#36437, objectstack-ai#36621, objectstack-ai#36789 | under D5 | | 11 | ADR-0146 · D10, the 2026-11-22 note | An extension places only what it brings; the base's arrangement stays the base's | The App's paired `.custom` package may declare whole `fieldGroups` and `relatedLists`. Each key it writes replaces the folded result whole. Any other package is refused and prescribed `place` | objectstack-ai#36517 | under D10, after the 2026-11-22 note | | 12 | ADR-0146 · D10, the same note | (the same) | `actionLayout` is the third such key. Only the paired `.custom` package writes it on an extension. Each arm it writes replaces the served arm whole. The server refuses the shape; the reference is refused by design mode's Save and by the CLI rule only | objectstack-ai#36629 | second note under D10 | | 13 | ADR-0138 · D2, the 2026-11-20 amendment | The restriction profile is served on the unscoped route "and its environment-scoped twin" | Only the unscoped route is mounted. A request to the twin gets the host's ordinary not-found answer. A server that mounts the scoped base alone serves no profile | objectstack-ai#36531 | the clause is rewritten in place; a dated amendment under it; status entry | | 14 | ADR-0149 · D3, rules 4 and 5 | Both rules apply to an unknown word beside a grouping word; the record did not say which governs | Rule 4 governs the unknown word: the labelled fallback, nothing asked. Rule 5 is the rule for a question that names no number. Beside a fallback the note ends with one conditional sentence | objectstack-ai#36509 | under D3, after the 2026-11-19 note | | 15 | ADR-0027 · roadmap row M2 | "explicit, batched publish" | In Studio's designers a person's Save writes the draft and publishes that one item at once. Drafts and the package's batch publish remain for an AI's changes | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under the roadmap table | | 16 | ADR-0037 · the product-boundaries amendment | "Publish remains the single commit gate shared by every surface" | The publish is the item's own, issued by the Save itself. The top bar's Publish is drawn only while a draft is pending | objectstack-ai#36597, objectstack-ai#36634, objectstack-ai#36652 | under that sentence | | 17 | ADR-0085 · section 2 | `relatedLists` is "the one place" where the re-arrange rejection yields | `actionLayout` is the second: a ruled exception (the maintainer's ruling on objectstack-ai#36635), on the object, with a `list` arm and a `record` arm | objectstack-ai#36629, objectstack-ai#36815 | under section 2, after the 2026-11-22 note; dated 2026-11-23 | The 15 card rows are the 17 lines above: the `viewAllFields` row is lines 2 to 5, and the two ADR-0146 D5 rows are line 10. **Rows not carried** - ADR-0085, the `fieldGroups[].collapse` row: already on `main` through objectstack-ai#36817. The record carries "Addendum (2026-11-22): on the synthesized record page the reader folds every titled group", which says what the row asks for. Nothing is added. No `scripts/adr-anchors/**` entry moves. No `**Status**:` line changes in the part the index projects, so `docs/adr/README.md` stays current. ## Why AI seats read the ADRs before they change code in governed territory (AGENTS.md Prime Directive objectstack-ai#13). These passages say something `main` no longer does, so a seat that trusts them is steered wrong. This is the week's rolling ADR revisions card: its rows land together as one governed `docs/adr/**` PR and one approval, on the maintainer's word of 2026-11-20 (「adr接受你的建议」). ## Tests Docs-only diff: no package, test or build input is touched, so no package test or typecheck applies, and nothing a test pins changes. ## Acceptance notes - Every row was read against the code on `main` at `a73edb3cd`, not against PR state. Each landing commit is an ancestor of the branch, and each note names the file or symbol that makes it true. `main` has moved once since (`9c57bd283`); that commit touches no `docs/adr/**` file and no file a note names. - Where a row's claim is not what `main` does, the note states what `main` does: - **ADR-0052.** The row gives the per-field switch as `trackHistory: false`. On `main` it is `fieldHistory: false`; `trackHistory: false` reads as unset. - **ADR-0146 D1.** Three sentences of the row are not written. "The fate of Studio's Interfaces pillar is still open": the 2026-11-24 amendment of D1, already on `main`, retires the pillars. "Studio is not changed by this batch": the same amendment changes it. "Each of these writes the same paired package": a report's save and a change to an existing view's settings name no package, and the menu, the action arrangement and a dashboard go to the item's own package when it is writable. The note says where each save lands. It does not repeat what that amendment already says about dashboards and reports opening in the app. - **ADR-0146 D5.** Both card rows describe a state objectstack-ai#36789 has since replaced: the row of objectstack-ai#36437 has the page header's button enter design mode, and the row of objectstack-ai#36621 has the app-name menu's "Edit app" enter it. On `main` the entry into design mode is "Design layout", and "Edit app" opens Studio. The two rows are written as one note that states the end of that sequence. - **ADR-0027.** The row says later PRs will move the other Studio editors. They have landed (objectstack-ai#36634, objectstack-ai#36652) and the note cites them. It quotes the maintainer's own sentence on the epic, not the epic's summary line. - **ADR-0037.** The row says a pending draft now means an AI's draft. Studio's generic item page still saves a person's drafts (its move is declared by D1's amendment and not built), and the note says so. - **ADR-0085.** The row says the row menu is queued and not built. objectstack-ai#36815 built it, and it follows the `record` arm; the note says so. The `list` arm still has one reader. - Header entries: added where a record's header indexes its amendments (ADR-0050, 0066, 0090, 0138, 0151, 0158). Not added to ADR-0146: its status block lists only the maintainer's in-place amendments, its 2026-11-22 note under D10 has no entry there, and open PR objectstack-ai#36957 edits that block. Not added to ADR-0027, 0037, 0052, 0085 and 0149, whose headers hold no such list. - Dates: every note is dated 2026-11-24, except ADR-0085's, dated 2026-11-23 as its row sets (that record dates its notes by ruling). ADR-0138's amendment is dated 2026-11-24 and names the ruling's date, 2026-11-22. - ADR-0151 is `Proposed`; its note follows the form of the dated notes it already carries. - The spec docblock sentence the ADR-0085 row mentions landed with objectstack-ai#36629, so nothing outside `docs/adr/**` is owed. - Noted, not filed (read-only observations, nothing was run to exercise them): - A report's save, and a change to an existing view's settings, from the running app name no package. For an item of an installed package whose stored rows are not bound to exactly one package, the server then addresses the package-unbound row, not the paired `.custom` package ADR-0146 D2 points customizations to. Whether a door refuses that write was not measured. - Two source comments still say design mode is entered from "Edit app" (the page-actions module header and the design-mode module's gate paragraph). Comments only. - Landing tier: Tier H (`docs/adr/**`, governed; the maintainer approves). The diff is +243 / -5 over 12 files. ## Verification Read first, by risk: 1. `docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md`, the D2 hunk: the one place earlier text is rewritten. 2. `docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`, the note at the end of D1: the widest claim, where each in-app save lands. 3. `docs/adr/0066-unified-authorization-model.md`, the note under D2 ⑧, with its ADR-0090 D12 twin: permission semantics. Two-minute check: `pnpm check:adr-symbol-anchors` prints a green line that starts `check-adr-symbol-anchors: 3904 anchors across 160 records`, and `git diff origin/main...HEAD --stat` shows 12 files, 243 insertions and 5 deletions. <details><summary>Gate readings on e5c60bf</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived the same 21 families on `8c705bc2c` and on `e5c60bff0`. The readings below are the second run, on `e5c60bff0`, each exit captured before any pipe: ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:adr-index :: exit 0 pnpm check:adr-symbol-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-prior-rulings :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` On the first run `check:doc-formula-expressions` answered 3, prerequisite not met, until `formula` and `lint` were built under `os-verify-lock` (VERDICT command-exit 0, 5 of 5 tasks). `--ran` reconciliation: 21 derived, 21 run, 0 NOT-MEASURED (a derived zero). `node scripts/adr-index.mjs --check`: exit 0, the README is current. `check-commit-card-trailers --range origin/main..HEAD`: exit 0, 2 commit messages. `overlap-check`: `origin/main` and objectstack-ai#36957 both merge cleanly, VERDICT clean exit 0. `check-governed-merges --branch`: GOVERNED, 12 of 12 paths on the register, Tier H. Control-byte scan of the twelve files: 0 hits. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema touched.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm lint` was not run locally on this Markdown-only diff; CI judges it.) - [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. (Publishes nothing: `skip-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. (Not walked item by item; the derived gates above are what ran.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J8VVAoUbebHyRXKT4GxBTV --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steve · project thread
Fixes #36485
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
SidebarAppMenu): a new 「Edit app」 item (sidebar-app-menu-edit-app, thetopbar.editAppkey every locale already carries, no new i18n key) under the app list, in one group with 「Add app」 (one rule above the group, none between the two). Choosing it calls the shell'suseDesignMode().enterfor the app on screen: no navigation, no Studio.useStudioEntryGate(the gateuseAppStudioEntryreads) answers non-null, i.e.useWorkspaceAdminStatus().isAdminANDuseCanAuthorMetadata()(the server-reportedmanage_metadatacapability) AND the app's package is oneGET /api/v1/packageslists (not a kernel package: Setup, Studio, Account get none); a read-only package (posture: 'view') only where the customization door takes the caller (!postureHasOrgWall(useTenancyPosture()) || user.isPlatformAdmin), as 设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 set it. It reads the app's own Studio path (appStudioDesignPath); the gate judges the package id only, so the answer is the one the header got on every route.ConsoleLayout's provider).ShellPageActions):EditAppButtonis deleted: no 「Edit app」 and no 「Open {app} in Studio」 in the group on any route. The group now reads no Studio gate at all (useAppStudioEntry(false), app only, for the help menu's package).useAppStudioEntrystays:AppHeader(the top bar still drawn below 768 px and on docs pages) reads it.mainan installed (read-only) app already enters the mode (设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 landed), so in this PR an installed app's menu item behaves exactly as a self-built one's. Its one exception is the walled-deployment case above: there the item is absent (the header showed the eye into Studio; that eye is gone with the header buttons, so such a caller reaches Studio through the app switcher's row or Studio's landing).chrome/OnboardingWalkthrough.tsxis a stub that renders nothing, and no other tour exists in the console.Tests
Pins added or rewritten (vitest, root ui/)
SidebarAppMenu-36112.test.tsx, new top-level describe 「Edit app」 in the app menu enters the design mode: placement under the list with one rule before the group; choosing it turns the realuseDesignModeControlleron and the item is gone while on; a read-only package's app has it and enters; walled + read-only gets none, walled + writable keeps it; controls: a member, an admin withoutmanage_metadata, the Setup app (package not listed), no shell holding the mode. The package list is the stubbedfetch; the file-levelbeforeEachnow stubs it for every test, since the menu reads the gate for admins.ShellPageActions-36111.test.tsx: the group's order is comments then help; the old 「Edit app」 / eye / design-mode-button describes are replaced by one asserting neither entry (test id and accessible name) for writable and read-only packages, with and without a design-mode shell, walled, and for a member.UnifiedSidebar.hiddenCollapse-35062.test.tsx, new top-level describe: sidebar collapsed at 1024 px, floated by a press on the left edge, the real Radix app menu opened from inside the float offers 「Edit app」, and choosing it turns the mode on.Runs at f7d907a
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/layout/__tests__/plusObjectView.shellPageActions-36111,RecordDetailView.topBar-27524,PageView.consoleHeader-36111(lock VERDICT command-exit 0): Test Files 157 passed (157), Tests 1255 passed (1255). Run at 2b4666e plus the test edits; the float pin and typing commit followed, re-run: the two harness files 36/36.pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsconfig.test.json): VERDICT command-exit 0.Ablation (one-shot, not kept)
node scripts/ablation-replace.mjs --file ui/packages/app-shell/src/layout/SidebarAppMenu.tsx --anchor '{enterDesignMode && EDIT_APP_ITEM_ELEMENT}' --delete -- vitest …(anchor 1 → 0, blob 367de8db → 71946a69): 5 failed | 31 passed: every positive pin in both harnesses red, every control green; restored blob 367de8db = HEAD.ShellPageActions.tsxswapped for its base-commit text under an EXIT trap: 3 failed | 5 passed (the order pin and both no-entry pins red; the member control and the scope pins green); restored blob 2e640646 = HEAD,git statusclean.Acceptance notes
--fresh; Console dev server pointed at it), 1440 px. HotCRM is not in this container: the CRM example'scom.example.crmis a code package served read-only, so it stands in for the installed app; a writable app was made for the self-built case (POST /api/v1/packagescom.acme.mineplus appmy_salessaved into it).CRM · Setup · (My Sales) · Edit app · Add app; choosing 「Edit app」 draws the design-mode bar; reopening the menu in the mode shows no 「Edit app」; collapsed sidebar, floated from the edge: item present, choosing it draws the bar.CRM, no 「Edit app」.PageView.consoleHeader-36111/ObjectView.shellPageActions-36111/RecordDetailView.topBar-27524stayed green./mnt/project-files/objectstack-seat2/:36485-before-crm-readonly-header.png,36485-before-selfbuilt-writable-header.png/36485-after-crm-readonly-header.png,36485-after-selfbuilt-writable-header.png36485-before-crm-readonly-app-menu.png/36485-after-crm-readonly-app-menu.png,36485-after-selfbuilt-writable-app-menu.png36485-after-*-design-mode-on.png,36485-after-*-app-menu-in-mode.png; float:36485-after-*-float-app-menu.png,36485-after-*-float-design-mode-on.png; member:36485-after-member-app-menu.pngAppHeader, outside this card's file surface): it opens Studio, not the mode. Left as is; named in the report for the seat.designMode.tsx's docblock still says the mode is entered from the page header's 「Edit app」 (ShellPageActions); the file is read-only here (open PR feat(console): create a dashboard from the design mode's Add menu item #36606 edits it).ui/packages/app-shell/README.md's "App → Studio reverse bridge" describes the top bar only and does not mention the mode's door; also outside the file surface. Both named in the report.Verification
Read first:
ui/packages/app-shell/src/layout/SidebarAppMenu.tsx,useEnterDesignMode: the gate carried over from the header; the risk is a viewer who saw the header button and now sees no menu item, or the reverse.ui/packages/app-shell/src/layout/ShellPageActions.tsx,ShellPageActionsGroup: the group no longer reads the gate.UnifiedSidebar.hiddenCollapse-35062.test.tsx, the new last describe: the float path.Two-minute check: as an admin, open any app page at desktop width, click the app name at the top left: 「Edit app」 sits under the app list above 「Add app」; click it and the blue Design mode bar appears; the page header's top-right has only the AI and help buttons.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm