CL-6423: Files adopts the shared selection system - #170
Merged
Merged
Conversation
Cover single, shift-range, and select-all/indeterminate selection on the Files table, the bulk action bar's appearance and Escape-clear, parity between the bulk action bar's and the shell context menu's operation sets, and that page actions live in the StageTopBar slot rather than the body.
The Files table becomes the reference adopter of @corbits/react-ui's selection system: a hover-reveal SelectionCheckbox column with an indeterminate select-all header, useListSelection for shift-click range and cmd/ctrl-click toggle selection, and a BulkActionBar carrying the one operation the artifacts surface actually supports today — copying files' canonical /files/a/:id links. The shell context menu gains an artifact target driven off the same operation constant, so a right-click on a row (or inside a multi-select) offers exactly the bulk bar's operation set.
- Additive multi-select is cmd-click on Mac (ctrl-click stays the context-menu gesture there); ctrl-click still adds on other platforms, via a shared isAdditiveSelectClick helper. - Bulk copy-link and the context menu's selected-ids now emit in visible row order, so a bottom-up selection no longer copies links out of order. - Switching between rows and grid views clears the selection, so the bulk bar can't float over a view with no checkboxes. - The copy-link action label is one count-aware helper shared by the bulk bar and the context menu.
TheGreatAxios
force-pushed
the
cl-6423-files-selection
branch
from
August 20, 2026 23:56
8daf7a1 to
2dab493
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the Files/Library page the reference adopter of @corbits/react-ui's selection system.
Linear: https://linear.app/abklabs/issue/CL-6423
What changed
SelectionCheckbox, with an indeterminate select-all header checkbox.useListSelectionwires selection state: shift-click range selection anchored on the last plain toggle, cmd/ctrl-click toggle, select-all/clear, stale-id reconciliation against the visible (filtered/sorted) list.BulkActionBarappears once anything is selected and offers only the operation the artifacts surface actually supports today: Copy link(s) — the canonical/files/a/:iddeep links. The hub artifacts routes (packages/artifacts-hub/src/routes.ts) expose list/get/upload/counts/preview only; delete/move/rename/download have no backend, so no dead buttons for them.artifacttarget whose item set is driven off the sameLIBRARY_BULK_OPERATION_IDSconstant the bulk bar renders from; right-clicking inside a multi-select acts on the whole selection. A test asserts operation-set equality.StageTopBaraction slot; a test now pins that contract.Notes
bun run checkis green for everything this PR touches;workflows/assistant's scenario tests fail identically onorigin/main(zero diff in that package here) — pre-existing, unrelated.