Skip to content

fix(console): report editing is its own entry, mutually exclusive with design mode - #36848

Merged
objectstack-fleet[bot] merged 11 commits into
mainfrom
claude/issue-36692-report-editing-own-entry
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 11 commits into
mainfrom
claude/issue-36692-report-editing-own-entry

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
Fixes #36692
Clause-②: no
Metadata-protocol: none

repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

维护者速读

  • 管理员在应用里点「设计布局」时,添加菜单项的「报表」一栏只列已有报表,不再有「新建报表…」;新建报表改在报表列表页右上角的「新建报表」按钮;仪表盘或报表正在编辑时点「设计布局」会提示先保存或取消,设计布局开着时仪表盘和报表的「编辑」按钮不出现。
  • 落实维护者「照 Twenty 分开」的裁决:报表和仪表盘的编辑与设计布局是两个入口,屏幕上任何时候只有一套保存/取消。
  • 出错时管理员会看到两套保存按钮或点不出新建报表;本改动不碰任何已保存的数据,合并后可直接撤回。
  • 无

What changes

The maintainer's ruling on the decision card (2026-11-23 11:55Z): 「照 Twenty 分开」. Report and dashboard editing are their own entries, mutually exclusive with design mode, so the screen shows one Save/Cancel set at a time.

  1. Design mode stops hosting the report builder. The Reports list in 「Add menu item」 only links reports that exist. Removed: its 「New report…」 row, the cross-mode hand-off module designModeReportSlot.ts (deleted, not left unused), the slot block in DesignModeMenu, the slot branch in ReportNewPage, and the report kind of designModeMenuCreate.ts (a dashboard is again the one kind made from a name). 「New dashboard…」 is unchanged (change item 4).
  2. A report is created from its own entry. The reports index (AppReportIndexView) header offers 「New report」, linking to the app's reports/new. It is gated as the builder is (useWorkspaceAdminStatus: workspace admin, resolved) and shown on an empty index too. The builder's Save and Close in its own header are the only Save/Cancel set; Close goes back to the index.
  3. Two-way exclusion, through one hold on the shell's design-mode store (designMode.tsx):
    • useHoldDesignModeOut(open): a dashboard's or report's own editor holds the mode out while it is open (or opening). Wired into useDashboardInPageEdit, ReportView (builder and inspector panel) and ReportNewPage.
    • The mode's enter now answers boolean: while anything holds the mode out, it refuses with a toast, "Save or cancel your dashboard or report changes before designing the layout." (zh-Hans 「请先保存或取消仪表盘、报表的修改,再设计布局。」). 「Design layout」 in the app menu stays drawn and refuses through it.
    • While the mode is on, useDesignModeActive() hides the dashboard's Edit (useDashboardEditOffered), the report page's Edit, and the index's 「New report」.
    • ReportNewPage reached while the mode is on (an in-app navigation keeps the mode) draws no builder: an Empty says "Finish designing the layout first" / "A report is built outside the design mode. Save or cancel the layout, and the builder opens here." It holds the mode out only while it draws the builder, so the bar's Save or Cancel opens the builder in place (L1-a S1, 7122753474).
    • This also closes the path the card measured: the bar's Cancel ending design mode while a dashboard stays in edit. The bar can no longer appear while an editor is open.
  4. Strings: designMode.editorOpen, console.reportIndex.newReport, report.builder.designModeOnTitle and report.builder.designModeOn were added to all 11 packs (zh-Hant regenerated with gen:zh-hant). designMode.menu.newReport, designMode.menu.newReportLeft and report.builder.addsToMenu were removed from all 11 packs. The de quote-pair ledger drops 134 to 133 because newReportLeft is gone.

Untouched rulings: #36363 ruling (4) (menu labels) and designModeMenuCreate.ts ruling C / ADR-0146 D2 「定制都进 .custom」.

Docs and skills: neither content/docs nor skills/ teaches "New report… from design mode". The one New report hit, content/docs/data-modeling/analytics.mdx, is about Studio's dataset picker, so nothing is owed.

Read first (by risk):

  1. ui/packages/app-shell/src/layout/designMode.tsx: the heldOut counter, enter's refusal and useHoldDesignModeOut.
  2. ui/packages/app-shell/src/views/DashboardInPageEditor.tsx: useDashboardEditOffered now also reads the mode. The design mode's 「New dashboard…」 landing (dashboardEditArrival) still opens the edit state, because saveWith leaves the mode before it navigates and the arrival effect waits on editOffered.
  3. ui/packages/app-shell/src/layout/DesignModeMenu.tsx: the removed report block and picker row.

Two-minute check: as admin in the showcase app, open Reports. 「New report」 is at the top right. Open a dashboard, press Edit, then choose app menu, then 「Design layout」: a red toast says to save or cancel first, and no purple bar appears.

Tests

New pins go into each component's existing harness as a top-level describe where there is one (designMode-36362, SidebarAppMenu-36112, DesignModeMenu-36363, designModeMenuCreate-36364, DashboardView.inPageEdit-36372). New card-named files were added where the component has only per-card files: ReportView.designModeExclusion-36692, ReportNewPage-36692 and AppReportIndex.newReport-36692.

  • Exclusion while an editor is open: enter refuses with the prompt and the mode stays off. This is pinned on the store, on the 「Design layout」 door, on the dashboard edit state (no bar, so no bar Cancel), on the report builder, on the report inspector panel, and on the new-report builder. Two editors hold the mode out until both close, and an editor unmounted while open lets go.
  • Exclusion while the mode is on: no dashboard Edit, no report Edit, no 「New report」 on the index; each comes back once the mode is left.
  • The picker: Reports lists existing reports not yet in the menu and has no 「New report…」 row. Picking a report stages it with the mode, writes nothing and navigates nowhere.
  • ReportNewPage under the mode (round 2, ReportNewPage-36692): mode on at the index, then reports/new: the mode stays on, no builder, no Save, the prompt shows; then the bar's Cancel: the mode is off, the builder is drawn, and a later enter() is refused; control: mode off, reports/new draws the builder with Save and no prompt.
  • ReportNewPage saves on its own (the deleted ReportNewPage.menuSlot-36364 file's surviving case, ported), and Close goes back to the index.
  • Removed with the behaviour they pinned: the report-half cases in DesignModeMenu-36363 and designModeMenuCreate-36364, and ReportNewPage.menuSlot-36364.test.tsx.
Local runs
  • Pre-merge head 22dee19f5: @object-ui/app-shell full suite: Test Files 2474 passed, 1 skipped (2475); Tests 23314 passed, 9 skipped. @object-ui/i18n suite: 107 files, 2006 passed. type-check for both packages exited 0.
  • After merging origin/main (head 7ea3843ec, which carries fix(console): design mode menu save refuses a 404 read, pins its publish, and keeps own entries out of contributed groups #36821): the app-shell closure was rebuilt and type-check for both packages exited 0. @object-ui/i18n suite: 108 files, 2011 passed. Scoped app-shell run (src/layout/ plus the ReportView, ReportNewPage, DashboardView, AppReportIndex and reportBuilder files): 190 files, 1535 passed. This run was narrowed on purpose; CI's Test UI runs the full suite.
  • Ablation 1, committed fix, scripts/ablation-replace.mjs: in enter, if (heldOut > 0) { was changed to if (heldOut < 0) { (anchor 1 to 0, blob 473cab2c7389 to 7793aa4658ec). Result: 7 failed (every refusal pin across five files). Restored blob equals HEAD and git diff HEAD is empty.
  • Ablation 2: in useDashboardEditOffered, return gated && !designing; was changed to return gated;. Result: 1 failed ("while the mode is on, Edit is not offered"). Restored, blob equals HEAD.
  • Round 2, head cccd01739: ReportNewPage-36692 6/6. Ablation 3, committed fix: if (designing) { changed to if (false as boolean) { (blob f81d258a824f to fa265e66e744): 1 failed, 5 passed, the mode-on pin red; restored blob equals HEAD. Scoped run (packages/i18n/ plus app-shell src/layout/, ReportView, ReportNewPage, DashboardView, AppReportIndex, reportBuilder): 298 files, 3549 passed, 13 skipped. type-check for both packages exited 0.

Acceptance notes

  • Browser screenshots: showcase app as admin, console served by Vite from this branch's ui/ against a --seed-admin backend on its own port. The files are in the project files under issue-36692/:
    • 1-reports-index-new-report.png: the reports index with 「New report」.
    • 1b-builder-one-save-set.png: the builder it opens, showing only its own Discard/Save.
    • 2a-design-mode-index-no-new-report.png: design mode on, so no 「New report」.
    • 2b-design-mode-reports-picker.png: the design-mode Reports picker without 「New report…」. The showcase's reports are all in its menu already, so the picker reads "Nothing to add here".
    • 3-refusal-prompt.png: the dashboard in edit, and 「Design layout」 refused with the prompt.
    • 4-design-mode-dashboard-no-edit.png: design mode on, so the dashboard has no Edit.
  • A typed reports/new URL reloads the page, so the mode is gone. An in-app navigation to reports/new keeps the mode, and there the page now draws the prompt instead of the builder (round 2). The index link is hidden while the mode is on.
  • Open PR feat(i18n): a design-mode menu rename outside the source language is stored as that language's translation #36858 overlaps this branch textually in DesignModeMenu.tsx and designModeMenuCreate.ts (this PR removes the report half there). Whichever lands second resolves it.
  • #36791 will conflict with this branch on the de quote-pair ledger counts (de-quote-pairing-3876.test.ts). Whichever lands second re-counts.

Verification

Derived gate families (dispatch-gates.mjs --commands at 7ea3843ec) were run locally; their results are in the report comment on the card. CI carries the full farm.


Generated by Claude Code

…ish, and keeps own entries out of contributed groups

WIP: implementation of objectstack#36538 items 1-4 and N10, N12-N16; tests follow.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…in the wired collision rule

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…(zh-Hant regenerated)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…ith design mode

Design mode's Reports picker links existing reports only: the New report
row, the report kind of the menu create, and the design-mode report slot
are removed. The reports index offers New report, gated as the builder.
The design mode's enter refuses, with a prompt, while a dashboard or report
editor holds it out; those editors are not offered while the mode is on.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…g and design mode

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
…port-editing-own-entry

# Conflicts:
#	ui/packages/app-shell/src/layout/DesignModeMenu.tsx
@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 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — REWORK · repo:objectstack#3 · head 7ea3843 · 2026-11-24T05:13Z

L1 read of #36848 against card #36692 (the maintainer's ruling 「照 Twenty 分开」). Head 7ea3843ecf10e5c1ee1e27d8cc11f8ff88428557. Dev report 7122693249.

Face. l1-face.mjs --pr 36848 CLEAN (13 items read, none flagged). At this head: 45 checks succeed, 13 skip as expected, 0 fail. mergeable_state clean. check-governed-merges.mjs says NOT governed (0 of 31 paths; 1691 changed lines). Clause-②: no, Metadata-protocol: none.

Read and sound.

  • Slot removal: designModeReportSlot.ts and its 36364 test are deleted, not left unused. The report kind of designModeMenuCreate.ts, the slot block in DesignModeMenu.tsx and the slot branch in ReportNewPage.tsx are gone. No reader of designMode.menu.newReport, designMode.menu.newReportLeft, report.builder.addsToMenu or designModeReportSlot remains under ui/, apps/, packages/, content/ or skills/; the only hits are the history comments in de-quote-pairing-3876.test.ts. No docs or skills page teaches "New report…" from design mode, so Skills-docs is honestly not owed.
  • Index: 「New report」 sits in the PageHeader actions. It is gated isResolved && isAdmin && !designing, the same admin gate as the builder.
  • Exclusion, mode on → editors off: useDashboardEditOffered and the ReportView header Edit read useDesignModeActive(). The report-builder arrival is skipped while designing.
  • Exclusion, editor open → mode refused: holdOut() is a counter with an idempotent release. enter() returns false with the designMode.editorOpen toast while it is above 0. The dashboard edit state, the ReportView builder and panel (open or opening), and ReportNewPage each hold it through useHoldDesignModeOut, an effect whose cleanup lets go on close or unmount. The pins cover one editor, two editors and unmount-while-open. Ablation 1 (the heldOut > 0 test flipped) turns 7 pins red across 5 files.
  • The de-quote-pairing-3876 count moves 134→133 for the one retired newReportLeft pair. The textual overlap with feat(console): org basics in one form, optional rows, 「Get started」 sidebar pill #36791 is known; whichever PR lands second re-counts.

Finding.

  • S1. ReportNewPage drawn while the design mode is already on still shows two Save/Cancel sets, and the bar's Cancel ends the mode under the open builder. The page only holds the mode out, and a hold refuses only a later enter(). Nothing stops the builder from drawing when the mode is already on. Hiding the index's 「New report」 covers the link but not the address, and the module header says the mode goes along on a link to another page of the same app. A reachable path: open the builder from the index, Close (it pushes the index), enter 「Design layout」, then press the browser's Back. That lands on reports/new with the mode on, which is the card's double-bar screen, item 2. Two texts this round wrote are then untrue: the changeset sentence "so the design mode's 「Cancel」 can no longer end the mode under an editor left open", and the card's Expected, "At any moment the screen shows exactly one Save/Cancel set". The silent wrong result of item 3 is gone with the slot: a save now makes a plain report, which is what the builder says. The model the ruling points to closes this side: Twenty's useSetIsPageLayoutInEditMode ignores an edit request while customization is on. Fix (one route, dev's choice of wording): while useDesignModeActive() is true, ReportNewPage does not draw the builder. It can draw the same prompt as an Empty, or send the reader back to the reports index with it. Pin it with a "mode on, then reports/new mounts → no builder, no second Save" case and a control where the mode is off. ReportView's already-guarded Edit and arrival need nothing.

Notes (nit, no action required):

  • N1. While designing, ReportView skips the arrival without consuming it. If the mode ends while the reader is still on that report, the effect runs again and the builder opens then. That is arguably right (the arrival was for this report), but it isn't pinned.
  • N2. enter() now returns boolean. No caller outside SidebarAppMenu reads it today, so the widening is free.

Delta read owed on the head that carries S1.

…ode is on

Reached with the mode already on (the browser's Back to reports/new), the
page drew the builder under the design-mode bar: two Save/Cancel sets, and the
bar's Cancel ended the mode under the open builder. The page now draws a
prompt in place of the builder while the mode is on, holds the mode out only
while it draws the builder, and opens the builder once the mode is left.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head cccd017 · 2026-11-24T06:33Z

Delta read of #36848 (card #36692) against my REWORK 7122753474 @7ea3843e. New head cccd01739c9bcfc6cb1c512133d63455c935cf9d; the dev's delta report is 7123653672.

Delta. git diff 7ea3843e cccd0173 touches 14 files: ReportNewPage.tsx, its 36692 test, the changeset, and two keys in each of the 11 packs. Main was not merged, so everything read at 7ea3843 still stands.

  • S1: closed. ReportNewPage now reads useDesignModeActive(). While the mode is on it draws an Empty (report.builder.designModeOnTitle / designModeOn) in place of ReportBuilderHost, and it holds the mode out only while it draws the builder (isResolved && isAdmin && !designing). Reached by the browser's Back with the mode on, the page now shows the mode's bar and a prompt: one Save/Cancel set. Saving or cancelling the mode draws the builder in place, which then holds the mode out, so a later enter() refuses. The new guard sits after the loading and admin-only returns, so a non-admin still sees the admin-only text. Pins: mode on then mount (no builder, no second Save), then Cancel (builder drawn, a later enter() refused), plus a mode-off control. The ablation of if (designing) turns the mode-on pin red.
  • The changeset gains one bullet that matches the diff, and its key list now names the two new keys. The changeset sentence I flagged ("can no longer end the mode under an editor left open") is now true on every path I know of, including the address reached with the mode on.

Face. l1-face.mjs --pr 36848 CLEAN at this head. 47 checks succeed, 15 skip as expected, 0 fail. mergeable_state clean. It remains NOT governed.

No must-fix, no should-fix. N1 and N2 from 7122753474 stand as optional notes. #36858 is queued and overlaps in DesignModeMenu.tsx / designModeMenuCreate.ts. If it lands first, the merged head owes a short delta read limited to the merge resolution.

…port-editing-own-entry

Conflicts with #36858 (menu rename translation), resolved so both survive:
- designModeMenuCreate.ts: keep this branch's dashboard-only creator (no
  report kind, no saveAndPublishInPackage); take #36858's input type
  `AppMenuSaveInput & { item: NewMenuItem }` and its import, dropping the
  now-unused `Menu` import, so the dashboard path carries `labels`.
- DesignModeMenu.tsx: drop the report-slot block #36858 had edited to pass
  `labels`; the dashboard save keeps #36858's `labels`.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head 4ce5f1c · 2026-11-24T07:36Z

Merge-resolution read of #36848 (card #36692) after main was merged with #36858 (573a376). The new head 4ce5f1c41bac723344814555804ea212d303a1d3 is a merge commit with parents cccd0173 (my delta ACCEPT 7124071450) and 573a3765, not a rebase. The resolution note is 7124720950.

Resolution, read.

Checks. At 4ce5f1c: every check run is complete, none failed (latest run per name); l1-face reads as above. mergeable_state clean. It remains NOT governed.

No must-fix, no should-fix. My earlier reads (REWORK 7122753474, delta ACCEPT 7124071450) stand for the branch's own changes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

Landing · 2026-11-24T07:37Z · ACCEPT 7125185333 at head 4ce5f1c (merge-resolution read; delta ACCEPT 7124071450 at cccd017)

reading value
check-governed-merges.mjs --pr 36848 NOT governed · +1140/−664 (1804 ≤ 3000)
landing-k.mjs --pr 36848 CAN'T ANSWER (no Test Core shard ran on the merge head); K read via merge-base instead: merge-base 573a376 (#36858's merge), 3 first-parent commits on main 7a5ae65 since → K = 3 < 15
checks at 4ce5f1c 45 success, 13 expected skip, 0 failed or pending; mergeable clean

Open findings: nits only (L1 N1, N2 of 7122753474). #36858 overlap resolved in the merge commit (resolution note 7124720950). #36791 / #36869 overlap only on the de quote-pair ledger counts; whichever lands second re-counts. State: ready + auto-merge (Tier S). On MERGED, #36692 closes by Fixes; area ux-A removes pm:dispatched.

Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…stored as that language's translation (objectstack-ai#36858)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9qsP28anD5tWRUHq8j1xSU)_
Fixes objectstack-ai#36504
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up objectstack-ai#36873 (`skills/objectstack-i18n/SKILL.md:387`
names `GET /api/v1/i18n/locales` but not its answer, so it does not name
the `sourceLocale` member this PR adds)

repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

## 维护者速读

-
管理员在设计布局模式下改菜单名称时,用非源语言(例如中文界面、英文源语言)改的名字只对该语言生效,其他语言仍显示原名称;以前在非默认语言下改名会被禁止,或在默认语言下改名会覆盖所有语言。
- 属于设计布局(应用内直接调整菜单)专题,补上“菜单改名按语言落地”这一半,并让服务端告诉控制台哪种语言是源语言。
- 出错时最坏情况是某个语言下的新名称没有生效(显示原名称),原有名称不会被改坏;改动可通过在 Studio 删除对应的翻译条目直接撤回。
- 无

## The contract widening (for the contract-tier review)

**`GetLocalesResponseSchema` gains one optional member, `sourceLocale:
string`** (`packages/spec/src/api/protocol.zod.ts`). It is the declared
`i18n.sourceLocale`, else the default locale: the collapse every
metadata-document translator already makes (`getSourceLocale?.() ??
getDefaultLocale?.()`, the caller's to make per the
`II18nService.getSourceLocale` contract). It is absent only when the
server knows neither. The name follows its config key
(`i18n.sourceLocale`, `translation.zod.ts`), the precedent being the
body's own `isDefault` mark named for `i18n.defaultLocale`. The shard
moved, measured: `packages/spec/authorable-surface/api.json` gains
`api/GetLocalesResponse:sourceLocale` (regenerated, not hand-edited), so
`Metadata-protocol: added` and `@objectstack/spec` minor. The one
producer is the dispatcher's `/i18n` domain
(`packages/runtime/src/domains/i18n.ts`); service-i18n serves no body of
its own for this route (its ledger row points at the SDK).

## What changes

- **`GET /api/v1/i18n/locales`** names the source locale (above).
- **Design mode, 「Rename and icon」**: the name field is open in every
language. Where the name lands is the save's rule
(`labelGoesToTranslation`, `designModeMenuModel.ts`):
- typed in the source language over an entry shown by its stored label:
the stored label, as before;
- typed in any other language, or in the source language over a
translation the reader was shown: that language's translation, and the
stored label is kept.
  The dialog says so when the name will be a translation.
- **The translation write** (`designModeMenuSave.ts`): the `translation`
item `APP_menu_LOCALE` (`crm_menu_zh_cn`), key
`apps.APP.navigation.ID.label` (the key `translateApp` reads), in the
package the menu is written to: the app's own when writable, else its
`.custom` pair (ADR-0146 D2). The item as stored is read through
`/layers`, its other keys kept, and written by the menu's confirmed-save
rule (first-write pin, publish pinned to the row read, a refused publish
discards the draft). It is written before the menu; a translation-only
save writes no app.
- **N5 (comment 7083013814)**: a link added outside the source language
is stored without a label, its typed name written as that language's
translation, keyed by the id the entry is stored under
(`rebaseMenuEdits` now reports a fresh id through `writtenAs`).
Measured: `AppSchema` accepts a label-less `url` entry, so no
placeholder is invented; a source-language reader sees the URL until
someone names it there.
- **Unknown languages** (the locales read failed): every typed name is a
translation, which never changes what another language reads.
- Strings: `designMode.menu.renameSourceOnly` is replaced by
`renameTranslation`, and `translationPendingDraft` is added, in all
eleven packs (zh-Hant regenerated).
- Docs: the two route tables that list `/i18n/locales` say it names the
source locale; `content/docs/references/api/protocol.mdx` regenerated.

### Done-when, item by item

1. `GET /i18n/locales` exposes the source locale, pinned:
`packages/runtime/src/i18n-supported-locales.test.ts` (real `AppPlugin`
+ memory i18n + dispatcher; `defaultLocale: 'zh-CN', sourceLocale: 'en'`
answers `sourceLocale: 'en'`; no declaration answers the default) and
`protocol.test.ts` (the parse keeps the member).
2. A zh-CN rename over an English source writes the zh-CN translation
and leaves the stored label; read back through `translateApp`, zh-CN
shows the new name and an English reader the base label
(`designModeMenuSave-36363.test.ts`, and end to end in
`DesignModeMenu-36363.test.tsx`).
3. The guard is relaxed: both former guard pins are rewritten to the new
behaviour.
4. Object and field labels: not served by this path. The console edits
no object or field label in design mode today, and a translation of
those lives under `objects.OBJECT...` and is read by `translateObject`
with its own packaged-base and field-patch ranks (ADR-0146 D10), so it
needs its own split rule rather than this menu's. The locale read
(`fetchDeploymentLocales`, `labelLanguageOf`) is shared and reusable.

### Server-side reach, measured before building the console half

A translation row in the `.custom` pair is served at rank 1 on the
override (`getPairTranslationBundle` → `pairBundle`, `labelCatalogs`),
for nodes the override changed and nodes it left alone; the real-boot
pin is
`packages/objectql/src/protocol-custom-override-bare-slot-envelope.test.ts`
(the objectstack-ai#30504 describe: a node on the pair's override reads the pair's
translation). An own-package app's row reaches the deployment catalog
through the authored-translation sync.

## Tests

<details><summary>Local readings (head after the last fix
commit)</summary>

- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2
src/api/protocol.test.ts src/system/i18n-resolver.test.ts`: Test Files 2
passed, Tests 811 passed.
- `pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2
src/i18n-supported-locales.test.ts
src/i18n-success-envelope.conformance.test.ts
src/domains/i18n-anonymous-deny.test.ts`: the anonymous-deny literal
needed the new member (fixed in this PR); see the report comment for the
final reading.
- `ui`: `vitest run --maxWorkers=2
packages/app-shell/src/layout/__tests__/ packages/i18n/src/__tests__/`
plus the two RecordTabsConfig suites (which share the locales read): 271
files, one stale zh-Hant catalogue (regenerated in this PR); final
reading in the report comment.
- `pnpm --filter @objectstack/spec check:generated`: 14 of 14 current
after `--fix` (check:docs regenerated `protocol.mdx`; authorable-surface
regenerated over the merged tree).
- `pnpm --filter @objectstack/runtime typecheck`: `tsc --noEmit` clean;
`check:test-typecheck` names three files this diff does not touch
(`boolean-written-spelling-row-scope.test.ts`,
`meta-object-publish-column-changes.test.ts`,
`organization-ownership-boot-guard.turso-remote.kernel.test.ts`), left
to CI's reading.
- `type-check` of `@object-ui/app-shell` and `@object-ui/i18n`: NOT
MEASURED locally (the ui project references need every ui package's
`dist`); CI's Type Check UI carries it.

</details>

<details><summary>Ablations (one per tested behaviour, restored by `git
checkout HEAD`, restore proven by an empty `git diff HEAD`)</summary>

- The producer stops emitting `sourceLocale` (`ablation-replace.mjs` on
`domains/i18n.ts`): `i18n-supported-locales.test.ts` red (exit 1);
restored clean.
- `labelGoesToTranslation` answers "stored" outside the source language:
`designModeMenuSave-36363.test.ts` and `DesignModeMenu-36363.test.tsx`
red (exit 1); restored clean.

</details>

## Acceptance notes

- **Overlap**: objectstack-ai#36848 (report editing, this area, draft) conflicts
textually in `DesignModeMenu.tsx` (its removal of the report-slot block
meets this PR's `labels` argument on the report save) and
`designModeMenuCreate.ts` (imports). Mechanical; the second to land
resolves.
- File surface: `designModeMenuCreate.ts` is touched for one type line
(`AppMenuSaveInput & { item }`) so a dashboard or report created from
the picker carries the label language too; without it a zh rename staged
before 「New dashboard…」 would be written to the stored label.
- A translation item of another name for the same locale in the pair
that keys the same navigation id merges by item name order
(`readAuthoredTranslationLayer`); the design mode writes and reads only
its own `APP_menu_LOCALE` item.
- In the source language, a rename over a stored inline locale map
(`label: { en, zh-CN }`) still replaces the whole map with a string, as
before this PR; noted, not changed here.
- `RecordTabsConfig`'s tab-rename gate still compares the session with
the default locale (`fetchDefaultLocale`, unchanged behaviour); with
`sourceLocale` now served it can compare with the source locale.
Reported to the seat, not changed here.

## Verification

First read (by risk):
`ui/packages/app-shell/src/layout/designModeMenuSave.ts`
(`prepareAppMenuSave` label split and `writeMenuTranslation`),
`ui/packages/app-shell/src/layout/designModeMenuModel.ts`
(`labelGoesToTranslation`, `splitLabelEdits`, `writtenAs`),
`packages/runtime/src/domains/i18n.ts` (the locales body).

Two minutes: `cd ui && pnpm exec vitest run
packages/app-shell/src/layout/__tests__/designModeMenuSave-36363.test.ts`
— expect the `objectstack#36504` describes green, including "a rename
under zh-CN over an English source: the zh-CN translation is written and
published, the stored label is not".

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

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzhpykmQZe1yMupC2CU -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ome one left menu of six domain groups (objectstack#36891) (objectstack-ai#36921)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBTuMGhLAZx29zwDrayDGZZF)_

Fixes objectstack-ai#36891
Part of objectstack-ai#36890

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;这次只改两份架构决定的文字,写明 Studio
以后不再分顶部四个分区,改成左侧一个可折叠的分组菜单(数据、界面、自动化、平台、访问、AI),界面本身要等专题后面的卡做完才变。
- 为什么做:属于「Studio 重构」专题,先把分组、叫法和每种元数据类型归哪一组写定,后面的开发卡照同一份文字做,不各自发明。
- 出错会怎样:后面做菜单和详情页的开发会照错的分组或地址去做;这次没有改代码,合并前可以直接改文字,合并后要再修订一次。
- 要你做什么:看下面英文部分里「起草、未裁决」的七条(最要紧的是跨包的环境目录放进「访问」组),不同意的指出是第几条。

## What changes

Docs only, two accepted records amended in place, plus the generated
index. No code, no spec, no behaviour.

**`docs/adr/0084-application-builder-information-architecture.md`**

- Status line gains a dated `Amended in place` entry; the title now
names the menu and keeps the old words after "was:".
- A new section, "Amendment (2026-11-24)", holds the decision:
- Studio is the development surface of one app. Its top-left control
returns to the app and names the current package's app (decision 5). The
landing page goes by its own card (decision 9).
- One collapsible left menu of six groups, one per registered `domain`:
数据 Data (`data`), 界面 UI (`ui`), 自动化 Automation (`automation`), 平台
Platform (`system`), 访问 Access (`security`), AI (`ai`) (decision 11).
- The rule: a type's group is its registered `domain`. The key is
required on every registry entry, so no type is without a group.
- The type-to-group table: all 32 registered types (7 + 7 + 2 + 7 + 6 +
3), enumerated at `origin/main` `151e8123` from the spec's default
registry, which holds the same 32 names as the type enum.
- Four entries that are not a type: the organization's own flows under
Automation, the default sharing overview under Access, diagnostics under
Platform (all decision 11), and the `~all` directory under Access
(drafted, see below).
- A table of what stands and what is replaced, row by row against the
2026-07-01 text.
- The sentences the amendment replaces are struck or marked where they
stand (TL;DR 1, 2, 5, 6; the diagram; the pillar table; Settings; two
principles; one consequence; the alternatives).


**`docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`**

- Status line gains a dated `Amended in place` entry.
- D1: the two sentences that kept the pillars and sent a pillar type to
its pillar are marked as replaced. A dated block follows the decision:
  - the "All metadata" area is Studio's only entry;
  - an item fills the content pane, the menu stays and collapses;
- one address per item, `/studio/PACKAGE/metadata/TYPE/NAME`; the
object, the flow and the permission set open their designers there;
pillar addresses redirect;
- × , ‹ › and ⌘K change item, with no switcher and no "open in app"
button (decision 7);
- the ‹ › order is the list's, carried in the item's address, name order
without a list context (decision 10);
- the leave guard asks on every departure except the browser's Back
(decision 12), anchored to the console's unsaved-edits seam;
  - the item tools are tabs, `?review=1` kept (decisions 8, 4);
  - one save model (decisions 1, 14);
- a dashboard or a report opens in an app's own edit state, by the
three-step rule, with "from Studio" in the address (decisions 3, 6, 15);
- "New" on the two lists (decision 13), with how it stands beside the
objectstack-ai#36359 rule and the objectstack-ai#36692 ruling that PR objectstack-ai#36848 landed;
  - a table that says where each of the fifteen decisions is written.
- D2, D3, D4, D8, D11 and the Consequences each carry a dated reading of
their pillar or landing wording. No rule of those decisions moves.
- Three new merge questions (13 to 15), a Rollout paragraph naming the
epic's cards, and a Refs entry.

**`docs/adr/README.md`** is regenerated by the index script: one row
changes (ADR-0084's title and status cell).

**Drafted, not ruled.** Each is a numbered item in its record, so an
objection can name it.

1. ADR-0084 item 1: **the `~all` cross-package environment directory is
entered from the 访问 Access group.** Decision 11 places the other three
package-less entries and is silent on this one. The leg's directory
lists four types, all registered `security`, and decision 11 puts every
other such entry in the group of what it holds. Not taken: an entry of
its own outside the six groups.
2. ADR-0084 item 2: **the Settings area (General and Advanced) is not a
menu group.** Its types are found by the rule like every other type:
`app` under UI, `hook` and `mapping` under Data, `datasource` under
Platform.
3. ADR-0084 item 3: **the order of the six groups and their English
names** (Data, UI, Automation, Platform, Access, AI). Decision 11 lists
them in that order and names them in Chinese.
4. ADR-0084 item 4: **the record's title is reworded.** Number and file
name do not move.
5. ADR-0146 merge question 13: **a pillar address keeps redirecting
after the pillar routes are deleted.** From the epic's plan, not from a
ruling.
6. ADR-0146 merge question 14: **the readings of the earlier wording**
in D2, D3, D4, D8, D11 and the Consequences.
7. ADR-0146 merge question 15: **the page for D3's "n customized, m
switched off" line is left unnamed.** Decision 9 removes the landing
page and names no successor. This is a flag, not a choice: a home in
Setup would reverse D3's last clause and needs its own ruling on objectstack-ai#36908.

## Tests

No package is touched, so there is no build closure and no package test
or typecheck to run. No ablation: the diff changes no tested behaviour.
No dogfood battery: the title carries no `!` and the claim has no
narrowing arm.

The gates that read the changed files were derived from the tree, run on
head `e9ba427a9`, and reconciled. The readings are under Verification.

## Acceptance notes

**Card acceptance, item by item**

- "ADR text matches the epic's decisions": the fifteen decisions are
written or placed by the table at the end of ADR-0146 D1's amendment;
decisions 2 and 4's open halves are named with the cards that own them.
- "The table covers every metadata type, none without a group": 32 of
32. The rule (group = registered `domain`) makes this hold for a type
registered later too.
- Card item 5 (a note on objectstack-ai#36513) is a GitHub comment and is not made by
this pull request. The suggested text is in the dev report for the seat
to post.

**First files to read, by risk**

1. ADR-0146, the block "Amended 2026-11-24" at the end of D1. Risk hunk:
the two bullets on dashboards and reports, where decision 13 is read
together with the objectstack-ai#36359 rule and the objectstack-ai#36692 ruling.
2. ADR-0084, "Written here where the rulings were silent", items 1 and
2: the `~all` placement and the Settings area.
3. ADR-0084, the "Type → group" table and the three readings under it
(`datasource`, `field`, `action`).

**Two-minute verification**

Run `grep -o "domain: '[a-z]*'"
packages/spec/src/kernel/metadata-plugin.zod.ts | sort | uniq -c` on the
branch. Expected: `3 ai`, `2 automation`, `7 data`, `6 security`, `7
system`, `7 ui`, which is the Count column of the table, 32 in all.

**How objectstack-ai#36502 is described.** The Interfaces pillar's retirement (PR
objectstack-ai#36884, open and unmerged when this was written) is named as its own
card, which this amendment neither waits for nor repeats. The text reads
the same whichever lands first.

**Anchors.** New code citations are symbol anchors on things the
decisions keep: three in the spec's registry module and two in the
console's unsaved-edits module. Code that the epic deletes is named by
bare identifier only, so a later code pull request is not forced to edit
`docs/adr/**`. No line anchors.

**Noted, not filed** (outside this card; each has a carrier)

- Other records and docs still describe the pillar shell: ADR-0086 and
ADR-0130 (one sentence each),
`ui/docs/adr/0056-permission-editing-studio.md`,
`docs/design/builder-ui.md`. Carrier: objectstack-ai#36910, the epic's docs sweep.
- Decision 11 names two groups 平台 and 访问, while today's domain
dictionary draws `system` as 系统 and `security` as 安全, and the menu card
says to take group names from that dictionary. Carrier: objectstack-ai#36899.
- Decision 5 does not say what the top-left control names when the
current package publishes no app, or where it returns when the
remembered page belongs to another app. Carrier: objectstack-ai#36899.
- D3 says "Setup carries nothing per package"; one of the two homes
objectstack-ai#36908 may propose for the customization counts is Setup's package
detail. Carrier: objectstack-ai#36908.
- The `os` stats grouping in the CLI is an ADR-0084 consumer and does
not follow the six domains. Not ruled on here. Carrier: none.

**Changeset.** None: `docs/adr/**` ships in no package. `skip-changeset`
is declared with the pull request.

## Verification

Head `e9ba427a9`. 21 gate commands derived by `node
scripts/pm/dispatch-gates.mjs --commands`, 21 run, each exit code
captured before any pipe.

`dispatch-gates --ran`: `21 derived famil(ies) accounted for — 21 run, 0
NOT-MEASURED (a DERIVED zero — all 21 recorded an exit code and none of
them is 3)`.

<details>
<summary>ADR gates (verdict lines)</summary>

```
pnpm check:adr-symbol-anchors :: exit 0
✅ check-adr-symbol-anchors: 3879 anchors across 160 records resolve — 1233 symbol (1204 declaration, 29 literal), 2594 file-level, 52 cross-repo, 6 exempt, 76 continuation. 0 line anchors survive
node scripts/check-adr-links.mjs :: exit 0
✅ check-adr-links: 1171 relative link destination(s) under docs/adr/ resolve
pnpm check:adr-index :: exit 0
adr-index --report: OK — docs/adr/README.md is current, every record parsed, self-test 60 assertions green.
pnpm check:adr-anchors :: exit 0
check-adr-anchors: OK (132 anchored file(s), every governing ADR still referenced; 154 decision number(s), each naming one decision or an allowlisted pair
```

Baseline on the untouched tree: 3873 anchors, 1166 link destinations.
The amendment adds 6 anchors and 5 links.

</details>

<details>
<summary>The other derived commands (all exit 0)</summary>

```
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: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
```

`check:doc-formula-expressions` first exited 3, PREREQUISITE NOT MET
(two workspace packages unbuilt). They were built under the shared
verify lock (`VERDICT command-exit 0`, all five tasks from cache) and
the gate was run again: exit 0.

</details>

Tier H: `docs/adr/**` is a governed surface. This pull request is a
draft and stays a draft; the seat hands it to the approver.

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

<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufziBCAytAzzCu3iPBFR -->

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…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>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ts dashboards (objectstack-ai#37368)

Fixes objectstack-ai#36907

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 管理员在 Studio
的仪表盘列表点「新建」,会直接打开对应应用,「设计布局」已开、「添加菜单项」停在仪表盘一栏;建好的仪表盘挂在菜单上并进入编辑,点 × 回到
Studio 列表;手机宽度不出现「新建」,包里没有可打开的应用时也不出现,并写明原因。
- 属于「Studio 重构」专题,落实你定的「新建跳到设计模式加菜单」,让新仪表盘不会游离在所有菜单之外。
- 出错时管理员在 Studio 里可能新建不了仪表盘,或进不了设计模式;已有仪表盘、报表和菜单不受影响,纯前端改动,可直接撤回。
- 无

## What changes

The Studio dashboard list's New now uses design mode's existing 「Add
menu item → New dashboard…」 flow (objectstack-ai#36364), the maintainer's
「新建跳到设计模式加菜单」 (dashboard half). The report half (decision 13) is
unchanged.

**The arrival (`layout/designModeArrival.ts`,
`layout/useDesignModeArrival.ts`).** A second navigation-state arrival,
`designModeAddDashboard`, sits beside `designModeNewDashboard` and
carries the Studio list it came from. `ConsoleLayout` reads it once per
history entry through `useDesignModeArrival`. It first replaces the
entry without the arrival, so a reload or Back enters nothing. Then it
asks the mode to `enterOpening({ column: 'dashboard', studioReturn })`.
- ⛔ No URL enters design mode. The arrival rides navigation state only;
the landing address carries no `?studio=` and no mode.
- `enterOpening` is `enter` plus a one-shot "opening" held in the mode
store. Where `enter` refuses (an editor holds the mode out, PR objectstack-ai#36848),
nothing is held and the mode's own `designMode.editorOpen` toast says
why. On a phone the arrival is cleared and nothing more happens.
- The held-out count moved from state to a ref. An editor that opens in
the same commit the arrival lands in is then still judged (pinned;
ablation A5c below). `enter()` keeps its zero-argument contract: a click
event is never an opening.

**`DesignModeMenu`** takes the opening once (`useDesignModeOpening`). It
opens the picker on 「Dashboards」 for an entry at the end of the top
level, as that level's 「Add menu item」 would. A dashboard created from
that picker navigates with `withStudioReturn(href, studioReturn)`, so
the dashboard page's existing × goes back to the Studio list
(`?studio=`). Closing that picker drops the return, and later adds are
plain.

**Studio (`StudioAreaAppOpen.tsx`, `studioAppEdit.ts`,
`StudioMetadataArea.tsx`).** `StudioAreaAppTarget` gains `{ kind:
'new-dashboard' }`. `AreaCreate` sends `dashboard/new` through it, under
the same condition the report leg uses (`!readOnly || pairCreate`). It
replaces the Studio address with `/apps/SEGMENT` (`appHomePath`) and the
arrival.
- The app comes from decision 6 via `studioAppCreateSegment`.
- The `.custom` pair leg from objectstack-ai#37348 applies: a pair with no app of its
own reads its base's apps. That reading is factored into
`readStudioTargetApps`, which the item leg now shares too.
- With no app, or on a phone, the fallback is the area's own create, as
for a report.

**The list (`ResourceListPage.tsx`).** `useStudioDashboardNew` gates the
area's dashboard 新建 by the same reads. It never shows at phone width,
and it is not drawn while the apps are being read. With no target app
the header shows no 新建 and shows a `role="note"` reason instead
(`engine.list.dashboardNewNoApp`); the empty state says the same.

**Riders from seat 4's L1 on PR objectstack-ai#37348.**
- N1: the `StudioAreaAppOpen-36906` test header now says a pair row
opens in the base's app.
- N2: this changeset carries a note on the objectstack-ai#37237 entry: rule 1's menu
leg (the remembered app counts when its menu opens the item) applies on
the pair leg too.

Additive en and zh keys: `engine.list.dashboardNewNoApp` and
`engine.list.dashboardNewWiderScreen` (the phone empty state, from the
L1 S1 round) in the `studio` namespace (it is en/zh only). No server,
spec or route change.

## Read first

1. `ui/packages/app-shell/src/layout/useDesignModeArrival.ts`: the
consume-then-enter order. Risk: it navigates (replace) in the same
commit `AppRootLanding`'s redirect may navigate. Child effects run
first, so the landing redirect re-applies on the next render; see
Acceptance notes.
2. `ui/packages/app-shell/src/layout/designMode.tsx`: `enterWith` /
`enterOpening` / `takeOpening`, and `heldOut` moving to a ref.
3.
`ui/packages/app-shell/src/views/studio-design/StudioAreaAppOpen.tsx`:
the `new-dashboard` leg and `useStudioDashboardNew`.

## Tests

Pins, each with an ablation that turned it red (and restored
hash-verified through `scripts/ablation-replace.mjs`). Every file below
imports the subject from source, so no build or dist preflight applies:

| Pin | File (new top-level describe) | Ablation → red |
|:--|:--|:--|
| Studio 新建 lands in the target app, design mode open, dashboard column
open | `StudioAreaAppOpen-36906` (`dashboard list's New…`),
`DesignModeMenu-36363` (`the arrival…`) | A6 `AreaCreate` dashboard
branch off → 5 red; A1 `enterOpening` call removed → 6 red; A2 picker
kind `null` → 2 red |
| A created dashboard is in the menu and opens for editing, × back to
the list | `DesignModeMenu-36363` | A3 `withStudioReturn` dropped → 1
red |
| CONTROL: the report 新建 is unchanged | existing 36906 report-New tests
and pair report-New control; list control `CONTROL — the report list` |
(control: green under every ablation) |
| No 新建 at phone width | `ResourceListPage.pairCreate-36897` (`dashboard
list's 「新建」…`) | A8 phone read as false → 1 red |
| No 新建 without a target app, reason shown | same | A9 gate ignores
`no-app` → 3 red; A10 reason not drawn → 2 red |
| A refused `enter()` does nothing | `DesignModeMenu-36363` | A5 hold
ignored → 2 red; A5c render-time snapshot of the hold → the same-commit
pin red, the prior-editor pin green |
| The pair leg | `StudioAreaAppOpen-36906`,
`ResourceListPage.pairCreate-36897` | A7 pair leg off (Studio) → 2 red;
A7b (list) → 1 red |
| The arrival is consumed (reload / Back enter nothing) |
`DesignModeMenu-36363` | A4 replace removed → 4 red |

Moved by this change, and re-pinned rather than deleted:
- 36906's "a dashboard New is not this card" half is now the new
describe.
- 36906's "a dashboard made by the area's create … Back lands on the
list" runs at phone width, the one place the area's own dashboard create
is still reached from a list.

<details><summary>Local runs on the final head 6fbbdd9 (rebased on
d5ae7a4)</summary>

- `cd ui && npx vitest run --maxWorkers=2` over the 4 pinned files
(`DesignModeMenu-36363`, `designMode-36362`, `StudioAreaAppOpen-36906`,
`ResourceListPage.pairCreate-36897`) gave `Test Files 4 passed (4) ·
Tests 114 passed (114)` before the L1 S1 round. At the final head
`cc7bb340`, with the S1 and N2 pins added, the seat's L1 run over the
same files gives 119/119 passed.
- `pnpm --filter @object-ui/app-shell type-check` (both `tsconfig.json`
and `tsconfig.test.json`) gives lock `VERDICT command-exit 0`.
- The 156 app-shell/i18n test files that name a touched surface
(ResourceListPage, designMode, DesignModeMenu, StudioAreaAppOpen,
StudioMetadataArea, ConsoleLayout, studioAppEdit) were run on the
pre-rebase head `b0fc2e64`, giving `Test Files 156 passed (156) · Tests
1743 passed (1743)`. The rebase brought in one commit, objectstack-ai#37347, which
touches none of this PR's files. The full app-shell suite (2,431 files)
is left to CI's `Test UI` (a declared narrowing).
- Gates derived by `node scripts/pm/dispatch-gates.mjs --commands`: all
38 commands exit 0, run on `b0fc2e64`.
- Pre-push gates on `6fbbdd9b`: `pnpm check:test-source-alias` exit 0,
`pnpm --dir ui check:i18n-keys` exit 0, `node
scripts/pm/overlap-check.mjs` gives `VERDICT clean exit 0`. It reports
one open PR, objectstack-ai#37362, that shares the studio en/zh namespace files and
merges cleanly.
- In-flight branches, by `git merge-tree`:
  - `claude/issue-37139-studio-package-menu` merges clean.
- `claude/issue-36909-studio-pillar-dead-code` merges clean. It shares
`StudioMetadataArea.tsx` with this PR, in different hunks.

</details>

<details><summary>Ablations (each through scripts/ablation-replace.mjs,
restored, git diff HEAD empty)</summary>

- A1: drop the `enterOpening` call in `useDesignModeArrival` →
`DesignModeMenu-36363`: 6 failed | 50 passed.
- A2: `setPickerKind(null)` → 2 failed.
- A3: navigate without `withStudioReturn` → 1 failed.
- A4: drop the consuming `navigate(..., { replace: true })` → 4 failed.
- A5: `if (false)` in place of the held-out check → 2 failed.
- A5b: a held-out getter that always reads 0 → 2 failed.
- A5c: judge the hold at render time (`heldOutAtRender`) → only "the
same refusal when the editor opens in the very commit the arrival lands
in" fails among this card's pins. The prior-editor pin stays green.
- A6: `AreaCreate`'s dashboard branch never taken →
`StudioAreaAppOpen-36906`: 5 failed | 22 passed.
- A7: pair leg off in `readNewDashboardSegment` → 2 failed. A7b (list) →
`ResourceListPage.pairCreate-36897`: 1 failed.
- A8: `useStudioDashboardNew` reads no phone → 1 failed.
- A9: `canCreate` ignores `dashboardNew` → 3 failed.
- A10: reason note not drawn → 2 failed.

</details>

## Acceptance notes

- **Double replace at the app root.** `useDesignModeArrival` replaces
the history entry it read, in the same commit `AppRootLanding` may
redirect to the app's landing. Child effects run first, so the landing
redirect re-applies on the next render. In the browser, the showcase
landed on its first page (`/page/showcase_capability_map`) with the mode
on and `history.state.usr === null`. A self-built app whose menu holds
only links stays on `/apps/ID`, with the same result.
- **An app whose menu is split into `areas`** keeps its plain menu under
design mode, because `UnifiedSidebar` draws the editor only when
`areas.length === 0`. That predates this PR. There the arrival enters
the mode but no picker opens. No example app uses `areas`. See the
report's open question.
- **The arrival does not repeat the 「Design layout」 door's own gate**
(`useStudioEntryGate` and the customization wall). The Studio list's 新建
is already gated by `canCreate` (`walled`, `pairCreate`), and the server
judges every write again.
- **The held-out count moved from state to a ref** (`designMode.tsx`).
Nothing rendered from it; `enter` is the only reader. The existing 36692
pins pass unchanged.
- **The pair leg is applied to the dashboard New only.** A pair's report
New still falls back to the area's own create, pinned as CONTROL per the
dispatch's "report 新建 unchanged". Whether it should gain the leg is in
the report's open questions.
- While the package's apps are being read, the list draws no 新建, so a
no-app package never flashes one.

## Verification

- Browser walk on the showcase stack: `pnpm dev -- --fresh -p 38461`
(seeded admin), and the Console from `ui/` sources via `pnpm --filter
@object-ui/console dev` on :5180 pointed at it. Driven with Playwright
from a scratch script, not committed.
- **Showcase** (`com.example.showcase`, a read-only code package; the
HotCRM shape): Studio › dashboard list › 新建 lands on
`/apps/com.example.showcase/page/showcase_capability_map` with the
Design layout bar and the 「Add menu item」 picker on Dashboards (「New
dashboard…」 first). The history entry's state was cleared.
- Create lands on
`/apps/com.example.showcase/dashboard/walk_showcase?studio=/studio/com.example.showcase/metadata/dashboard?package=com.example.showcase`
in its edit state, with the × drawn. The entry is in the menu, and the
dashboard was saved to `com.example.showcase.custom`.
- A reload of that page shows no design bar. × returns to the Studio
list.
- **Self-built** (`com.walk.selfbuilt`, created through `POST
/api/v1/packages` with one app `walk_app`): 新建 lands on
`/apps/com.walk.selfbuilt` with the bar and picker. Create opens
`/apps/com.walk.selfbuilt/dashboard/walk_selfbuilt?studio=…`, and the
dashboard was saved to `com.walk.selfbuilt`. × returns to the list.
- **No app** (`com.walk.noapp`): no 新建, and the note reads "A new
dashboard is made in an app's design mode, so that it hangs in a menu.
This package has no app to make it in."
  - **Phone** (390 px): no 新建 and no note.
- Two-minute check: in Studio, open any package's Dashboards list and
press 新建. Expect the app with the purple Design layout bar and the 「Add
menu item」 dialog already on Dashboards.

---

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/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