Skip to content

[trees] Path Store | Selection#491

Open
SlexAxton wants to merge 2 commits intomainfrom
alex/trees/path-store-phase-4
Open

[trees] Path Store | Selection#491
SlexAxton wants to merge 2 commits intomainfrom
alex/trees/path-store-phase-4

Conversation

@SlexAxton
Copy link
Copy Markdown
Contributor

image

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Apr 8, 2026 11:01pm
pierrejs-docs Ready Ready Preview Apr 8, 2026 11:01pm

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +631 to +635
previousSelectedPaths.filter(
(selectedPath) =>
resolvePathStoreTreesItemPath(
nextItemState.itemMetadata,
selectedPath
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +483 to +487
if (this.#focusedPath == null) {
return;
}

this.togglePathSelection(this.#focusedPath);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant