Skip to content

Add Ctrl+A / Cmd+A keybind to select all files in current file set#758

Open
Copilot wants to merge 23 commits into
mainfrom
copilot/add-select-all-functionality
Open

Add Ctrl+A / Cmd+A keybind to select all files in current file set#758
Copilot wants to merge 23 commits into
mainfrom
copilot/add-select-all-functionality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

Context

Users have wanted the ability to "select all" within a file set

Description

This PR adds "select all" functionality via keybind cmd+a/ctrl+a that lets users select all files within a file set. To do so they must first select or deselect a file within the file set or be at the root (as in no groups)

Testing

Tested locally across different group and filtering combos

Copilot AI linked an issue Apr 30, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add select all capability using ctrl+A keybind Add Ctrl+A / Cmd+A keybind to select all files in current query Apr 30, 2026
Copilot AI requested a review from SeanDuHare April 30, 2026 00:24
Comment thread packages/core/components/DirectoryTree/test/DirectoryTree.test.tsx
Copilot AI requested a review from SeanDuHare April 30, 2026 22:51
Comment thread packages/core/components/DirectoryTree/index.tsx Outdated
Copilot AI requested a review from SeanDuHare April 30, 2026 23:06
Comment thread packages/core/state/selection/reducer.ts Outdated
Comment thread packages/core/components/DirectoryTree/index.tsx Outdated
Copilot AI and others added 2 commits April 30, 2026 23:27
…ve unnecessary INITIALIZE_APP reset

Agent-Logs-Url: https://github.com/AllenInstitute/biofile-finder/sessions/a7d3238e-9ae3-4216-b28f-45a5b2b628f3

Co-authored-by: SeanDuHare <41307451+SeanDuHare@users.noreply.github.com>
Copilot AI requested a review from SeanDuHare April 30, 2026 23:29
Copy link
Copy Markdown
Contributor

@SeanDuHare SeanDuHare left a comment

Choose a reason for hiding this comment

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

Reviewed UX with Lyndsay - removed tracking last opened folders per her suggestion

Copilot AI changed the title Add Ctrl+A / Cmd+A keybind to select all files in current query Add Ctrl+A / Cmd+A keybind to select all files in current file set May 1, 2026
Copilot AI requested a review from SeanDuHare May 1, 2026 18:50
Comment thread packages/core/state/selection/actions.ts Outdated
Comment thread packages/core/components/DirectoryTree/useSelectAll.ts
Comment thread packages/core/components/DirectoryTree/useSelectAll.tsx Outdated
]).slice(0, 5),

// Reset file selections when file filters change
// Reset file selections and last touched folder when file filters change
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lastTouchedFolder is reset when file filters change, but it's not actually included
in the returned state only fileSelection is cleared. This means after a user applies or removes a file filter,
Ctrl+A can still target a stale folder from before the filter was changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point! This is a stray comment addition from pre my change to remove tracking the last opened folder. I reverted this comment line to reflect the reality of the implementation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we still need to update SET_FILE_FILTERS to clear lastTouchedFolder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We want the last touched folder to remain the same even when the filters change since it is technically still the same folder - in the case of the hierarchy changing we do want it to change. The file selection getting cleared lets us avoid any issues where select all wouldve selected too many or too few files

@SeanDuHare SeanDuHare marked this pull request as draft May 1, 2026 20:03
@SeanDuHare SeanDuHare marked this pull request as ready for review May 1, 2026 21:47
@SeanDuHare SeanDuHare requested review from ascibisz and kmitcham May 4, 2026 16:58
@AllenInstitute AllenInstitute deleted a comment from Copilot AI May 4, 2026
@AllenInstitute AllenInstitute deleted a comment from Copilot AI May 4, 2026
@AllenInstitute AllenInstitute deleted a comment from Copilot AI May 4, 2026
@AllenInstitute AllenInstitute deleted a comment from Copilot AI May 4, 2026
@AllenInstitute AllenInstitute deleted a comment from Copilot AI May 4, 2026
@aswallace
Copy link
Copy Markdown
Contributor

I've been testing this locally and for some reason getting a bunch of 500 Internal Server Errors when using it on FMS.
This also seems to generate a lot of duplicate server calls
Screenshot 2026-05-08 at 1 58 33 PM

@SeanDuHare
Copy link
Copy Markdown
Contributor

SeanDuHare commented May 11, 2026

I've been testing this locally and for some reason getting a bunch of 500 Internal Server Errors when using it on FMS. This also seems to generate a lot of duplicate server calls Screenshot 2026-05-08 at 1 58 33 PM


(EDIT)
Found the bug - working on a scoped fix. this is because the file sets focus the last index in a list (which tbh doesn't feel like the right behavior anyway)


I can't reproduce this :(
What browser are you using? I'll try clearing my cache and also using desktop next

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Select All

4 participants