Skip to content

feat(threads): open a thread's folder on its computer - #494

Merged
M-Zajace merged 1 commit into
devfrom
feat/open-thread-folder
Nov 10, 2026
Merged

M-Zajace merged 1 commit into
devfrom
feat/open-thread-folder

Conversation

@M-Zajace

Copy link
Copy Markdown
Contributor

Summary

  • Open folder in the thread context menu (sidebar and command palette share threadActions) and an icon button next to Directory/Worktree in thread details.
  • Gateway RevealThreadDirectory (owner-scoped, active thread only) sends the non-durable worker command RevealPath (field 220, capability reveal_path) with the thread's cwd; the worker requires an absolute, existing directory and opens it with the system file manager (open -R on macOS, explorer.exe on Windows, xdg-open on Linux).
  • Older worker → "Update this computer to open folders from Canopy."; offline → "This computer is offline. Reconnect it to open the folder."
  • Linked computers: RevealThreadDirectory is in the served allowlist, so a mirrored thread opens the folder on its home computer (same as RevealWorktree).
  • Shared revealInFileManager also fixes worktree reveal on Windows: Explorer exits with 1 after opening a folder, so only a failed start counts as an error.
  • docs/worktrees.md updated.

Verification

  • bun run gen committed; typecheck (domain, worker, gateway, web) and lint of changed files clean.
  • Not exercised against a live worker in this session.

Copy audit (docs/copy.md §8)

  • New: menu item and icon label Open folder (verb first, sentence case).
  • New errors: This computer is offline. Reconnect it to open the folder. and Update this computer to open folders from Canopy. (what happened → what to do). Fallback toast Could not open the folder.
  • Reused worker messages: No file manager is available on this computer. Copy the path instead. / The file manager could not open the folder. Copy the path instead.
  • No new glossary terms; the icon button has an accessible name and tooltip.

Adds "Open folder" to the thread context menu and an icon next to the
directory in thread details. The gateway checks the owner and sends the
non-durable RevealPath command (capability reveal_path) with the thread's
directory; the worker opens it in the system file manager (Finder,
Explorer, xdg-open). Explorer exits with 1 after opening a folder, so on
Windows only a failed start counts as an error, also for worktree reveal.
@M-Zajace
M-Zajace merged commit 42ebab4 into dev Nov 10, 2026
9 checks passed
@M-Zajace
M-Zajace deleted the feat/open-thread-folder branch November 10, 2026 12:58
M-Zajace added a commit that referenced this pull request Nov 10, 2026
Open folder ran on the thread's worker, so a linked Mac's thread opened
Finder on the Mac when clicked on Windows. The action now shows only in
the desktop app with its own gateway, for threads of its bundled worker
(new Worker.desktop_bundled), and linked computers no longer receive
RevealThreadDirectory.

Fixes: #494
M-Zajace added a commit that referenced this pull request Nov 10, 2026
Open folder ran on the thread's worker, so a linked Mac's thread opened
Finder on the Mac when clicked on Windows. The action now shows only in
the desktop app with its own gateway, for threads of its bundled worker
(new Worker.desktop_bundled), and linked computers no longer receive
RevealThreadDirectory.

Fixes: #494
M-Zajace added a commit that referenced this pull request Nov 10, 2026
…#513)

Open folder showed nothing on Windows (Explorer started hidden by windowsHide) and macOS (open -R only selected the folder), and a linked computer's thread opened the folder on that computer. The opener now starts detached with a visible window, and the action shows only for folders of this desktop app's bundled worker (ui.Worker.desktop_bundled); linked computers no longer receive RevealThreadDirectory.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant