Skip to content

feat(spec)!: actions that act on many records are placed at selection; a list view's bulkActions is retired - #38550

Draft
objectstack-fleet[bot] wants to merge 11 commits into
mainfrom
claude/project-thread-kko9wu
Draft

objectstack-fleet[bot] wants to merge 11 commits into
mainfrom
claude/project-thread-kko9wu

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #36496

Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: #38552

维护者速读

  • 用户能看到什么变化:同一对象的每个表格视图里,勾选多条记录后出现的批量操作栏都一样了,按对象统一配置的顺序排列;以前只在个别视图里出现的批量按钮,现在其它表格视图也会出现。非表格的列表(看板、日历等)现在要接上行删除(operations.delete / onDelete)才会出现批量删除;两个仓库里现有的视图没有一个受影响。
  • 为什么做:批量操作以前要在每个视图上各写一份清单,容易漏、顺序也不一致;现在由操作自己声明「可用于多选」,对象统一排序,替作者省掉逐个视图维护的麻烦。
  • 出错会怎样:旧写法在加载时会被拒收并给出改法,升级工具能自动搬迁源码;已存进数据库的视图记录不会自动改,会列为待办;按钮出现得比以前多属于预期,可回退本次合并撤回。
  • 要你做什么:无。

What changes

  • Spec. New action location selection (one dispatch per selected record). New third arm on the object's actionLayout: selection: { pinned, more } orders the multi-select bar. view.list.bulkActions and object.listViews.*.bulkActions are retired with retiredKey() tombstones (parse and tsc refuse them with the prescription). bulkActionDefs stays on the view, unchanged.
  • Retirement kit (ADR-0087). Protocol-19 conversion view-bulk-actions-to-action-selection (adds 'selection' to each listed action's locations, strips the key, writes the selection arm only when the lists' order differs from the default order); two RETIRED_KEYS_BY_MAJOR entries; D3 semantic entry view-bulk-actions-declared-on-the-action; liveness rows (view list.bulkActions dead/REMOVED, object actionLayout.selection.* added); generated baselines, docs, metadata form and i18n bundles regenerated.
  • Lint. action-dispatch-contract-mismatch judges actions placed at selection against execution; validate-object-action-layout checks the selection arm; validate-action-name-refs / validate-action-locations stop walking the retired key.
  • objectui. selectionBarActions() builds the bar from the object's actions placed at selection, ordered by the arm (pinned, then more, then order and served order); an authored bulkActionDefs entry claims its name first. ObjectGrid, SelectionBar, ListView (non-grid bar) and the app-shell header/toolbar/tabs read it. ListViewSchema.bulkActions is never; the list-view block's bulkActions input is removed. Studio's location dropdown offers selection.
  • Left as they are (seat ruling 05:06Z): the object-grid page component's bulkActions / batchActions keys, now on their own z.array(z.string()) schema (same describe) instead of a reference to the retired view slot.

Per-object list: views that gained the bar

  • showcase_task: 8 grid views, none sets selection, so multi-select is on for all. The 7 views other than bulk_actions (default, in_progress, urgent, done, legacy_row_actions, tabular, grid) now draw showcase_mark_done and showcase_recalc_estimate; bulk_actions draws the same two in the same order as before.
  • showcase_field_zoo: inline_bulk_defs gains the 10 predicate-gate actions; showcase_zoo_visible_string is drawn once, by that view's aggregate bulkActionDefs entry, which claims the name.
  • HotCRM: not touched by this PR (sister repo).

Tests

Head 6fee5a08a unless a line names another.

  • @objectstack/spec test: 913/913 files, 28895 passed (1 todo). Typecheck 0.
  • @objectstack/lint test: 246/246 files, 9959 passed. Typecheck 0.
  • @objectstack/platform-objects test: 130/130 files, 2218 passed.
  • @objectstack/example-showcase test: 49/49 files, 546 passed.
  • objectui, --maxWorkers=2 from ui/. The package sweep (plugin-grid, plugin-list, types, i18n, plugin-view, plugin-detail) ran before the main merges: 1493 files passed and 7 failed, all stale pins of the retired key. Those 7 plus app-shell ObjectView.* / objectView* / ActionPreview / inspectors / layout pins, the console registry parity test and useConsoleActionRuntime.bulkPausedScreens were then rerun: all green after the fixes in this PR. The last rerun was at 189a59bbf (332 tests in the 6 census files).
  • objectui type-check (dependency closure built first): types, core, i18n, plugin-grid, plugin-list, plugin-view, plugin-detail, app-shell all exit 0. The console type-check was not measured: its dependency closure was not built here, so CI runs it.
  • Conversion: applyMetaMigrations(stack, 18) on the showcase source gives 15 applied edits. The 12 listed actions gain selection, no list keeps bulkActions, and no arm is written. The output equals the hand edits in this PR.
  • Dogfood battery (pnpm --filter @objectstack/dogfood test, under the verify lock, no shard, no path) at 189a59bbf: VERDICT command-exit 0, Test Files 495 passed / 3 skipped (498), Tests 4183 passed / 68 skipped (4251). Two commits landed after it: the checklist JSON and two count lines in the platform-objects tests. Neither is a dogfood input.
