Repository navigation
fix(plugin-grid): list pages lift record_row actions without a selection column - #39717
objectstack-fleet[bot] merged 3 commits into
Conversation
…ion column (wip) Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
…le selection Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibzVCaQPuEu6rGmqH8J Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF 席位核对L1-c · PR #39717 · 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 Face. The PR is The three points the zone asked about:
Evidence (report Owed before landing (bookkeeping, no head move). 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. |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J 2026-12-04T14:45Z · Landing · head
The owed bookkeeping is done: the card's side-panel sentence is dropped with its reason in scope record 7414257127. State: ready + auto-merge. |
Requested by Tesla · project thread
Fixes #39435
Clause-②: no
Metadata-protocol: none
维护者速读
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 legacyselectable) 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 planRowActionMenurenders 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()anduseCapabilityGate()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.'single'selection, sosingleRowMenuapplies.selectionAvailablefollows it (publishedtruethere).selection.type: 'none', or legacyselectable: false) on a list page:drawRowControlsistrueagain, so the row keeps its own "⋮" (the Actions column still draws only when a row offers something).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 sameuseListPageScopethe Console page bars call):selectionAvailableistrue; ticking it shows the bar with the row's action.selection.type: 'none'andselectable: false): Actions column and row trigger drawn, no checkbox,selectionAvailablefalse.Ablations (one per changed behaviour, each via
scripts/ablation-replace.mjs, mutation landed and restored to the HEAD blob each time):drawRowControlsvalue: the two explicit-off tests go red (2 failed, 5 passed).Test runs at 9aea5db
Acceptance notes
record_row, or a legacyrowActionsname 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 reddenedObjectView.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.selectionAvailableisfalseuntil the rows load and a row offers a declared action. A list whose rows all hide their action by predicate stays unselectable.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 usesselection.type: 'none', so it now gets row controls and stays green),e2e/list-no-actions-column-35554.spec.tsande2e/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.Verification
Read first, by risk:
ui/packages/plugin-grid/src/ObjectGrid.tsx: the newelse if (listPageGrid && rowActionOffer.anyRowOffersDeclaredAction())selection arm,selectionAuthoredOff, and the hoistedusePredicateScope/useCapabilityGatecalls.ui/packages/plugin-grid/src/objectGridActionsColumn.tsx:resolveObjectGridRowActionOffer, which the Actions column now calls, behaviour-identical for the column.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)
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