Skip to content

feat(web): copy full and relative paths from the Files panel - #19569

Closed
effektsvk wants to merge 1 commit into
pingdotgg:mainfrom
effektsvk:feat/files-copy-path
Closed

effektsvk wants to merge 1 commit into
pingdotgg:mainfrom
effektsvk:feat/files-copy-path

Conversation

@effektsvk

@effektsvk effektsvk commented Oct 14, 2026 •

Copy link
Copy Markdown

Proposed in #7481.

Right-clicking a file or folder in the Files panel offers Open, Reveal, Open with, Copy mention, and Add to chat, but there is no way to copy the entry's filesystem path the way editors offer Copy Path / Copy Relative Path. Copy mention puts composer syntax on the clipboard, not a path.

Change

The Files panel context menu gets two items above Copy mention:

  • Copy full path: the absolute path on the environment host, resolved by the same resolveFileContextMenuAbsolutePath helper Open and Reveal use, so it is correct for remote and tunnel connections. The item is hidden when the path can't be resolved.
  • Copy relative path: the workspace-relative path; folders have no trailing slash.

Both show a "Path copied" toast with the copied value. The three copy actions now share one copy-and-toast helper; the Copy mention toast now shows the copied mention instead of the bare path.

Scope: web and desktop share this menu. The mobile Files tree has no context menu, so mobile is unchanged. Windows separators follow whatever #19201 settles on.

Before / After

Before (macOS) After (macOS Web)
Screenshot 2026-10-14 at 9 49 11 PM Screenshot 2026-10-14 at 9 49 42 PM

Verification

  • Manually in a dev server on Linux, opened from a macOS browser over the tailnet: right-clicked files and folders, copied both paths, and pasted them to confirm the values.
  • vp run --filter @t3tools/web typecheck passes; vp lint reports nothing on changed lines; vp fmt clean.
  • Screenshots taken in headless Chromium against the same dev server; Copy full path showed the "Path copied" toast with the absolute path.
  • Not checked: the native Electron menu on desktop, and a Windows host.

🤖 Generated with Claude Code

Right-clicking a file or folder in the Files panel now offers Copy full
path and Copy relative path next to Copy mention.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 14, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This adds two new production Files-panel context-menu actions and changes the existing copy toast behavior. The implementation is localized and low-risk in scope, but the new menu behavior lacks direct automated coverage and should receive human verification.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: edfdb69a-8839-4990-b333-07b8279cb340
📥 Commits

Reviewing files that changed from the base of the PR and between bf8ffe8 and f7d3e45.

📒 Files selected for processing: 1
  • apps/web/src/components/files/FileBrowserPanel.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The file context menu now offers full-path and relative-path copy actions. It shows the full-path action only when path resolution succeeds. A shared helper reports clipboard copy results for paths and mentions.

Changes: File Context Menu Copy Actions

Layer / File(s) Summary
Resolve paths and copy menu entries
apps/web/src/components/files/FileBrowserPanel.tsx
The menu conditionally offers “Copy full path” when an absolute path resolves and adds “Copy relative path.” A shared clipboard helper reports success or failure. Mention-copy success shows the copied mention in the toast description.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to f7d3e

The new path-copy actions appear ready to merge after normal checks; no actionable risk remains identified.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, implementation, scope, verification steps, screenshots, and unverified environments. It does not provide the required Scope and approval section or explicit maint… Add a Scope and approval section with a link to the triaged issue or approval discussion, including the maintainer approval comment. If the change qualifies as an obvious focused fix without prior approval, explain why.
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: adding full and relative path copying to the Files panel.
Full details: Description check

Explanation

The description explains the problem, implementation, scope, verification steps, screenshots, and unverified environments. It does not provide the required Scope and approval section or explicit maintainer approval for issue #7481.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Thanks for this. I'm closing it as part of PR triage. Right now we're only taking focused bug fixes from outside contributors (see Read this first), and this PR is not one.

From the review: Adding full and relative path copying to the Files menu introduces new actions rather than fixing an existing defect. This capability needs maintainer agreement first.

If you think this was a mistake, message me on Twitter at @maria_rcks and I'll take another look.

@maria-rcks maria-rcks closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants