Skip to content

feat(site): support Shift-click and Shift-drag workspace selection - #30008

Merged
jakehwll merged 17 commits into
mainfrom
jakehwll/workspaces-drag-select
Nov 24, 2026
Merged

jakehwll merged 17 commits into
mainfrom
jakehwll/workspaces-drag-select

Conversation

@jakehwll

@jakehwll jakehwll commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

Support both Shift-click and Shift-held dragging to select workspace ranges. Click a checkbox, then Shift-click another to apply the anchor's checked state across the range; Shift+Space provides the keyboard equivalent. Shift-dragging selects or deselects from the starting checkbox, and reversing the drag restores selection outside the range.

Both gestures skip pending and deleting workspaces and stay on the displayed page. Ordinary checkbox clicks and workspace navigation retain their existing behavior. Related: #21964.

Design decisions
  • Table-owned, opt-in behavior. SelectableTable, SelectableTableRow, SelectableTableCheckbox, and SelectableTableSelectAll compose the existing Table and Checkbox primitives rather than a standalone gesture hook. Each table owns its gesture state; ordinary tables are unchanged. Native refs and consumer event handlers are retained, with no new dependency or data-grid framework.
  • Stable anchors and controlled selection. Ranges use endpoint IDs and the current display order, so refetch reordering does not change the anchor's identity. Missing or disabled anchors and external selection resets stop active drags without restoring stale selections. Batched pointer events are distinguished from external resets. Select-all clears the Shift-click anchor.
  • Workspace policy stays in Workspaces. WorkspacesTable.tsx supplies eligibility and maps selected IDs back to current workspace objects. The reusable components do not depend on workspace API types or statuses.
  • Gesture safeguards stay encapsulated. Dragging requires Shift and the primary mouse button, starting from an eligible checkbox. Pointer release, cancellation, and window blur clean up the gesture. A completed range drag suppresses its terminal click without swallowing the next ordinary click. Touch and pen do not start drag selection; viewport-edge autoscrolling is not added.

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@jakehwll jakehwll changed the title feat(site/src): select workspace rows by dragging across their checkboxes feat: select workspace rows by dragging Sep 27, 2026
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1125

@jakehwll
jakehwll requested a review from jeremyruppel November 2, 2026 08:42
@jakehwll
jakehwll marked this pull request as ready for review November 2, 2026 08:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T08:44:51.524414Z 8f40b0d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the stale This issue is like stale bread. label Nov 10, 2026
@github-actions github-actions Bot closed this Nov 13, 2026
@jakehwll jakehwll reopened this Nov 13, 2026
@jakehwll
jakehwll temporarily deployed to main November 13, 2026 01:06 — with GitHub Actions Inactive
@jakehwll
jakehwll requested a review from aslilac November 13, 2026 01:06
@jeremyruppel

Copy link
Copy Markdown
Collaborator

was #21964 closed for the approach or something else? putting on my accessibility cap, shift+click is far more accessible than a mouse drag, so I would personally greatly prefer that ux

@github-actions github-actions Bot removed the stale This issue is like stale bread. label Nov 14, 2026
@jakehwll
jakehwll temporarily deployed to main November 15, 2026 23:08 — with GitHub Actions Inactive
@jakehwll jakehwll changed the title feat: select workspace rows by dragging feat(site): support Shift-click and Shift-drag workspace selection Nov 15, 2026
@jakehwll
jakehwll temporarily deployed to main November 15, 2026 23:09 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 15, 2026 23:47 — with GitHub Actions Inactive
@jakehwll

Copy link
Copy Markdown
Collaborator Author

was #21964 closed for the approach or something else? putting on my accessibility cap, shift+click is far more accessible than a mouse drag, so I would personally greatly prefer that ux

Whynot both! Done 🙂

@jeremyruppel

Copy link
Copy Markdown
Collaborator

this still behaves a little unexpectedly with shift+clicks. for example, if I shift+click to select 3 items, then shift+click the second item, I would expect the selection to shrink, but this does nothing

@jakehwll
jakehwll temporarily deployed to main November 17, 2026 15:29 — with GitHub Actions Inactive
@jakehwll
jakehwll temporarily deployed to main November 17, 2026 15:49 — with GitHub Actions Inactive

@jeremyruppel jeremyruppel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This review was generated by Coder Agents on behalf of Jeremy Ruppel.

Shift-click shrinking now works as I expected, and the earlier nits are addressed. Both changed test files pass locally (48/48). Inline comments are mostly a11y and test-scope cleanup; no correctness bugs found.

Open questions:

  • The docs changes were removed twice (badf894, 9a009e4), so nothing tells users about Shift-click or Shift-drag. Was that intentional?
  • Everything here ran in jsdom. Has this been checked in real browsers? Specifically: preventDefault on pointerdown suppressing Shift-click text selection, preventDefault on the Shift+Space keydown preventing the keyup click (otherwise the target toggles twice), and the setTimeout(0) click-suppression reset firing after the post-pointerup click.

@jakehwll
jakehwll enabled auto-merge (squash) November 24, 2026 01:48
@jakehwll
jakehwll merged commit bb7e368 into main Nov 24, 2026
26 checks passed
@jakehwll
jakehwll deleted the jakehwll/workspaces-drag-select branch November 24, 2026 01:57
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2026

This branch had an error being deployed

1 failed and 1 inactive (outdated) deployments
docs-preview — e094ae85 Deployed Nov 24, 2026 by jakehwll via cleanup #377
main — 226af001 Deployed Nov 20, 2026 by jakehwll via cla #260653
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants