Skip to content

fix(plugin-grid): list pages lift record_row actions without a selection column - #39717

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-39435-list-row-actions-no-selection
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-39435-list-row-actions-no-selection

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #39435

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员在「在线会话」「邀请」「API 密钥」这类列表页上,行首多了单选勾选框,勾中一行后底部操作条直接给出撤销会话、复制邀请链接等操作,不必再右键。
  • 为什么做:列表页去掉行尾「⋮」之后,这几张设置列表既没有勾选框也没有操作条,它们的行操作只能靠右键找到,丢失笔记本时撤销会话、未配邮件时复制邀请链接都找不到入口。
  • 出错会怎样:最坏是某张列表多出一列勾选框或行尾菜单,不影响数据,随时可整体撤回。
  • 要你做什么:无

What changes

On a list page the grid draws no row-end control; one selected row lifts its actions into the selection bar. A list page grid whose view authors no selection (and no legacy selectable) and whose bulk actions open no selection had no way to select a row, so its declared row actions were reachable only through the row's right-click menu (sessions, invitations, API keys in Setup).

  • objectGridActionsColumn.tsx: the per-row offer verdict (capability gate, per-record predicates, record-level verdicts, the plan RowActionMenu renders from) moves into its own plain function, resolveObjectGridRowActionOffer, which the Actions column now calls. It adds one read: does a row on screen offer a declared row action (an inline button or a custom menu item; the built-in Edit / Delete aside).
  • ObjectGrid.tsx:
    • usePredicateScope() and useCapabilityGate() move up, above the selection mode (unconditional hook calls, same order on every render, still above every early return), so the selection mode can read the offer.
    • New selection arm after the bulk arm: on a list page grid with no authored selection and no bulk-opened selection, rows that offer a declared row action get 'single' selection, so singleRowMenu applies. selectionAvailable follows it (published true there).
    • Explicit off (selection.type: 'none', or legacy selectable: false) on a list page: drawRowControls is true again, so the row keeps its own "⋮" (the Actions column still draws only when a row offers something).
  • Unchanged: views that author their own selection, lists whose bulk actions already open a multi-selection, grids outside a list page (related lists, page blocks, the record drawer), the phone card face (it already draws its own "⋮"), and the record side panel's More actions menu (out of scope per the claim).

Tests

New file ui/packages/plugin-grid/src/__tests__/ObjectGrid.rowActionsNoSelection-39435.test.tsx (real grid, table, selection bar and menus; the page column is a fixture on the same useListPageScope the Console page bars call):

  • list page + declared row action + no authored selection: still no Actions column / row trigger; the row has a checkbox; selectionAvailable is true; ticking it shows the bar with the row's action.
  • the selection is single: a second pick replaces the first.
  • explicit off (selection.type: 'none' and selectable: false): Actions column and row trigger drawn, no checkbox, selectionAvailable false.
  • CONTROLS: no row actions; only the built-in Edit; a row action hidden on every row; a grid outside a list page. None gains a selection column.

Ablations (one per changed behaviour, each via scripts/ablation-replace.mjs, mutation landed and restored to the HEAD blob each time):

  • selection arm disabled: the two selection tests go red (2 failed, 5 passed).
  • explicit-off arm reverted to the old drawRowControls value: the two explicit-off tests go red (2 failed, 5 passed).
  • declared-action read widened to any offered action: the Edit-only control goes red (1 failed, 7 passed).
Test runs at 9aea5db
pnpm --dir ui exec vitest run packages/plugin-grid/
 Test Files  324 passed (324)
      Tests  2869 passed (2869)

pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView. packages/app-shell/src/views/objectView
 Test Files  117 passed (117)
      Tests  1030 passed (1030)

pnpm --filter @object-ui/plugin-grid run type-check   (tsc --noEmit && tsc -p tsconfig.test.json; the new test file is in the second program's file list)
 exit 0

Acceptance notes

  • Scope of "row actions" for the new selection default: only declared row actions (an object action placed at record_row, or a legacy rowActions name the object resolves). The built-in Edit / Delete alone do not open a selection, because the opened record offers both. A first cut counted Edit too, and it reddened ObjectView.bulkChangeOwnerReach-35403's CONTROL ("an object that does not offer Change Owner draws no checkboxes"), where the user may edit but not delete. That pin stays as it was.
  • The offer is read from the rows on screen, the same verdict the Actions column uses elsewhere. So selectionAvailable is false until the rows load and a row offers a declared action. A list whose rows all hide their action by predicate stays unselectable.
  • Searched existing pins for list pages with no checkbox: selectionBar-35678, listGridFirstRender-37575 (its fixture now gains a checkbox; the test pins only that no row-end control enters the DOM, and it stays green), rowMenuApprovalLock-36911, ObjectView.headerSelectionGate-27831 (its unselectable view uses selection.type: 'none', so it now gets row controls and stays green), e2e/list-no-actions-column-35554.spec.ts and e2e/list-narrow-pinned-columns-35446.spec.ts (authored selection or no list page scope, so unaffected), and the live e2e specs (they right-click, which still works). None conflicts.
  • The record side panel's More actions menu is not touched (claim scope note).

Verification

Read first, by risk:

  1. ui/packages/plugin-grid/src/ObjectGrid.tsx: the new else if (listPageGrid && rowActionOffer.anyRowOffersDeclaredAction()) selection arm, selectionAuthoredOff, and the hoisted usePredicateScope / useCapabilityGate calls.
  2. ui/packages/plugin-grid/src/objectGridActionsColumn.tsx: resolveObjectGridRowActionOffer, which the Actions column now calls, behaviour-identical for the column.
  3. The new test file.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/ObjectGrid.rowActionsNoSelection-39435.test.tsx. Expect 8 passed. In the Console, open Setup and then the online sessions list: each row has a checkbox, and ticking one shows Revoke session in the bottom bar.

Local gates at 9aea5db (dispatch-gates --commands, reconciled with --ran)
Run reconciliation — 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED
pnpm --dir ui run check:new-line-citations
VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only -> exit 0
eslint (ui) on the three touched files: 0 errors

CI families (Lint UI, Type Check UI, Test UI, Build & E2E UI, Lint & Repo Gates, …) are not re-run locally; read them off this PR's check-runs.


🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39717 · Head-sha: 9aea5db246243a53072571f7d286aa1b064c7c66 · 2026-12-04T14:22Z

Verdict: ACCEPT, on green, with one bookkeeping step owed before landing. The zone lands it once every check on this head concludes with none failed. When I read it, 19 checks were pending, and the Dogfood Regression Gate matrix name was not yet expanded; re-read both at landing.

Face. The PR is Clause-②: no and Metadata-protocol: none at TIER_DEFAULT, so no L2 is owed. Rendering defaults change only in @object-ui/plugin-grid, which carries a patch changeset, and claim 7412605258 covers all 4 files. The changeset's three bullets match the code.

The three points the zone asked about:

  1. Single selection opens only for a declared row action. It opens only where no selection or selectable is authored, no bulk action opened one, and anyRowOffersDeclaredAction() holds. That means plan.inline or plan.custom from a gated declared def; the built-in Edit or Delete alone does not count. This is an accepted deviation from the card's "either" wording, and it is the right call: the opened record already offers Edit and Delete, and it keeps the bulkChangeOwnerReach-35403 CONTROL (a plain editable list draws no checkboxes).
  2. Authored selection-off draws the row's own controls (drawRowControls: !listPageGrid || selectionAuthoredOff). This is the one case where 列表取消「操作」列:选中后在页面栏换操作、右键菜单;默认滚动加载、记录数在视图名旁 #35554's no-column design cannot work, because no selection exists to lift the actions. The reversal is narrowed to exactly that case.
  3. The hook move is sound. usePredicateScope and useCapabilityGate move up but stay unconditional and above every early return. resolveObjectGridRowActionOffer is a plain function over the same planRowActionMenu the Actions column and the row menus read, so the selection mode and the column agree on one plan.

Evidence (report /mnt/project-files/objectstack-seat-os-tesla/ot-ux/report-39435.md): the new test pins the card's acceptance, which is a row-level entry point with no selection column. Each of the three ablations goes red: 2/5, 2/5 and 1/7.

Owed before landing (bookkeeping, no head move). Fixes #39435 closes the card, but the card's sentence "the record side panel's 更多操作 menu should also list the object's record_row / record actions" is outside this PR, and the report says it is "not filed". Do one of these before the merge closes the card: file that half as its own card (filing gate applies), or record on #39435 that it is dropped, with the reason.

Nit, accepted. The selection mode reads the rows on screen. A page whose rows all hide their declared action behind a predicate draws no checkbox, and the next page may draw one. This is the same per-screen reading the Actions column already makes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

2026-12-04T14:45Z · Landing · head 9aea5db246 · L1-c ACCEPT 7414234372 at this head, on green. No L2 is owed (Clause-②: no, TIER_DEFAULT).

Probe Reading
check-governed-merges.mjs --pr 39717 NOT governed; 4 files, 357 lines
K (first-parent commits on origin/main since merge base a802b23) 14 (< 15)
CI at head 40 success, 15 expected skip, 0 failed; Dogfood Regression Gate success (the matrix row is skipped and the aggregate passes); mergeable clean

The owed bookkeeping is done: the card's side-panel sentence is dropped with its reason in scope record 7414257127. record actions already reach the panel via #39554; the record_row-only ones are the author's placement.

State: ready + auto-merge. Fixes #39435 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 14:45
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 758cd97 Dec 4, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39435-list-row-actions-no-selection branch December 4, 2026 15:08
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 size/m 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.

List pages: record_row actions are reachable only by right-click when the grid has no selection column (sessions, invitations, API keys)

2 participants