Skip to content

feat(web): reveal files and worktrees in the system file manager - #9373

Open
flamboh wants to merge 7 commits into
pingdotgg:mainfrom
flamboh:t3code/add-finder-sidebar-action
Open

feat(web): reveal files and worktrees in the system file manager#9373
flamboh wants to merge 7 commits into
pingdotgg:mainfrom
flamboh:t3code/add-finder-sidebar-action

Conversation

@flamboh

@flamboh flamboh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Note

🤖 GPT-6 on behalf of Oliver

Problem

The file-manager reveal action added for composer file links in #7140 keeps its environment checks, platform-specific label, and shell request inside ChatMarkdown. Other workspace-path surfaces cannot reuse it, so users have to copy a path and find it manually from the Files panel, an open file tab, or a thread.

Fix

Factor the server-backed action into a shared useFileManagerAction hook. It resolves the correct local environment, keeps its actions stable across unrelated renders, uses the server's Finder/File Explorer/Files label, and stays hidden when the environment is remote or lacks reveal support.

Use its reveal operation from the existing composer file-link menu, file and folder rows in the Files panel, and open file-tab menus. The modern thread menu shared by the sidebar and chat header instead opens the worktree directory itself, or the project directory when the thread has no worktree. The legacy sidebar uses the same action for its thread menus.

UI Changes

Cap.2026-09-03.at.00.32.58.mp4

Verification

  • 121 tests passed across file-manager path/capability coverage, thread menu logic, platform labels, markdown rendering, and file tabs.
  • Web typecheck passed.
  • Targeted lint passed with existing warnings; formatting and git diff --check passed.

Changes prepared by GPT-5.6 Sol through Codex in T3 Code, with GPT-5.6 Luna subagents implementing the menu integrations and an independent GPT-5.6 Sol review pruning low-signal tests. Legacy-sidebar support and the rebase were completed by GPT-5.6 Sol through Codex, reviewed by GPT-6.

Note

Add environment-aware file-manager reveal/open actions across web UI

  • Introduces shared file-manager action resolution in fileManagerReveal.ts: fileManagerActionForPresentation builds open and optional reveal operations from environment presentation, and useFileManagerAction / useFileManagerActionForEnvironment expose reactive per-environment lookups
  • Integrates reveal/open actions into sidebar thread context menus (Sidebar.tsx, LegacySidebar.tsx), file-browser context menus (FileBrowserPanel.tsx), right-panel tab context menus (RightPanelTabs.tsx), chat markdown file links (ChatMarkdown.tsx), and the thread action menu (threadActionMenu.logic.ts)"- Replaces OS-specific label helpers in fileExplorerLabel.ts with separate manager-name and open-name helpers; the Files (Linux) reveal label is now "Open Containing Folder"
  • resolveLiteralFilePath joins relative paths against the workspace root using POSIX or Windows separators without interpreting tilde or terminal-link syntax
  • Behavioral Change: file-manager actions are only available when the file-manager editor is configured and the environment resolves to local execution; reveal additionally requires the shell reveal flag. All reveal/open failures surface as error toasts instead of silent failures

Macroscope summarized 0b4efd3.

Summary by CodeRabbit

  • New Features

    • Open workspace folders directly in the system file manager from thread context menus.
    • Reveal files in the file manager from file tabs and file browser entries.
    • Added environment-aware actions that appear only when supported.
    • Improved file paths for local, Windows, and network locations.
    • Updated labels to use platform-appropriate file manager names, including “Open Containing Folder” where applicable.
  • Bug Fixes

    • File-manager actions now provide clearer error feedback when opening or revealing files fails.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 3, 2026
