Repository navigation
feat(app-shell): every metadata list on ObjectGrid; 新建 on a read-only base lands in its .custom pair - #36978
Conversation
…#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…grid's DOM (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
… flow dialogs (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…eader sort reads the label-first column (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…and page; a quick submit reads the namespace first (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…r; area create opens in the pair; changeset (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
… the area opens one in the pair (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…n the list suites (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…oll box and seam shadow (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…; the create-dialog enumeration reaches each live title by one site or more (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…olumn on the grid table Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
…gains hostCells and rowTint (objectstack#36897) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt Contract-review-claim: session_01WGufzhjqviExWpzQMm57Mt · head f1f1070 · 2026-11-24T15:45Z |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt Contract reviewServed-tier: This is the declaration face. The review is owed by the Inputs read:
Nothing was built, run or re-run. ① Derived judgments
② Semver level
③ Boundary flags
F1 has no effect on correctness or the contract, so this is the final round. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhjqviExWpzQMm57Mt 席位核对 — ACCEPT · repo:objectstack#3 · head f1f1070 · 2026-11-24T15:48ZL1: ACCEPT Read
Checklist
FindingsNo must-fix, no should-fix.
ux-E2 can land it on full green. It conflicts by design with nothing open now: #36983 is merged in. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x Landing: 2026-11-24T15:50Z · head f1f1070 · L1 ACCEPT 7136660900 · TIER_DEFAULT L2 PASS 7136626887 (nit F1; N1–N4 stay in the review record)
State: ready + auto-merge via the relay; on MERGED, #36897 closes by |
…rk (objectstack#36898) (objectstack-ai#36983) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB2BRcLs2zJH6mZWG94VVuew)_ Fixes objectstack-ai#36898 Part of objectstack-ai#36890 Clause-②: yes (widening) Metadata-protocol: none The widening: `MetadataListAnswer`, exported from `@object-ui/data-objectstack`'s entry, gains an optional `changedAt` member (an addition to that published package's public surface; precedents 36011-restore-factory-view, objectstack-ai#36846). No metadata an author writes changes, so `Metadata-protocol: none` and the patch level stand. Corrected in round 2 per L1-b (3) S1 (7133485320). repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x ## 维护者速读 - 搭建者在 Studio 和设置的元数据列表里,多了「修改时间」一列,可按它排序;有草稿的项下面标出「有未发布的改动」,AI 写的草稿单独标成「AI 的改动未发布」。 - 属于「Studio 重构」专题的列表部分,替搭建者回答「哪些项最近改过、哪些还没发布」。 - 出错时最多是时间显示为空或标记不显示,不影响打开、编辑和发布;可直接撤回。 - 无。 ## What changes - **「修改时间」 column** on the generic metadata list (Setup's catalog lists and Studio's "All metadata" area), read off the list answer's `changedAt` sibling (`GetMetaItemsResponseSchema.changedAt`, served since the list-response change for the card that added it). An item served from a stored row shows its time in the reader's locale (full instant on hover); a code-shipped item shows the empty-value dash, never an error. - **Sortable**: new sort key `changed` in `metadataListState.ts` (the seam the list-state change left): "修改时间(最新在前)" / "(最早在前)", in the address as `sort=-changed` / `sort=changed`. Items without a time sort last in both directions; ties read A to Z by name. `orderedListNames` runs the same `applyListState`, and the detail side (`useListOrderedNames`) now reads the same times, so ‹ › follow the drawn order (pinned). - **「有未发布的改动」 mark** beneath the time, from the existing `GET /api/v1/meta/_drafts` ledger — no protocol change; drafts that existed before this change are marked too (epic decision 14). Measured: Studio's `StudioPendingDraftsContext` wraps the area's list but not Setup's, and its rows carry no package or bundle member, so the list reads the ledger through its own metadata client (`listDrafts`, the read the client's draft reads already ask first; same scope as the list's items), re-read with the list and on the publish pulse (`emitMetadataRefresh`). - **AI vs person**: each marked item's strict draft read (`getDraft`, `draftChanges`) judged with `isAgentDraftSurface` — the rule `StudioAiDraftNotice`'s line uses (copilot or MCP build door ⇒ 「AI 的改动未发布」, violet with a sparkle; anything else or no recorded provenance ⇒ 「有未发布的改动」, amber). Not forked. - **Client reader**: `MetadataClient.listResponse` dropped `changedAt`; it now carries it (each entry parsed with the spec's own rule; absence stays absence). `list` unchanged; `list` and `listResponse` share one in-flight GET (measured in the browser: one `/meta/dashboard` request per list load). - New modules, each with its own test file named for the card: `listChangedAt.ts` (cell value, comparison, read hook), `listDraftMarks.ts` (ledger match + AI judgement + hook), `ListChangedCell.tsx` (the cell). Mounted in `ResourceListPage.tsx` with one header cell, one body cell and the reader member (15 lines) so the ObjectGrid re-host can move them as they are. `StudioDesignSurface.tsx` untouched. ## Screenshots (real boot, showcase app, deviceScaleFactor 2) Own backend on a random port, Console from this branch's `ui/` via Vite. Data written for real: a live save of `showcase_revenue_pulse` into `com.example.showcase.custom`; a person's draft (`surface=studio`) of `showcase_ops_dashboard`; an AI draft of `showcase_chart_gallery` saved through the MCP build door (`save_metadata_draft` with an OAuth token, `draftChanges[].by = mcp`). Both mark kinds and a time; code-shipped items empty:  Sorted newest first (`?sort=-changed`), items without a time last:  After publishing the AI draft: its mark is gone and its time appears at the top:   ## Tests Run on head `3671d2304` (after merging origin/main): - `pnpm --dir ui exec vitest run --maxWorkers=2` over the four new test files, `metadata-client.listRegistrations-12349`, `metadataListState-36896`, `useListScrollRestore-36896` and every `ResourceListPage.*` test: **Test Files 19 passed (19), Tests 130 passed (130)**. - `pnpm --filter @object-ui/data-objectstack --filter @object-ui/i18n --filter @object-ui/app-shell run type-check`: exit 0 (all three scripts echoed). <details><summary>Ablations (one-off, through scripts/ablation-replace.mjs, restored and blob-verified)</summary> - `listChangedAt.ts` missing-last flipped (`ta === null ? 1 : -1` → `-1 : 1`): 4 red — both sort-direction cases, the unparseable-time case, and the page's `?sort=-changed` order. Restored blob 8212f4d = before. - `listDraftMarks.ts` AI judgement removed (`some(() => false)`): 2 red — the copilot/MCP case and the page's AI-vs-person mark. Restored blob 9d8aae3 = before. </details> ## Acceptance notes - A person's **draft** save does not move the time: the list serves the published row (`changedAt` is that row's time); the mark shows instead, and the time moves on publish (screenshot 3). A live save moves the time at once (`showcase_revenue_pulse`). - An item that exists only as a never-published draft is not on the plain list at all, so it has no row to mark; unchanged by this card. - Bundle types: a row that declares no member matches a draft of any member of its name (the canonical member's spelling is not known to the list). - Line budget: 734 changed lines vs the ~600 S-card guide — about 400 source/locale/changeset lines and 335 test lines. Reported rather than trimmed. ## Verification Two-minute check: open `/studio/PACKAGE/metadata/dashboard` for a package with one stored item and one drafted item — the 修改时间 column shows the stored item's time, the drafted one carries 「有未发布的改动」; pick 「修改时间(最新在前)」 and the stored item moves to the top. Read first (by risk): `listDraftMarks.ts` (ledger match across a base and its `.custom` pair), `metadataListState.ts` (the `changed` sort branch), `metadata-client.ts` (`readChangedAt`). Overlap: `ResourceListPage.tsx` conflicts textually with the ObjectGrid swap's PR (objectstack-ai#36978, head 1137895); declared in both claims — whichever lands second merges the other. Its list-row test selector was checked against this branch's new test ids (they do not start with `metadata-row-`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…its subtitle (objectstack-ai#37079) Fixes objectstack-ai#37010 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:手机上打开工单、线索这类以公式字段作标题的列表时,卡片副标题不再重复标题里的内容,而是显示紧急程度、客户等下一批信息。 - 为什么做:手机列表卡片的标题与副标题重复,用户在一张卡上看不到记录的其他关键信息。 - 出错会怎样:最坏情况是手机卡片副标题少显示或多显示一列,数据与保存都不受影响,可直接撤回本改动。 - 要你做什么:无 ## What changes `buildMobileCardRenderer` in `ui/packages/plugin-grid/src/ObjectGrid.tsx`: when the object's declared name field is a `formula`, the card's subtitle skips every shown column whose field the formula reads, and takes the next shown columns instead. The reads are the formula's `record.FIELD` references as `collectPredicateFieldRefs` (`@object-ui/core`) names them, the same reader this grid's projection already uses for a CEL expression's reads (`objectGridQueryInputs.ts`); a read through a lookup (`record.account.name`) names the lookup, so its column is skipped too. This holds whether or not the formula column itself is shown. A name field that is not a formula reads nothing, so its card is unchanged. Status chip and amount line are untouched. Case list, as filed: title `CASE-00037 - Demo case 29 — critical problem`, subtitle `紧急 · Polar Cargo` (was `CASE-00037 · Demo case 29 — critical problem`). Changeset: `.changeset/37010-phone-card-formula-title-subtitle.md`, `@object-ui/plugin-grid` patch. Read first (by risk): 1. `ObjectGrid.tsx`, the `titleReads` block and the `subtitleColumns` filter in `buildMobileCardRenderer`. 2. `__tests__/phoneCardFormulaTitle-37010.test.tsx`. Two-minute check: `cd ui/packages/plugin-grid && pnpm exec vitest run --root ../.. packages/plugin-grid/src/__tests__/phoneCardFormulaTitle-37010.test.tsx` shows 3 passed. ## Tests New file `ui/packages/plugin-grid/src/__tests__/phoneCardFormulaTitle-37010.test.tsx`, through the real `ObjectGrid` card renderer at 375 px with the object schema served by the data source: - formula name field over the two leading columns: subtitle is `紧急 · Polar Cargo`; - the formula column shown as well: the subtitle still skips the formula's parts; - CONTROL: a text name field (`subject`) keeps `CASE-00037 · 紧急`. ## Acceptance notes - Reader choice: the platform's AST member reader for a formula's reads is `analyzeRelationshipTraversals` (`@objectstack/formula`), which `planObjectFormulas` in `@object-ui/core` uses. `@object-ui/plugin-grid` does not depend on `@objectstack/formula`, and adding it (its `package.json` and `pnpm-lock.yaml`) is outside this card's claimed file surface. This PR uses `collectPredicateFieldRefs`, already a dependency of this grid for the same question. The two readers differ only on spellings a name formula does not use in practice (a `record.FIELD` inside a string literal, a `data.FIELD` root); either difference can only skip a column, never draw a wrong value. - Seat decision on that reader question: option A, `collectPredicateFieldRefs`, the reader this grid's projection already uses, with no new dependency. - Overlap with objectstack-ai#36978 (also edits `ObjectGrid.tsx`): `scripts/pm/overlap-check.mjs` VERDICT clean exit 0, against origin/main and against objectstack-ai#36978. ## Verification All readings at head `84c9eec38eb`. <details><summary>New test file</summary> `phoneCardFormulaTitle-37010.test.tsx`: Test Files 1 passed, Tests 3 passed. </details> <details><summary>Ablation (one run)</summary> `scripts/ablation-replace.mjs` replaced the anchor `!titleReads.has(c.accessorKey)` with a marker. Anchor count went 1 to 0, blob `5fbd40d54cf4` to `52c21da6b1a0`. Result: 2 failed and 1 passed (the control). Both failures received `CASE-00037 · Demo case 29 — critical problem`, which is the filed defect. After restore the blob equals the HEAD blob (`5fbd40d54cf4`) and `git diff HEAD` is empty. The first attempt was a no-op that the tool refused (the replacement was a substring of the anchor), so no test ran then. It was redone with a distinct marker. </details> <details><summary>Package @object-ui/plugin-grid</summary> `type-check` (`tsc --noEmit && tsc -p tsconfig.test.json`) passed. vitest: Test Files 311 passed, Tests 2763 passed. </details> <details><summary>Derived gates</summary> `dispatch-gates --commands` derived 39 commands. On the first pass 37 exited 0. - `pnpm --dir ui exec vitest run scripts/` exited 1. Four tests in three files hit the 15000 ms timeout while the box was contended, and none of them touch this diff. Those three files were re-run under the lock: 231/231 passed. - `pnpm check:type-check-debt` exited 3 (lock queue-timeout, NOT MEASURED). The re-run under the lock exited 0. `--ran` reconciliation on the first-pass codes: 39 derived, 38 run, 1 NOT-MEASURED, 0 UNRUN. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…e widens after its rows are drawn (objectstack-ai#37253) Fixes objectstack-ai#37239 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:管理员在工作室「全部元数据」列表(例如共享规则)里,表格比可视区域宽时,右侧固定列前那道提示「右边还有列」的阴影现在每次都会出现;以前大约一半的打开次数不出现。 - 为什么做:夜间回归测试因此变红(共享规则列表在 1440 宽下的可达性检查),这是让它恢复的产品修复。 - 出错会怎样:最坏只是宽表右侧阴影不显示或多显示一次,不影响数据和操作;改动可直接撤回。 - 要你做什么:无。 ## What changes - `ui/packages/components/src/custom/use-horizontal-overflow.ts` (`useHorizontalOverflow`): the box re-reads its overflow when the box, each child of the box, **or each child's own children** resize. Before, it watched the box and its direct children only. - Why that matters: every table here sits inside the shadcn `Table` wrapper (`relative w-full`, `overflow-visible` inside a box that scrolls). The wrapper keeps the box's width, so when the table element widens past the box with no row added and the box unchanged, no observer fired, `overflowRight` stayed `false`, and `data-table`'s right seam shadow (`data-table-scroll-shadow-right`) was never drawn. - The same hook drives `HorizontalOverflowBox` (`data-overflow-right` and its edge or pinned seam), so a table placed in that box inside a wrapper (the approvals inbox mounts one that way) follows the table's width too. Pinned below; not measured live. - Changeset: `@object-ui/components` patch. ## Why Nightly `nightly-tiers` run 45554381420 (`0a1b69c0b`) failed `ui/e2e/live/declared-sharing-rules-reach-13091.spec.ts`: the seam shadow was not found within 5 s although the table's scroll box was wider than its client box. **Which suspect it is.** objectstack-ai#36978 (`c48f06c87`, the metadata list on ObjectGrid) is the change that exposed it, and is not itself wrong. It moved the list onto `data-table` and pointed the spec at `data-table`'s shadow. That shadow carried a latent defect in `useHorizontalOverflow`, and the new list's layout hits it about half the time. objectstack-ai#37089 (the permission set full-screen) is ruled out: it does not touch this list's grid or the overflow hook. Nothing else changed the data-table seam shadow between the last green nightly (`d9c799c10`, 2026-11-24) and the red one. The only other `data-table.tsx` edit in that window is objectstack-ai#37124 (the footer summary row), which does not touch the overflow read. **Measured DOM** (Chromium 1440x1000, this tree's Console against the workspace showcase backend, a requestAnimationFrame log of the scroll box from first paint): ``` before the fix, a failing open (12 of 20 opens ended like this): +1315ms sw=1134 cw=1134 child=1134 table=1134 rows=3 shadow=false rows drawn, the table fits +1331ms sw=2168 cw=1134 child=1134 table=2168 rows=3 shadow=false the columns widen the table +1384ms sw=1826 cw=1134 child=1134 table=1826 rows=3 shadow=false ...and it stays without a shadow a passing open: the table is already wider than the box when the rows draw (sw=1826 at the first frame) after the fix (20 of 20 opens with a shadow), the same sequence: +1379ms sw=1134 cw=1134 child=1134 table=1134 rows=3 shadow=false +1391ms sw=2168 cw=1134 child=1134 table=2168 rows=3 shadow=false +1427ms sw=1826 cw=1134 child=1134 table=1826 rows=3 shadow=true ``` `child` is the wrapper, the box's only child, and it stays at 1134 throughout. That is why the old read never ran. The scrollbar-at-rest read in `data-table` already observed the table element itself, which is why the bar showed while the shadow did not. So the product regressed, and the spec is unchanged. It still measures that the controls are in reach and that a seam shows while columns remain to the right. ## Tests - `data-table-scroll-shadow-12463.test.tsx`: a new top-level describe. A recording `ResizeObserver` calls back only the observers watching the element that resized, as a browser does. The table element alone grows past the box (no scroll, no row added), and the shadow is drawn. CONTROL: a table that grows but still fits draws none. - `horizontal-overflow-12708.test.tsx`: a new top-level describe, the same reading for `HorizontalOverflowBox` with a wrapped table. CONTROL: a resize of the wrapper itself still re-reads. Read first (by risk): 1. `use-horizontal-overflow.ts`: the nested observe loop. It adds observers on grandchildren and changes no read. 2. `data-table-scroll-shadow-12463.test.tsx`: the recording observer and the new describe. Two-minute check: `pnpm --dir ui exec vitest run packages/components/src/renderers/complex/__tests__/data-table-scroll-shadow-12463.test.tsx`. Expect 8 passed, including "draws the shadow once the table alone grows past the box". <details><summary>Unit and package runs at ddb6f6f: both pin files 15/15; the whole components package 510 files passed, 1 skipped; type-check green</summary> ``` pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/src/renderers/complex/__tests__/data-table-scroll-shadow-12463.test.tsx packages/components/src/__tests__/horizontal-overflow-12708.test.tsx Test Files 2 passed (2) Tests 15 passed (15) pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/ Test Files 510 passed | 1 skipped (511) Tests 4970 passed | 24 skipped (4994) os-verify-lock: VERDICT command-exit 0 pnpm --filter @object-ui/components type-check (tsc --noEmit && tsc -p tsconfig.test.json, the ui/ dependency closure built first) os-verify-lock: VERDICT command-exit 0 ``` </details> <details><summary>Local gate families at ddb6f6f: 38 derived, 38 run, every one exit 0</summary> ``` node scripts/pm/dispatch-gates.mjs --ran FILE Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. ✓ dispatch-gates --ran: 38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3). pnpm check:test-source-alias -> exit 0 node scripts/pm/overlap-check.mjs -> VERDICT clean exit 0 (origin/main; and with --pr=37168,37169,37166,37226: every one merges cleanly) ``` </details> ## Acceptance notes - Ablation (one run, both pins, `scripts/ablation-replace.mjs`): deleting the grandchild-observe line, `anchor 1 -> 0, blob 7965aaa -> aae15c0c6be7`, makes both new pins fail. The data-table one fails with "Unable to find an element by: data-testid=data-table-scroll-shadow-right", and both CONTROLs stay green (`Tests 2 failed | 13 passed (15)`). Restored: `blob == HEAD (7965aaa)`, `git diff HEAD` empty. Both test files import the hook from source, so no build is involved. - Size: 4 files, 182 changed lines (176+, 6-). - Deviation: part of the scratchpad logs (the raw Playwright and probe outputs) was deleted mid-session by a process this run does not own. The readings above were copied from those runs as they finished. ## Verification The stack the nightly boots, step for step: `ui/e2e/live/ci/start-backend.sh` (this tree's CLI serving `examples/app-showcase`, a throwaway database), the Console built with `VITE_BASE_PATH=/` and served by `vite preview`, then Playwright from `ui/` with `playwright.live.config.ts`, Chromium. <details><summary>Before the fix (main at d7f299c): the spec fails 5 of 10 repeats, with the nightly's error</summary> ``` playwright test --config=playwright.live.config.ts declared-sharing-rules-reach-13091.spec.ts --repeat-each=10 Error: expect(locator).toBeVisible() failed (Locator: getByTestId('data-table-scroll-shadow-right').first()) 5 failed 5 passed (57.3s) ``` </details> <details><summary>After the fix (Console rebuilt from this branch): 20 of 20, and the whole nightly list 28 of 28</summary> ``` playwright test --config=playwright.live.config.ts declared-sharing-rules-reach-13091.spec.ts --repeat-each=20 20 passed (55.0s) pnpm --dir ui run test:e2e:live:nightly (the 14 spec files console-live-specs.live.test.ts runs) 28 passed (1.7m) ``` </details> The backend and the preview server this run started were stopped by their recorded PIDs. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (CI) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: n/a. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYnxVj5xoUcFUWLa5Aw)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Yibo Wang · project thread
Fixes #36897
Part of #36890
Clause-②: yes (widening)
Metadata-protocol: none
The widening:
ObjectGridComponentProps, exported from@object-ui/plugin-grid's entry, gains two optional members,hostCellsandrowTint. Nothing existing is narrowed, and no metadata an author writes changes.维护者速读
What changes
@object-ui/plugin-grid— two generic host props onObjectGrid's table view:hostCells(a host draws a column's cells, keyed by the column's field) androwTint(a palette name per row; it wins overrowColor, and only palette names tint —rowTintClassinuseRowColor.ts). No product-named component.ObjectGrid(ResourceListPage.tsx, adaptermetadataListGrid.ts):MetadataListSourceanswers it; nothing is guessed from the first row), and each row is only its key plus its column values — the item, its package, lock and diagnostics are looked up by that key, never selected through the grid;applyListState(the one implementationorderedListNamesreads), in host mode (data+manualPagination+rowCount+onPageChange), so the grid never re-sorts and its visible order IS the detail's ‹ › order (pinned);sortparam (only the API-name/label column sorts; a label-first identity column sorts by label), page → apageparam, cleared on every list-state write;rowTintred/amber), the lock, identity cell, served/console-rendered columns, the Active switch (with its holder confirmation,CatalogActiveCellunchanged) and sharing-rule Clone are the page's host cells. Active and Clone share ONE right-pinned controls column, because the grid gives every right-pinned columnsticky right-0;.custompackage (ADR-0146 D3):MetadataListCreateDialog.tsx: object (with the organization-wide sharing default; joins its package's app menu only when NOT in a pair, as the Data pillar does) and flow (starting-point presets, Advanced trigger list, born off). On a read-only base both askensureCustomizationPackageand write to the answered package/namespace; a quick submit reads the namespace first instead of writing unprefixed;StudioMetadataArea:AreaCreateon a read-only base with a customization opens the pair's create (ensure once, then/studio/PAIR/metadata/TYPE/new; a refusal is shown in place); the area tells the listhost.pairCreateexactly where it does that, so the list never offers a dead 「新建」. A walled door offers none, as today;StudioDesignSurface.tsxand the pillar files split out of it are untouched (helpers imported from standalone studio-design modules only). Dashboard/report 「新建」 is not here.builtinComponents.tsx,anchors.ts,servedListColumns.tsxare read only.Since the first version of this body (head
1137895→f1f10706)systemorcloud) has no pair: the ensure door refuses it (409, ADR-0146 D3). The area now reads that scope from the listed manifests. It setshost.pairCreateonly for a read-only, non-kernel base whose door is not walled.AreaCreateopens the pair's create only under that same flag, so a kernel package's/newlands on the list. Pinned inStudioMetadataArea.routes-28561.test.tsx; it was CI's red onTest UI (7/16),StudioDesignSurface.metadataArea-28561.CreateItemDialog.oneLabel-11787.test.tsenumerates everyCreateItemDialogsite from source. An object and a flow are now created from their pillar AND from the list, so its CONTROL now asks that each live title is reached by one site or more, instead of exactly once. This was CI's red onTest UI (2/16).StudioMetadataArea.tsx; the resolution keeps itsAreaHistoryRedirectand this PR'sAreaCreateside by side.ListChangedCell,listChangedAt,listDraftMarks) is a page column (__changed) drawn by a host cell. It sits before Source, keeps the item's change time and its 「有未发布的改动」 mark (person vs AI), and looks up the bundle member by row key.changedkey. A new pin inResourceListPage.changedColumn-36898.test.tsxchecks that a header click orders oldest first with the code-shipped item last. Its existing cases read the grid's DOM, reaching the row byclosest('tr').applyListState, which now also sorts bychanged.metadataAreaHost.customizations-28568waited for the "only customizations" filter and then read rows synchronously. The grid draws its rows once its table is ready ("Loading grid…" first), so the test now awaits the row before reading its marks (3 cases).Tests
Final local run at
00e524f13.f1f10706after it changes only the changeset'sClause-②line.Every suite naming ResourceListPage + the #36898 helpers + adapter + create + area + grid + the enumeration test — 43 files / 508 tests pass; type-check green
The earlier runs on this branch, kept for the record. Run at
490aad241:ResourceListPage family + adapter + create + area + grid — 72 files / 544 tests pass
Earlier on this branch the whole
plugin-grid/srctree ran green with the metadata-admin suites (329 files).type-check — app-shell + plugin-grid green
New pins:
metadataListGrid.test.ts— the declared schema (a stray first-row key is not a field), the grid flags off, sortable only where the list sorts, sort round-trip, page clamp.ResourceListPage.listStateInUrl-36896.test.tsx(new describe) — the rows the table draws, in order, equal the detail's ‹ › names; a Label header click writessort=labeland the detail follows;page=2of 53 rows shows the last 3, a new search returns to page 1.MetadataListCreateDialog.pairCreate-36897.test.tsx— read-only base: ensure asked, pair package + pair namespace written, OWD carried, no menu join; CONTROL writable package: no ensure, menu join; flow preset into the pair, born off; a preset needing an object writes nothing.ResourceListPage.pairCreate-36897.test.tsx— 新建 offered on a read-only base (object/flow dialog, other type → area create), none withoutpairCreate; CONTROL Setup unchanged.StudioMetadataArea.routes-28561.test.tsx(new describe) — the pair's create opens from the ensure answer, a refusal shows in place, a walled door never asks,pairCreateset exactly then.rowAdornment-13330.test.tsx(new describe) — a host cell replaces its column only;rowTinttints palette names only; CONTROL without either prop.closest('tr')reaches the row) in 5 suites; the declared-sharing-rules pins read the one shared controls cell; the nightly live specdeclared-sharing-rules-reach-13091reads the grid'sdata-table-scroll-boxand its seam shadow (measured on the booted app below: Clone and Active inside the 1440 px viewport and box, overflow 1588/1390, shadow drawn).Acceptance notes
Size (against
origin/main, at00e524f13): 2195 changed lines (1771+, 424-):Largest type under
~all(HotCRM booted,GET /api/v1/meta/TYPEfor all 34 types):object136 rows (thenemail_template128,view125,hook88,flow54). The grid holds them in memory and pages 50 at a time —/studio/~all/metadata/object?page=3shows 36 rows, "Page 3 of 3".On the booted HotCRM the list showed "Couldn't read customizations: … answered a body its declaration refuses" — the server is the published
@objectstack/cli18.6.0 HotCRM pins, the console is this tree'sui/(version skew between a released server andmain's reader); the create path itself does not read it.ObjectGridgives everypinned: 'right'columnsticky right-0, so two right-pinned columns overlap; this list pins one. Noted, not filed (no second producer measured).The live HotCRM run made no approvals/lock API calls (network log of both creates: ensure → PUT draft → POST publish → user-preference PATCH only).
Declared deviations.
claude/issue-36897-list-objectgrid-shots(3c488ba2), and are embedded below by raw URL. The relay has no attachment upload.@objectstack/cli18.6.0) and this tree's console on Vite, the dogfood skill's authoritative-console route. The screenshots predate the Studio 重构(1-2b):元数据列表加「修改时间」列和「有未发布的改动」标记 #36898 re-host, so they show no 「修改时间」 column.2c60bdf3a. The ratchet subset re-ran later (test-source-alias,type-check-debt,type-check-coverage,undeclared-dep-imports,cross-package-test-inputs,published-files,nul-bytes), and CI runs the farm on the head.overlap-checkreported conflicts with the then-open PRs feat(app-shell): metadata list 修改时间 column and unpublished-changes mark (objectstack#36898) #36983 and feat(studio): one detail header and tool tabs for a metadata item #36977, not with main. Both have since merged into this branch.Verification
Booted HotCRM (
objectstack dev --seed-admin -p 4517, its own DB) with this tree's console on Vite (VITE_SERVER_URL), Chromium at deviceScaleFactor 2:crm_custom_site_visit, OWD pickerPOST …/hotcrm/ensure-customization 201,PUT /meta/object/crm_custom_site_visit?package=app.objectstack.hotcrm.custom)app.objectstack.hotcrm.custom, switched off, Start = manual~all: Active switch + Clone in the pinned controls column~allobjects, page 3 of 3 (136 rows)com.acme.fieldops: objectfops_work_orderand flowdispatch_techwritten to it (no ensure call)Read first (by risk):
ResourceListPage.tsx(the host cells +cellDrawsRef— the table keeps columns as state, so cells must be stable and read the latest draw through a ref),ObjectGrid.tsx(hostCelledColumns,rowClassName),MetadataListCreateDialog.tsx(createTarget).Two-minute check:
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/ResourceListPage.listStateInUrl-36896.test.tsx— expect 11 passed, including "the rows the table draws, in order, are the names the detail steps through".CI on
00e524f13: 40 success, 13 skipped, mergeableclean. Local gates: the 39 familiesdispatch-gates --commandsderives all exit 0 (--ran: 39 derived, 39 run, 0 NOT-MEASURED, derived zero);check:test-source-aliaswas red once on this branch and fixed by paying the@objectstack/lint/@object-ui/plugin-detailloads at collection in 6 suites; the vitestscripts/family was OOM-killed once beside the booted app and re-ran green (172 files). CI runs the farm.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x