Skip to content

feat(desktop): reveal agent files in Finder - #7842

Open
davidhu2000 wants to merge 2 commits into
pingdotgg:mainfrom
davidhu2000:feat/reveal-agent-files-in-finder
Open

feat(desktop): reveal agent files in Finder#7842
davidhu2000 wants to merge 2 commits into
pingdotgg:mainfrom
davidhu2000:feat/reveal-agent-files-in-finder

Conversation

@davidhu2000

@davidhu2000 davidhu2000 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Agent file links can open in the editor or file panel and copy their paths, but the desktop app cannot reveal them in the system file manager.

This adds a small desktop revealPath bridge backed by Electron shell.showItemInFolder. Agent file-link context menus now show the platform-native label (Finder, File Explorer, or Files) only when the thread belongs to the primary local environment and its platform matches the desktop host. Browser, mobile, WSL-mismatched, and remote environments keep the existing menu unchanged.

Screenshot 2026-08-21 at 1 39 39 PM

Testing

  • vp test run apps/desktop/src/electron/ElectronShell.test.ts apps/web/src/localApi.test.ts apps/web/src/components/preview/fileExplorerLabel.test.ts — 17 passed
  • Targeted lint for all 11 changed files — passed
  • Contracts and desktop typechecks — passed
  • Effect service conventions check agent — all clear
  • UI consistency check agent — all clear

UI evidence

Manual verification: restart the desktop dev app, right-click an agent file link, choose Reveal in Finder, and confirm Finder selects the file. Before/after screenshots are not included yet.

Generated with gpt-5.6-sol via the T3 Code Codex harness.

Note

Add revealPath to ElectronShell and file-link context menu in ChatMarkdown

  • Adds a full IPC pipeline for revealing files in the OS file manager: ElectronShell.revealPath calls Electron.shell.showItemInFolder, registered via REVEAL_PATH_CHANNEL in channels.ts and exposed on desktopBridge in preload.ts
  • Extends DesktopBridge and LocalApi contracts with optional revealPath(path: string): Promise<void> in ipc.ts; createBrowserLocalApi proxies it when the desktop bridge is present
  • Updates MarkdownFileLink in ChatMarkdown.tsx to show a platform-labeled 'Reveal' context-menu action only when canRevealInFileManager is true, derived from matching the primary environment, OS, and desktopBridge.revealPath availability
  • Risk: canRevealInFileManager logic in ChatMarkdown relies on usePrimaryEnvironmentId and OS comparison; mismatched or unavailable environment IDs silently hide the menu item rather than erroring

Macroscope summarized 876006d.

@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 Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d009912d-aa4d-4ba1-b6f0-a3043ef93b5a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment thread apps/web/src/components/ChatMarkdown.tsx Outdated
Comment thread apps/web/src/components/ChatMarkdown.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new user-facing feature (reveal files in Finder/Explorer via context menu) with changes spanning IPC, shell integration, and UI layers. While well-structured and following existing patterns, new features introducing user-facing behavior warrant human review.

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

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.

1 participant