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