Repository navigation
Conversation
In a multi-folder tree, the context menu and drag-to-chat built paths from the folder's display name joined to the workspace root. They now resolve through the row's own folder, like left-click, and mentions use the absolute path like @ search. Fixes #335
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Search-generated ancestor rows can still resolve to nonexistent filesystem paths.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Fixes file actions and drag mentions to resolve each file-tree row against its actual folder.
Changes:
- Adds shared row-to-filesystem path resolution.
- Uses resolved paths for context menus and drag mentions.
- Adds focused path-resolution and drag tests.
| File | Description |
|---|---|
FileBrowserPanel.tsx |
Applies resolved paths to file actions and mentions. |
filePath.ts |
Adds row-location resolution. |
filePath.test.ts |
Tests single-root and multi-root paths. |
fileTreeDragMention.ts |
Supports host-resolved mention paths. |
fileTreeDragMention.test.ts |
Tests resolved and omitted drag mentions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+213
to
+215
| : entry.path.startsWith(`${label}/`) | ||
| ? entry.path.slice(label.length + 1) | ||
| : entry.path; |
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.

What Changed
The files panel's right-click menu and drag-to-chat now resolve a row through its own folder, the way left-click already does. Open, Reveal and Open with target the real file. Copy mention, Add to chat and dragged mentions use the absolute path, like
@search. A folder's own top-level row targets that folder.Why
In a tree with several folders, these actions joined the folder's display name to the workspace folder. Any folder not sitting at
<workspace>/<name>got the wrong target:../notes→ideas.mdcopiednotes/ideas.mdand revealed a folder without it, andnotes/2026→plan.mdcopied2026/plan.mdand Reveal did nothing.Fixes #335
UI Changes
Before (feee30e) on the left, this branch on the right. The layout from #335; right-click → Copy mention on
ideas.md, thenplan.md.Video:
Checklist
Claude Opus 5.5 in Claude Code, via T3 Code.