Skip to content

feat(web): list host folders opened from chat links - #225

Closed
Salochi wants to merge 1 commit into
mainfrom
feat/host-folder-browse
Closed

Salochi wants to merge 1 commit into
mainfrom
feat/host-folder-browse

Conversation

@Salochi

@Salochi Salochi commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

A chat link to a folder outside the workspace (for example /home/me/projects/favicon-preview/) opens the file surface with "The path is a directory or special file, not a regular file." Folders inside the workspace open in the tree, but a host path cannot be revealed there, so the surface gives up. The user then has to find each file and link it by hand.

Change

When the file surface's read of a host path fails with path_not_file, it now shows a flat, read-only listing of that folder instead of the error:

  • Folders first, then files, in natural sort order (reuses fileBreadcrumbChildren).
  • Clicking a file opens it in the normal preview. Clicking a subfolder, or the Up to … row, lists that folder in place, through the same onOpenFile path as chat links.
  • New HostFolderListing.tsx. filePath.ts gains hostFolderChildPath and hostFolderParent (POSIX and Windows separators, drive roots).

No server or contract change. The listing uses the existing projects.listEntries with the folder as cwd and directoryPath: "" (immediate children only, no index), which filesystem:read already authorizes. Sessions without that permission see the same "cannot read host files" state as before.

Workspace folders and every existing file preview are unchanged.

Scope and approval

Fork UX improvement to an existing surface (Nick asked for it after hitting the error on host folder links). It stays read-only and reuses an existing RPC and permission.

Verification

  • vp test run apps/web/src/components/files/filePath.test.ts apps/web/src/components/files/FilePreviewPanel.test.ts passes, with new cases for joining and parent paths: trailing slashes, /, /home → /, C:\Users → C:\.
  • tsc --noEmit -p apps/web passes.
  • Manual, on a live T3 Hermes server: clicked a chat link to /home/aeris/projects/favicon-preview/; got the listing and opened PNG and GIF previews from it. Image previews from host folders depend on the companion fix in "fix(web): images outside the workspace preview from the file surface". Up to /home/aeris/projects navigated up.
  • Not checked: mobile (separate files screen, unchanged), and very large folders. The listing renders every entry, the same as the breadcrumb menu.

Screenshots: none captured. Chromium doesn't run on the box this was built on. Before was the error text quoted above; after is the plain list. Happy to add captures if wanted.

Model/harness: Claude Opus 5.5 via Hermes Agent (ACP) in T3 Code.

A chat link to a folder outside the workspace showed 'The path is a directory
or special file'. The file surface now lists the folder's entries read-only;
files open in the normal preview and subfolders/parent navigate in place.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 556cd9c2-775d-45fd-8287-444c92cba741
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: cb44cd7 · PR result: 21cb889 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@Salochi

Salochi commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by upstream pingdotgg/t3code#15045 (synced here as aa35fb3, "folder breadcrumbs navigate to parent folders"). Host folders outside the workspace now open as a file tree rooted at that folder, which covers this flat listing and more. Closing instead of resolving the conflict. Branch kept for reference.

Image previews inside those host folders still need #224: upstream's WorkspaceImagePreview still requests a workspace-file asset.

@Salochi Salochi closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant