Repository navigation
feat(console): 「Edit app」 turns on a design mode in the running app (#36362) - #36397
Conversation
…6362) The shell holds the app's design mode: a bar with Design mode, Cancel and Save across the top, kept from page to page of the app, with an extension point surfaces stage their changes through. Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5 Co-authored-by: Claude <noreply@anthropic.com>
The design mode draws its bar in the same AppShell slot as AppHeader and keeps the sidebar below it on desktop; the source pins follow. Claude-Session: https://claude.ai/code/session_01QsR2jSr8sNCnJrK6Q9kEF5 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) on head Checklist
Spot checks
Deviations / owed before ready
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: ① Derived judgmentsRead: card #36362 (body + all 4 comments: notice, claim, triage, os-dev-report), PR #36397 body and its 23-file list, the net diff
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T10:23Z): head |
…lters a card does not follow (objectstack-ai#36405) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_ repo:objectstack#7 · zhuangjianguo · session_01QsR2jUeSU9HhKxjcVsyprx Fixes objectstack-ai#36372 Clause-②: yes (widening) — one new exported core function (`dashboardFiltersNotApplied`), two new optional `DashboardRenderer` props (`onWidgetResize`, `onAddFilter`), and new `@object-ui/i18n` keys (`dashboard.inPageEdit.*`, `dashboard.filters.notApplied`, `dashboard.filters.addFilter`); nothing removed or renamed Metadata-protocol: none ## 维护者速读 - 是什么:系统管理员在仪表盘页面上点「编辑」就能直接改:拖动和拉伸卡片、点卡片在右侧改属性、添加和删除卡片、添加和修改顶部筛选、设置每张卡片是否跟随页面筛选。「保存」后所有人立刻看到,不需要发布应用包;「放弃」丢掉全部改动。 - 为什么:以前改仪表盘必须进入工作室,管理员在看数据时发现问题要绕一大圈;现在在哪里看就在哪里改。 - 对已安装的应用:改动写进该应用的定制层(和工作室的「定制」写同一处),升级应用不会覆盖。点「编辑」本身什么都不写,定制层在第一次「保存」时才创建,所以「编辑」后「放弃」不留下任何东西。工作室不让定制的情况(本部署只有平台运营方能定制已安装应用、软件包列表没给出版本),页面也不进入编辑,并说明原因;如果工作室里已有这张仪表盘未发布的草稿,页面会提示先去工作室处理,不会替别人发布。 - 另外:每张卡片都会显示一个小标记,写明它不跟随哪些页面筛选(例如「不跟随『区域』筛选」),标记和卡片实际查到的数据用的是同一条判断,不会对不上。 ## What changes **Edit state on the dashboard page** (`DashboardView` + new `DashboardInPageEditor.tsx`). A workspace admin who may author metadata, on a package Studio lists (`useStudioEntryGate`, the gate of the app → Studio entries; writable or read-only, never a kernel package), gets an **Edit** button in the page header (from `sm` up: the edit state needs its side panel). Edit opens the dashboard **as stored** — the layered read's `effective` in the package a save would land in (a customization pair that is not listed yet, or does not hold it yet, opens its base's) — never the served, translated copy. **Opening writes nothing**: it reads the package list and the item only. In the edit state: - the header shows an **Editing** badge, the hint "Saved changes apply to everyone at once", and **Add card**, **Discard**, **Save** (Save is off until something changes); - every card draws dashed and is in the renderer's design mode: drag to move (the existing dnd-kit reorder), click to select, and a new corner handle resizes it by whole grid tracks; - the right panel is Studio's own dashboard panels, unchanged: `DashboardWidgetInspector` for a selected card (its data, the "follow page filters" switches, Remove) and `DashboardDefaultInspector` otherwise (label, cards, filters, layout); - **Add card** appends a card at the end (Studio's id and defaults) and selects it; **Add filter**, drawn at the end of the filter bar, opens the panel's Filters section. **Save** (`saveDashboardInPlace`) is the confirmed-save door of objectstack-ai#35955 (ruling 7058616478): the body is staged as the item's draft under the first-write pin and that one item is published in the same act — no package-wide publish-drafts. Where it lands is read at open by `resolveDashboardEditTarget` (package list only): the owning package when the list carries it writable, else the app's customization package, whose id is taken from the list when it is already listed (`listedCustomizationPairOf`, the read Studio makes of a pair). At Save, and only there, `ensureDashboardSaveTarget` asks the ensure door for the pair (it creates `<base>.custom` on first use, as Studio's first saved customization does), and the body declares `overrides: { package, basedOn }` (`overrideDraftBody`, the body Studio's Customize writes; ADR-0146 D2/D3). So an installed app's dashboard is edited too, through the same doors Studio uses. The edit state is refused up front where Studio's Customize is: the ensure door walled for this caller (`useCustomizeDoorWalled`, toast "only the platform operator can customize an installed app's dashboard") and a base listing no version to declare the override at when the item declares none yet (Studio's `noVersion`). Over a draft already pending there, the edit state is not entered, and a save that races one writes nothing (`'pending-draft'`): a Studio draft is never published on its saver's behalf. **Discard** drops the buffer and writes nothing. After a save the bundle re-read keeps the shown dashboard standing, so the page does not flash its skeleton. The edit state draws the stored document with the served `_packageId` beside it, so its cards' dataset queries keep naming the dashboard's package (`callerPackage`, ADR-0150 D3) as in view mode; a save drops `_` keys. **The not-filtered mark** (`plugin-dashboard`). Every card, in every mode, names the page filters that do not reach it ("Not filtered by Region and Owner"; zh 「不跟随『区域和负责人』筛选」): a filter it opts out of (`filterBindings[name]: false`) or one whose `targetWidgets` leaves it out (an explicit string binding wins over `targetWidgets`). The built-in date filter is named as the bar names it ("Date range"), never by its reserved name. The list is the new core `dashboardFiltersNotApplied(widget, defs)`, which asks `resolveBoundField` — the binding `buildWidgetScopedFilter` builds the card's query from — so the mark and the data cannot disagree. A card every filter reaches carries none. **Renderer design mode** gains two opt-in affordances: `onWidgetResize(widgetId, { w, h })` draws the corner handle (snaps as the pointer crosses half a track; arrow keys step by one; width clamped to the grid's columns; not drawn on a phone), and `onAddFilter()` draws "Add filter" in the filter bar (the bar is drawn for it even before any filter exists). Studio's canvas passes neither, so it is unchanged. **Persistence seam.** `saveAndPublishRuntimeMetadata` itself is unchanged: `saveDashboardInPlace` hands it a client that names the target package on the three writes it makes (draft, publish, discard of a refused publish). Studio is not touched; panel wording is objectstack-ai#36373's (not touched here). ADR: this realises the in-app half of the ADR-0146 D1 amendment row "ADR-0146 D1, \"Studio owns all metadata\"" that seat 7 filed on the weekly ADR card objectstack-ai#36086 (epic objectstack-ai#36359); no `docs/adr` edit here. Persistence stays on the ADR-0034 runtime metadata seam (draft + per-item publish through `/meta`). ## Tests - `ui/packages/core/src/utils/__tests__/dashboard-filters.test.ts` — `dashboardFiltersNotApplied` agrees with `buildWidgetScopedFilter` for default, opted-out, rebound, `targetWidgets`-listed and explicit-over-list widgets. - `ui/packages/plugin-dashboard/src/__tests__/DashboardRenderer.filters.test.tsx` — the mark is on the opted-out card and only it, a rebound card has none, a `targetWidgets`-excluded card has it, an opted-out built-in date filter reads "Not filtered by Date range"; each case reads the query's `runtimeFilter` beside the mark. - `ui/packages/plugin-dashboard/src/__tests__/DashboardRenderer.designMode.test.tsx` — the corner handle only with `onWidgetResize` in design mode, keyboard resize, no card selection from the handle; "Add filter" only in design mode, drawn before any filter exists. - `ui/packages/plugin-dashboard/src/designAffordances.test.ts` — `resizedSpan` snapping and clamps. - `ui/packages/app-shell/src/views/runtime-metadata-persistence.test.ts` — edit target read from the list only (writable package; read-only package with no pair listed: none named, ensure not called; a listed pair named for reading; unbound; refusal), the ensure door asked at save (pair with `basedOn`; refusal and non-writable pair throw), the save body, the target package named on draft/publish/discard, pending-draft writes nothing. - `ui/packages/app-shell/src/views/DashboardInPageEditor.test.ts` — opening (owner's layered `effective`; an installed app with no pair yet opens its base's reading no pair and with no ensure door at all; a listed pair that does not hold it opens its base's; refused when walled and when no version is listed, but not for an item that already declares its override; refused over a pending draft without reading; refusals), add card, resize keeps unnamed coordinates. - `ui/packages/app-shell/src/views/DashboardView.inPageEdit-36372.test.tsx` — through the real `DashboardView` and renderer: no Edit button behind the gate; Edit opens the stored document in design mode with badge and panel; resize + Save stages and publishes in the owning package and leaves the edit state; an installed package asks the ensure door at Save only and saves into `crm.custom` declaring the override; **Edit then Discard on an installed app calls the ensure door zero times and writes nothing**; a walled door refuses with its reason; a dataset card in the edit state still queries with `callerPackage` (ablated: red without the fix); a pending draft refuses; Discard writes nothing. ## Acceptance notes **Live run** (L1-e's REWORK) on head `f0750e0dd`: a fresh local showcase backend (`objectstack dev --seed-admin`, file DB) and the console from source (`ui/apps/console` Vite against it), driven by Playwright as the seeded admin. The writable leg uses a package created over REST (`com.example.livedash`, depending on `com.example.showcase`) holding an app and a four-card dashboard with one card opted out of the date range; the installed leg uses showcase's own `showcase_ops_dashboard` (`com.example.showcase`, listed read-only, version 0.1.0). | Acceptance | Reading | |---|---| | Writable: drag, widen, add, delete, Save | Dragged "Priority Mix" to the front, widened "Tasks all time" by its corner (192 → 400 px, `w` 3 → 6), added a Metric card (given its dataset and measure in the panel; Save without them is refused by the server, 422 `widgets.N.dataset`, shown in the "could not be saved" toast with that reason), removed "Tasks by Status" through the panel. Writes on **Edit**: none. Writes on **Save**: exactly `PUT /api/v1/meta/dashboard/livedash_board?mode=draft&package=com.example.livedash` (200, `state=draft`) then `POST …/livedash_board/publish?package=com.example.livedash` (200). No `/packages/:id/publish-drafts`. | | After a reload the layout holds | The served dashboard reads `w_priority, w_tasks, w_all_time (w 6), widget_1`; the page draws that order, the widened card, the added "Open tasks (added live)" and no "Tasks by Status". | | Installed app: Edit then Discard | Writes on Edit: none; package list before and after Edit → change → Discard: `["com.example.showcase"]` (no `.custom` created); the page shows the original titles. | | Installed app: Save lands in `<base>.custom` | Writes on Save: `POST /api/v1/packages/com.example.showcase/ensure-customization`, `PUT …/showcase_ops_dashboard?mode=draft&package=com.example.showcase.custom` with `overrides: { package: "com.example.showcase", basedOn: "0.1.0" }` (server: "Saved customization overlay"), `POST …/publish?package=com.example.showcase.custom`. After a reload the page shows "Total Budget (customized live)". Studio's Interfaces (`/studio/com.example.showcase/interfaces?surface=dashboard:showcase_ops_dashboard`) shows the same title, the "Overrides ObjectStack Showcase" badge and "Only customizations (1)". | | Discard after a change | Covered in the installed leg above: the page is as before and nothing is written. | | Mark on an opted-out time-filter card | "Tasks all time" (`filterBindings: { dateRange: false }`) reads "Not filtered by Date range"; no other card is marked. Last 90 days: follows 10, all-time 10; Yesterday: follows 1, all-time **10** (unchanged). | | Its switch turned on and saved | The panel's dateRange "Apply" checkbox on that card, then Save: the body's card has no `filterBindings`; draft + per-item publish only. After a reload: no mark on any card; Yesterday: follows 1, all-time **1** (now follows). | The live run found two defects, fixed in `f0750e0dd` and pinned: the mark named the built-in date filter by its reserved name ("dateRange"), and the edit state's dataset queries dropped `?callerPackage=` (the stored document carries no `_packageId`). **Screenshots** (live run, 2× scale) are in the project's shared files, under `repo-objectstack-7/shots/36372/`; they cannot be uploaded to GitHub from the cloud seat, as on objectstack-ai#36397. They replace the harness shots. - `live-en-edit-writable.png` — edit state on the writable dashboard: Editing badge, hint, Add card / Discard / Save, dashed cards, the widened card selected with its panel, the marked card. - `live-en-view-marked-card.png` — view mode with "Not filtered by Date range" on the opted-out card, under "Yesterday". - `live-en-edit-installed.png`, `live-zh-edit-installed.png` — edit state on the installed showcase dashboard (zh: 「编辑中」「保存后所有人立刻看到」, five cards marked 「不跟随「Task Status」筛选」). - `live-en-after-reload-writable.png`, `live-en-after-reload-installed.png`, `live-en-studio-interfaces.png`, `live-en-view-after-switch-on.png` — the after-reload and Studio readings above. **Known gap** (not in this card): leaving the page in the edit state with unsaved changes drops them without asking. objectstack-ai#36362's unsaved-edits seam (`useRegisterUnsavedEdits`) is the place to register it, in a later card. Undo, a business user's own copy, a new dashboard, chart drawing and drill-down are out of scope, per the card. ## Verification - At `f0750e0dd`: type check `@object-ui/app-shell` and `@object-ui/plugin-dashboard` green; `packages/plugin-dashboard/src`, the dashboard view / editor / persistence files, `core` dashboard-filters and `AppContent.dashboardRouteReads-28784` — 223 files, 2213 tests green; `packages/i18n/src/__tests__` 106 files green; `check-i18n-en-drift`, `check-i18n-call-site-keys`, `check-i18n-dead-keys` green. `overlap-check`: clean against main and 7 open PRs (objectstack-ai#36398 included). - At `3e7995a73` (before this round): `node scripts/pm/dispatch-gates.mjs --commands`, 72 derived families all run and accounted (`--ran`); four first-pass reds re-run exit 0 (comment-mask sweep reading a deleted harness file, `vitest run scripts/` killed for memory, `check:skill-examples` prerequisite, `check:test-source-alias` fixed in the tests). This round's diff (app-shell editor, two i18n keys in every locale, the mark's label, docs) is left to CI's gates. https://claude.ai/code/session_01QsR2jUeSU9HhKxjcVsyprx 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jUeSU9HhKxjcVsyprx --> --------- 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 Steedos · project thread
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSr8sNCnJrK6Q9kEF5
Fixes #36362
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
「Edit app」 in the page header no longer opens Studio for an administrator who may design the app (
useAppStudioEntry'seditposture: workspace admin,manage_metadata, writable package). It turns on the shell's design mode for the app on screen, in place.layout/designMode.tsx) is held byConsoleLayoutfor the app it was entered in: it survives moving between pages of that app, goes off (and drops what it held) when the app changes, and is never drawn on a phone (enabled: falsehides it and keeps what is staged). It has no address; no URL enters it.layout/DesignModeBar.tsx) is drawn in the AppShell's top slot, across the window, while the mode is on: 「Design mode」 at its left, 「Cancel」 and 「Save」 at its right, nothing else. 「Save」 is off while nothing is staged. On desktop the sidebar sits below the bar while it is shown, and the page header hides its 「Edit app」 button.useDesignModeChange(key): a surface stages a change under a key together with its owncommit. 「Save」 commits every staged change in the order first staged, then leaves; a failed commit stops there, keeps it and every later change staged, keeps the mode on and toasts the reason. 「Cancel」 drops all and commits none. Outside the mode nothing can be staged. This PR stages nothing yet; 设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363, 设计模式(四)页头按钮:选哪些动作固定在页头、哪些收进「更多」,可以拖动排序 #36366 and 设计模式(三)在「添加菜单项」里新建仪表盘、新建报表:建完落在占好的位置,直接进入编辑 #36364 build on it.chrome/unsavedEdits.ts), which gains an optionalkeeps(url)per registration: a link to another page of the same app does not ask (the mode goes along), a link out of the app and the app switcher ask, and a tab close or reload is held by the browser prompt.designMode.title,designMode.leaveUnsaved,designMode.saveFailedin every hand-written locale, zh-Hant generated.Read first, by risk:
ui/packages/app-shell/src/layout/designMode.tsx— the save loop (order, stop-on-failure, re-staged-while-sending) and the app-change reset.ui/packages/app-shell/src/chrome/unsavedEdits.ts—keepsonly narrows the click guard;confirmUnsavedLeaveandbeforeunloadstill ask for every registration.ui/packages/app-shell/src/layout/ConsoleLayout.tsx/UnifiedSidebar.tsx— the header slot and the sidebar offset while the bar is on.Tests
layout/__tests__/designMode-36362.test.tsx: the bar's contents; 「Save」 off until something is staged; commit order and exit; a failed commit keeps it and later ones, keeps the mode, toasts; 「Cancel」 commits none; nothing staged outside the mode; another app drops it; a phone hides it and keeps what is staged;beforeunloadheld only while staged; an in-app link asks nothing, a link to Home asks;isPageOfAppwith a basename.ShellPageActions-36111.test.tsx: in theeditposture 「Edit app」 is a button (not a link) that enters the mode and is hidden while it is on; a member sees nothing; the read-only eye entry is unchanged.UnifiedSidebar.favoritesMenu-12427.test.tsx: the Favorites section is hidden in design mode and back after.unsavedEdits-13231.test.tsx: thekeepsoption skips only the registrations that keep the URL.consoleTopBar.height-12639.test.ts: the two source pins admit the design mode's arm (same slot, same 48 px; the sidebar below it on desktop).Readings at d78b61b
consoleTopBar.height-12639: 12/12 passed.ConsoleLayout,UnifiedSidebar,ShellPageActions,unsavedEditsordesignMode, 184 files in 4 batches): 1,654 passed; the 2 reds (the top-bar source pins above) fixed in d78b61b and re-run green.keepscheck disabled inunsavedEdits.ts): 3 tests red; restored,git statusclean.turbo type-checkfor@object-ui/app-shelland@object-ui/i18n: 70/70 tasks green.pnpm build: exit 0.dispatch-gates.mjs --commandsderived 41 gates, all exit 0;--ranreconciliation: 41 derived, 41 run, 0 not measured.overlap-check.mjs: origin/main and 8 open PRs sharing files (fix(app-shell): ⌘B / Ctrl+B does what the sidebar's expand / collapse button does #36391 sharesConsoleLayout.tsxandUnifiedSidebar.tsx; the rest share locale files) all merge cleanly.Acceptance notes
editposture only, the gate 「Edit app」 always had. Apps in read-only packages (the showcase, apps installed from the marketplace) show the eye entry and cannot enter the mode. 设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 asks that installed apps' menus be editable through the customization layer; that needs the read-only posture to enter the mode too, and is raised with the card's seat rather than decided here.content/docshas none), so no docs change.Verification
Live run against a fresh local backend and the console (Vite), signed in as the seeded admin, on an app in a newly created writable package, at 1280 px and 1440 px: 「Edit app」 is shown in the page header; pressing it draws the bar (
Design modeCancelSave, 「Save」 off), the sidebar moves below it; moving to another page of the app keeps the bar; 「Cancel」 removes it and 「Edit app」 comes back. Screenshots of both states at both widths are in the project files atrepo-objectstack-7/shots/36362/(before-1280.png,before-1440.png,design-1280.png,design-1440.png).The card's 「PR 正文附截图」 is met by those files: a cloud container cannot upload images to the PR.
Two minutes: as a workspace admin, open an app in a package you created in Studio, press 「Edit app」 in the page header: the blue bar appears with 「Cancel」 and a disabled 「Save」; open another page from the sidebar: the bar stays; press 「Cancel」: the bar goes and 「Edit app」 is back. Open an installed app: the header still offers 「Open APP in Studio」.
🤖 Generated with Claude Code