Gates (derived by dispatch-gates --commands, 137 families)

137/137 exit 0, first run at 189a59bbf. Six were rerun at fb3430877f:

  • check-plugin-teardown-shape --self-test: 3 → 0, after fetching its pinned fixture commit.
  • ui vitest scripts/ and cli migrate-meta-engine-guidance: 99 (the lock was busy) → 0.
  • check:skill-examples and check:dual-build-cjs-loads: 3 (a prerequisite was missing) → 0, after building client-react, client, scenarios and studio.
  • check:platform-checklist: 1 → 0, after the matrix item was revised (see Acceptance notes).

dispatch-gates --ran: 137 derived, 137 run, 0 NOT-MEASURED, 0 UNRUN. Also green: check-platform-checklist --changed-from origin/main (53 anchors, 0 lost), check-nul-bytes, check:i18n, check:i18n-stale-fill, and check-sdui-manifest after regenerating.

Acceptance notes

Verification

Files to read first (by risk):

  1. ui/packages/plugin-grid/src/resolveBulkActions.ts — selectionBarActions(), the ordering and the name-claim rule.
  2. packages/spec/src/conversions/entries/19/view-bulk-actions-to-action-selection.ts — when the arm is written, and the TODO cases.
  3. ui/packages/plugin-list/src/ListView.tsx — the non-grid bar now built from selection plus a permitted Delete.

Two-minute check: pnpm --filter @objectstack/spec exec vitest run src/conversions should report the conversion fixture passing; in the showcase, open Tasks → any grid view, select two rows: the bar shows Mark Done and Recalc Estimate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5oz5vp6AYi9MqMxvmK

…d keeps the selection arm as held

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oz5vp6AYi9MqMxvmK
…data-form bundles after the main merge

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oz5vp6AYi9MqMxvmK
…LOCATIONS has seven words)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oz5vp6AYi9MqMxvmK
…out.selection row

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oz5vp6AYi9MqMxvmK
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation protocol:data protocol:system protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/lint, @objectstack/platform-objects, @objectstack/spec, touching 68 documentable anchor(s). ⚠️ 16 changed file(s) yielded no anchor (packages/lint/src/validate-list-view-field-refs.ts, packages/spec/authorable-surface/ui.json, packages/spec/docs/references/api/metadata.md, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

33 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4.

⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 16 changed file(s) yielded no anchor (packages/lint/src/validate-list-view-field-refs.ts, packages/spec/authorable-surface/ui.json, packages/spec/docs/references/api/metadata.md, …) — pages documenting those are invisible to this run
  • 17 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 253 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 181 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 832cd9f0481a56052235d2e3d73a7595eea8a215 — the merge of head 6fee5a08a9ae2f18077d52a3ac86cdf66e404de6 into base 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 832cd9f0481a56052235d2e3d73a7595eea8a215 && git checkout 832cd9f0481a56052235d2e3d73a7595eea8a215
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4 6fee5a08a9ae2f18077d52a3ac86cdf66e404de6 && git checkout -B drift-repro 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4 && git merge --no-ff 6fee5a08a9ae2f18077d52a3ac86cdf66e404de6

node scripts/docs-audit/affected-docs.mjs --json 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 4a43d6c33ab0528cabefdc42af7e81fdbb79daf4 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-project-manager · session_01FEkQ5oz5vp6AYi9MqMxvmK

CI on head 6fee5a08a9 · 2026-11-29T09:30Z: Test UI (2/16) is red, and the failure belongs to this PR. ui/packages/app-shell/src/views/metadata-admin/previews/__tests__/block-config.test.ts:365 ("record:quick_actions location: offers exactly the locations the spec declares") expects the Studio dropdown to equal ACTION_LOCATIONS. This PR adds selection to ACTION_LOCATIONS, and the dropdown (block-config.ts:628) does not offer it. 449 of 450 files passed on that shard.

What blocks the fix: the bar's location is ActionLocationSchema, so the spec now also accepts location: 'selection' on a record:quick_actions bar. Whether that bar may take selection at all is a contract question, and it is with the area and seat now. #38541 changes the same schema and dropdown (RecordQuickActionsLocationSchema = ActionLocationSchema.exclude(['record'])), so the fix lands on top of it. No fix is pushed until that ruling.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data protocol:system protocol:ui size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bulk actions declared on the action (selection) with a selection arm in the object action layout, moved from view bulkActions

2 participants