Conversation
SlexAxton
commented
Apr 8, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76fe95b575
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| previousSelectedPaths.filter( | ||
| (selectedPath) => | ||
| resolvePathStoreTreesItemPath( | ||
| nextItemState.itemMetadata, | ||
| selectedPath |
There was a problem hiding this comment.
Canonicalize preserved selections in replacePaths
When replacePaths carries selection forward, it only checks whether each old path resolves in the new metadata, but it stores the original string instead of the resolved canonical path. If a selected file path later becomes a directory path with a trailing slash (for example after a refresh/branch switch), this code keeps the stale file id, so getSelectedPaths() returns non-existent paths and visible rows lose their selected state. Preserve the resolver output, not the pre-refresh string.
Useful? React with 👍 / 👎.
| if (this.#focusedPath == null) { | ||
| return; | ||
| } | ||
|
|
||
| this.togglePathSelection(this.#focusedPath); |
There was a problem hiding this comment.
Update anchor when toggling focused selection
toggleFocusedSelection() delegates to togglePathSelection(), which does not update the selection anchor. Starting from a fresh tree, Ctrl/Cmd+Space selects the focused row but leaves anchor null, so a subsequent Shift-click falls into the no-anchor branch of range selection and collapses to a single-item select instead of a range. This breaks mixed keyboard/mouse multi-select flow.
Useful? React with 👍 / 👎.