Repository navigation
fix(web): files panel right-click actions and drags use the folder's real path - #336
Merged
LoganRupe merged 1 commit intoOct 2, 2026
Conversation
…real path In a multi-root files tree, a file's tree path starts with its root's label, and the right-click menu joined that path to the workspace folder. That only named the file when the root sat directly in the workspace folder under its own name, so Reveal, Open, Open with, Copy mention and Add to chat pointed at the wrong file for a listed folder outside the workspace folder, a nested listed folder, or an isolated run's worktree. Dragging a row into the composer built its mention from the same tree path. Both now resolve each entry through its root, the way left-click does, and mention it by full path, as @ search does for files in another root. Fixes LoganRupe#335 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LoganRupe
approved these changes
Oct 2, 2026
Owner
There was a problem hiding this comment.
Tested against multi-repo-workspaces (feee30eed) with the #335 layout. Right-click ideas.md (from ../notes), Add to chat, then click the chip. Before, it fails with "Failed to read workspace file 'notes/ideas.md'". With this branch it opens ~/dev/notes/ideas.md. The 129 tests pass locally too. LGTM.
compare.mp4
LoganRupe
merged commit Oct 2, 2026
7e164c7
into
LoganRupe:multi-repo-workspaces
7 of 17 checks passed
This was referenced Oct 2, 2026
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.
In a files panel with several folders, right-clicking a file or dragging it into the composer used the folder name shown in the tree as if it were a path in the workspace folder. For a listed folder outside the workspace folder, a nested listed folder, or an isolated run's worktree, the menu actions and the mention pointed at the wrong file. Details are in #335.
Fix
The right-click menu and drag-to-composer now resolve each entry through its real folder, the way left-click already does. A new
fileTreeEntryTargethelper infilePath.tsturns a tree entry into its folder and path, and both use it throughFileBrowserPanel. A top-level folder entry such asnotesnow means that folder itself.Mentions from a multi-folder tree use the file's full path, as
@search already does for files in another folder. So Copy mention onapi/README.mdnow gives/home/<user>/dev/scope-test-four/api/README.mdrather thanapi/README.md. Single-folder projects are unchanged and still get relative mentions.Testing
components/filesandcomposerMentionDrag.test.tspass, the web typecheck is clean, and lint reports the same warnings on the changed files asmulti-repo-workspaces. I didn't run the full suite.ideas.md(in../notes) → Reveal in Files~/dev/notesideas.md→ Copy mention[ideas.md](/home/<user>/dev/notes/ideas.md)ideas.md→ Open with → VS Codeideas.md→ Add to chat, "What is the first line of this file?"~/dev/notes/ideas.mddirectlyplan.md(innotes/2026) → Reveal in Files / Copy mention~/dev/scope-test-four/notes/2026/ full pathnotesfolder → Reveal in Files~/dev, the folder that contains itapi/README.md→ Reveal in Files~/dev/scope-test-four/api, as beforeideas.md,plan.mdor thenotesfolder into the composerWORKTREE.mdin an isolated run → Reveal in Files / Copy mentionapifolder / full worktree pathFixes #335
Model: Claude Opus 5.5, harness: Claude Code.