Repository navigation
feat(studio): Save and Cancel in the item header, the AI assistant at the end of every title row - #37474
Conversation
… the end of every title row The Studio top bar's page controls move to the open page's own title row: Cancel and Save end the item header's action slot, and the AI assistant (or the right slot's show / hide icon) ends every title row behind a hairline, as the front end's page header ends with the shell's group. The surface still owns and builds them; only their place changes. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…d of the title row Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…e row with Save Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…e row Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
… not state set in an effect Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…udio-top-bar-tenants-rehome
… a portal The surface's root carries STUDIO_ACCENT, and body carries it while a Studio surface is mounted, so dialogs, menus, sheets, tooltips, toasts and the command palette draw graphite too; it comes off with the last surface. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4
|
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4 Final green head (2026-11-26T10:23Z): Area notes for L1:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 884c4bd · 2026-11-26T10:25Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: PR #37474, card #37455 (epic #37424). Read: the card's body and its four comments (triage 7184485694, claim 7184943508, the two os-dev reports 7185774932 and 7189264702; no amendment comment exists), the epic's body, ADR-0084's amendment of 2026-11-26 on Check-runs on the head: 55 runs, 40 success, 15 skipped, 0 failed, 0 pending. That is 38 distinct names green and 13 skipped; Findings, graded:
① Derived judgmentsThe top bar against the amendment's table of seven tenants. This card moves two rows of that table and must leave the other five alone (card: "do not restyle it").
Access and visibility. Nothing is shown to anyone who could not see it before. The controls are built by the surface under the old conditions and only placed by the rows. Outside the surface the context is null and the rows draw nothing (control case in The one-owner registry ( The accent scope. Right.
Public surface. None changes. ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4 Landing (2026-11-26T10:34Z): area ux-37424 marks PR #37474 ready and arms auto-merge on head |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45802787226 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4 Re-queue (2026-11-26T10:58Z) after queue build 45802787226 failed (triage 7190081189). The failing assertion is |
…irline; pin the title-row tenants outside studio-design (objectstack-ai#37542) Fixes objectstack-ai#37520 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:应用搭建里元数据列表页和详情页的标题行,若这一行自己没有按钮或统计,末尾 AI 助手按钮前不再多画一条孤零零的分隔竖线;其余全是测试补强,用户无感。 - 为什么做:属于「Studio 顶栏迁出」这一系列工作的收尾:上一轮把保存和 AI 按钮搬进了各页标题行,但其中几处位置、面板开关、深色模式和多页面同时挂载的配色计数都没有测试守护,删掉也不会有任何报警。 - 出错会怎样:最坏情况是某个标题行多一条或少一条分隔竖线,不涉及数据和权限,可以直接撤回。 - 要你做什么:无。 ## What changes Pins for the Studio title-row tenants that PR objectstack-ai#37474 placed outside `studio-design/**`, plus one product change (N3), as the contract record on objectstack-ai#37474 asked (findings S1, S2, N1, N3, N4). - **N3 (product, `PageShell.tsx` only):** both PageShell rows (compact and list) now pass `divider` to `StudioTitleRowEnd`, computed from the row's own stats and actions. A row with neither draws the assistant with no hairline before it; Save still brings the hairline, as `StudioTitleRowEnd` already counts it as an action. This matches what the item header and the directory header already do. Outside Studio nothing changes (the row end draws nothing there). - **S1:** with no copilot served, the slot toggle (`studio-slot-toggle`) ends the flow page's title row behind a hairline, is absent from the top bar, is the only one on the page, and hides and shows the slot (aria-pressed and accessible name follow). Control: with a copilot served the same row ends with the AI assistant and no toggle. - **S2:** PageShell's compact row (actions, Save, hairline, assistant, in the right-aligned group) and the `!embedded` gate on both rows (an embedded row draws neither Save nor the assistant); the directory header (assistant with no hairline; Save then hairline then assistant; control outside Studio); the diagnostics header (assistant last, after Refresh, behind a hairline; control outside Studio). - **N1:** two components holding the accent on `body`, one unmounted: `body` keeps the classes and the marker; the last unmount removes both. Control: one mount and unmount leaves `body` as found. - **N4:** dark mode as far as the DOM can say it: the `dark:` variant is read from the app shell's stylesheet; under the `dark` class on the page root, the surface root and `body` both match the variant and carry the accent's dark declarations (graphite `--primary` and `--ring` from `STUDIO_ACCENT_HSL.dark`). Control: under the light theme neither matches. Each new pin went into the existing harness file for its component as a top-level `describe` (ruling record 6583487846), so no new test file is added. Read first (by risk): 1. `ui/packages/app-shell/src/views/metadata-admin/PageShell.tsx`, the `rowHasOwnControls` hunk: the only product line. 2. `StudioDesignSurface.graphite-37455.test.tsx`, the dark-variant block: it reads `styles.css` and matches the variant selector by selector (see Acceptance notes). 3. `StudioDesignSurface.pillarsClaimSlot-12725.test.tsx`, the S1 block. Two-minute check: `cd ui && pnpm --filter @object-ui/app-shell exec vitest run --root ../.. packages/app-shell/src/views/metadata-admin/PageShell.narrowHeader-12306.test.tsx` shows 13 passed, among them the two `N3` cases. ## Tests All on head `b74f7ff4c7`. Nine ablations, each through `scripts/ablation-replace.mjs` (mutation proven on disk, restore proven against HEAD), each turned its pin red: | Ablation | Mutation | Red cases | |---|---|---| | A1 slot toggle | the toggle arm returns null when no copilot is served (`StudioDesignSurface.tsx`, mutation only, restored) | S1 case | | A2 compact row end | the compact row's `StudioTitleRowEnd` replaced by `null` | 4 (compact order, N3 compact, N3 stats control, Save control) | | A3 compact embedded gate | `!embedded &&` dropped on the compact row | embedded compact row | | A4 list embedded gate | `!embedded &&` dropped on the list row | embedded list row | | A5 N3 guard | `rowHasOwnControls = true` | 2 (N3 compact, N3 list) | | A6 directory row end | its `StudioTitleRowEnd` deleted | 2 (both directory cases) | | A7 diagnostics row end | its `StudioTitleRowEnd` deleted | diagnostics case | | A8 accent counter | the `mountedSurfaces > 0` early return deleted (plain add/remove) | two-mount / one-unmount case | | A9 dark declarations | `dark:[--primary:220_9%_83%]` removed from `STUDIO_ACCENT` | dark-theme case | (A2's first attempt was refused by the tool before any run, because its replacement was a suffix of its anchor; it was rerun with a distinct replacement, row above.) <details><summary>Suite and typecheck readings</summary> - The five touched suites plus every app-shell test that renders `PageShell` or reads the row end, divider or toggle (15 files): `Test Files 15 passed (15)`, `Tests 240 passed (240)`. - `pnpm --filter @object-ui/app-shell type-check` (both `tsc --noEmit` and `tsc -p tsconfig.test.json`, which compiles the tests): `VERDICT command-exit 0`. </details> ## Acceptance notes - happy-dom does not match a descendant combinator inside `:where()` (measured: with `dark` on the page root, `body.matches('.dark *')` is true and `body.matches(':where(.dark, .dark *)')` is false). The dark pin therefore splits the variant's selector list and matches each selector, which is what `:where()` means. The light-theme control rules out a pin that passes because nothing matches. - The S1 pin lives in the slot-claim harness because the flow designer claims the slot from the start (its Configuration), so the toggle is drawn there with nothing selected; the right-slot harness has no page that does. - The A1 ablation mutated `StudioDesignSurface.tsx` on disk for one run and restored it to HEAD (blob proven equal); the diff does not touch that file, nor `studioMenuModel.ts` or `StudioPackageMenu.tsx`. - `origin/main` moved to `1af67b26cd` after the branch point; the incoming app-shell change (`ResourceListPage.tsx` and a new record-section module) touches no PageShell prop and none of these files, so the branch was not re-merged. ## Verification <details><summary>Derived gates (dispatch-gates --commands, head b74f7ff)</summary> 38 derived commands, every one exit 0, plus `pnpm check:changeset-fixed` (its roster sits under `.changeset`) exit 0. `dispatch-gates --ran`: 38 derived, 38 run, 0 NOT-MEASURED (a derived zero: all 38 recorded an exit code), 0 UNRUN. The ui `scripts/` family: `Test Files 172 passed | 2 skipped (174)`. CI families (Test UI, Type Check UI, Lint UI and the rest) are read from this PR's check-runs, not re-run locally. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Requested by Bill · project thread
Fixes #37455
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
The Studio top bar's page controls move to the open page's own title row. The surface still owns and builds them (save coordinator, right slot, robot control); only their place changes, so their logic is untouched and the two cards that change the save controls next (#37440, #36660) rebase onto
studioSaveBar.tsxunchanged.studioTitleRow.tsx.StudioTitleRowProvider(mounted byStudioDesignSurface) hands the rendered controls to the page's title rows. Every title row registers its row element, and only the first in document order draws the controls, so a page never draws two Saves (a header nested in the page's own, or an embedded compact row, draws nothing). Outside the surface nothing is drawn, so Setup's metadata pages are unchanged.StudioItemHeader's right-aligned action slot, after the pillar's actions (the detail header's ‹ ›, primary button and ⋯). Per the area PM's increment (ADR-0084 amendment draft, PR docs(adr): ADR-0084 amended — App Studio is the entry for developing a package; two columns, no top bar #37470), a page that saves with no item header ends its own title row with them (StudioTitleRowEnd).PageHeaderends with the shell's button group (外壳(一)页面头部:报表和自定义页面补上统一头部;每页右上角固定一组按钮(评论、编辑应用、AI、帮助) #36111): the item header, the list page's title row (PageShell, list and compact rows, not when embedded), the directory and diagnostics headers.main(with App Studio 改版(1-1):左侧菜单照前端样式——分组标题可折叠、线条图标不带底色、选中用胶囊加竖条;定义 Studio 专用石墨色 #37452'sSTUDIO_ACCENT) is merged once (99c3443). The accent is mounted on the Studio root (theStudioMenuProviderframe inStudioDesignSurface), so every button, link, hover and focus ring inside Studio reads graphite under any app theme.body, outside the root, and the@object-ui/componentsprimitives take no portal container (giving them one is outside this card's surface). So the newstudioAccent.tsputs the same classes (and adata-studio-accentmarker) onbodywhile a Studio surface is mounted, counted per surface, and takes them off with the last unmount. The app's inline branding on the page root is never touched, so nothing needs repair when Studio leaves.Tests
StudioDesignSurface.saveBar-36511: re-pointed, not weakened. Cancel and Save are asserted inside the object page's item header (data-object-header), absent from the top bar, drawn exactly once, and Save is still the last action (only the assistant follows). The draft case still asserts Changes and Publish in the top bar and that Publish waits for Save.StudioDesignSurface.rightSlot-12725: a new top-level describe. On the sharing overview the AI assistant ends the item header behind the hairline, is absent from the top bar, and still hides and shows the slot. On a list page it ends the list's title row, inside the page.studioTitleRow.test.tsx(new): the order in an item header (pillar actions, Save, hairline, assistant); no hairline with nothing before it; nested and later rows draw nothing (one Save, one assistant); the outer header of a nested pair wins; the next row takes over when the first goes; a page with no item header ends its own row with Save; and the control: outside the surface nothing is drawn.StudioDesignSurface.graphite-37455(new): the app's theme is written by the app shell's ownuseAppShellBranding(rose primary, amber accent), not by hand. CONTROL: that theme is on the page root and is not graphite. The Studio root carries every accent class and contains the header, the page and the AI button. The command palette (portalled) is outside the root and sits under the accent onbody. Studio unmounted: every accent class and the marker leavebody, and the page root's--primaryis as the app wrote it.git diff HEADempty): root class removed, 2 red (root, portal); body hook removed, 2 red (portal, unmount); the cleanup's remove line deleted, 1 red (unmount).StudioDesignSurface.tsx,StudioItemHeader.tsxandPageShell.tsxrestored to the base commit, 9 of the 13 new or re-pointed cases go red (the 4 that stay green are the outside-the-surface control and the unchanged slot cases); restored,git diff HEADempty.Readings
PageShell, the directory, diagnostics or list pages, or the save harness:Test Files 242 passed (242),Tests 2052 passed (2052).pillarsClaimSlot-12725,PackageOwdOverviewPanel.partialSave-36511andAutomationsPillar.saveCancel-36511:Test Files 6 passed (6),Tests 39 passed (39).@object-ui/app-shelltype-check(sources and the test project): exit 0.graphite-37455,saveBar-36511,rightSlot-12725,studioTitleRow,StudioMenu:Test Files 5 passed (5),Tests 54 passed (54).@object-ui/app-shelltype-check:VERDICT command-exit 0.dispatch-gates.mjs --commands, 39 families at 884c4bd): every one exit 0;--ranreconciliation:39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero ...).cancelled", because the next push (e9b4ad7) cancelled that run. No test failed on it.Acceptance notes
⌘.still opens and switches the slot there.bodyclass, not a portal container: the primitives take none, and adding one is outside this card's surface. A portal container inside the Studio root would make thebodyclass unnecessary.htmlfalls back to the default blue on entering Studio. Studio still draws graphite over that default, as the readings below show; the jsdom pin covers the case where the app's branding stays on the page root.studio-design/; they are the "list title row" of their pages and get one line each.Verification
Read first, by risk:
studioAccent.ts: thebodyclass while Studio is mounted, and its counted cleanup (a leak would tint the app's own pages graphite).StudioDesignSurfacehunk that mountsSTUDIO_ACCENTon the root and buildstitleRowSave/titleRowAssistant.studioTitleRow.tsx(the one-owner registry) and theStudioItemHeaderaction-slot hunk.Real-browser readings (Chromium, deviceScaleFactor 2, light and dark)
Backend:
examples/app-showcase(objectstack dev), console from this branch. The showcase app is the branded app used (its branding is violet#7C3AED); no example app writes its theme any other way. A writable packagecom.acme.studio-demowith one objectsdemo_taskwas created through the API to show Save and Cancel. Shots:shots-37474/on the project's card folder.html --primarybody --primary262 83% 58%, dark262 73% 65%(inline)bodycarries no accent211 100% 50%, dark211 100% 60%220 9% 23%, dark220 9% 83%rgb(53, 57, 64), darkrgb(208, 210, 216)bodyaccent, its--primarylight220 9% 23%, dark220 9% 83%studio-title-row-end)NOT MEASURED in the browser: the AI assistant button and the right-slot toggle. The showcase backend serves no copilot, and none of the opened pages claims the right slot, so neither control is drawn there; their place is pinned by
rightSlot-12725andstudioTitleRow.Two-minute check: from a branded app, open an object in Studio (
/studio/PACKAGE/metadata/object/NAME) and change its label on Settings: Cancel and Save appear at the right of the object's header, the top bar shows neither, and Save, the active menu item and the ⌘K palette are graphite, not the app's colour; with a copilot served, the robot sits at the far right after a hairline.Generated by Claude Code