Comment thread apps/web/src/components/RightPanelTabs.tsx Outdated
@flamboh
flamboh force-pushed the t3code/add-finder-sidebar-action branch from b5f115b to 92bec46 Compare September 3, 2026 07:19
@flamboh flamboh changed the title feat(web): reveal files and worktrees in the system file manager feat(web): add file manager actions for files and worktrees Sep 3, 2026
@flamboh
flamboh marked this pull request as ready for review September 3, 2026 07:34
@flamboh flamboh changed the title feat(web): add file manager actions for files and worktrees feat(web): reveal files and worktrees in the system file manager Sep 3, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new cross-surface file-manager and worktree workflow, including platform-specific path resolution and shell RPC integration. Its broad production UI impact and substantial new runtime logic warrant human review.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

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

Comment thread apps/web/src/fileManagerReveal.ts Outdated
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Sep 3, 2026
@flamboh
flamboh force-pushed the t3code/add-finder-sidebar-action branch from 3769e41 to 4f4cabe Compare September 3, 2026 17:52
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). size:XL 500-999 changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@flamboh
flamboh force-pushed the t3code/add-finder-sidebar-action branch 2 times, most recently from 4af2c7d to ffb69d9 Compare September 4, 2026 22:47
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. and removed vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Sep 4, 2026
@flamboh
flamboh force-pushed the t3code/add-finder-sidebar-action branch from 887c561 to 0b4efd3 Compare September 7, 2026 11:13
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 14f5bc85-7bec-437b-8cb9-c6e0f4d07ee2

📥 Commits

Reviewing files that changed from the base of the PR and between 8b2838e and 0b4efd3.

📒 Files selected for processing (13)
  • apps/web/src/components/ChatMarkdown.tsx
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/LegacySidebar.tsx
  • apps/web/src/components/RightPanelTabs.tsx
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/files/FileBrowserPanel.tsx
  • apps/web/src/components/preview/fileExplorerLabel.test.ts
  • apps/web/src/components/preview/fileExplorerLabel.ts
  • apps/web/src/components/threadActionMenu.logic.test.ts
  • apps/web/src/components/threadActionMenu.logic.ts
  • apps/web/src/fileManagerReveal.test.ts
  • apps/web/src/fileManagerReveal.ts
  • apps/web/src/hooks/useThreadActionMenu.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The change centralizes file-manager action resolution for local environments. It adds open and reveal actions to thread menus, file-browser entries, file tabs, and chat markdown links. It also adds platform labels, cross-platform path resolution, command error handling, and tests.

Changes

File manager action resolution

Layer / File(s) Summary
Action resolution and path contracts
apps/web/src/fileManagerReveal.ts, apps/web/src/fileManagerReveal.test.ts, apps/web/src/components/preview/fileExplorerLabel.ts, apps/web/src/components/preview/fileExplorerLabel.test.ts
Adds environment-specific file-manager open and reveal actions, platform labels, literal path resolution for POSIX, Windows, and UNC paths, capability checks, hooks, and tests.
Thread menu integration
apps/web/src/components/threadActionMenu.logic.ts, apps/web/src/hooks/useThreadActionMenu.ts, apps/web/src/components/Sidebar.tsx, apps/web/src/components/LegacySidebar.tsx, apps/web/src/components/threadActionMenu.logic.test.ts
Adds conditional “open in file manager” thread actions for projects and worktrees. Commands use resolved workspace paths and report failures through toasts.
Workspace reveal surfaces
apps/web/src/components/ChatMarkdown.tsx, apps/web/src/components/files/FileBrowserPanel.tsx, apps/web/src/components/RightPanelTabs.tsx, apps/web/src/components/ChatView.tsx
Adds file-manager reveal actions to chat links, file-browser entries, and workspace file tabs. Workspace roots are passed to tab views, and command failures are handled with interrupted-command support and error toasts.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 0b4ef

The file-manager actions are consistently capability-gated, resolve workspace paths through the shared helper, and handle command failures across the added surfaces.

Suggested reviewers: sunkenintime, juliusmarminge, t3dotgg

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 13 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the problem, solution, affected UI surfaces, verification results, and behavior changes. It includes UI evidence, but it does not include the template's explicit Check…
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding file and worktree reveal actions in the system file manager.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant