Skip to content

fix(desktop-gpui): reveal and open paths through GPUI (rebased #2965) - #3235

Merged
richiemcilroy merged 1 commit into
mainfrom
fix/open-paths-through-gpui
Oct 25, 2026
Merged

richiemcilroy merged 1 commit into
mainfrom
fix/open-paths-through-gpui

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

#2965 by @Ectropy, rebased onto main. The commit and its authorship are unchanged.

Opening and revealing recordings now go through GPUI's reveal_path and open_with_system instead of hand-spawned open, explorer /select,, cmd /C start and xdg-open processes:

  • Windows: explorer /select,<path> was passed as a single argument, so Rust quoted it (bundle names contain spaces) and Explorer ignored the switch and opened Documents. std::fs::canonicalize's \\?\ paths are now simplified with dunce first.
  • Linux: reveal goes through the portal's OpenDirectory, so the file manager starts outside Cap's process environment. The 0.6.1 report "opening folders does nothing" (NixOS, niri, AppImage) came from the AppImage launcher's LD_LIBRARY_PATH reaching the file manager xdg-open started; fix(linux): AppImage screen capture on NixOS, niri DMA-BUF screencasts, paste test #3234 removes that at the launcher.
  • The tray's "Previous" item for an Instant recording opens on every platform, not only Windows.

Every call site that opened or revealed a path moved: the main window library, settings recordings and screenshots, the diagnostics report, the editor bundle button, the screenshot editor, "Open File" after an export, the deep link and the tray.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issues were found.

Summary

Routes desktop file-opening and reveal actions through GPUI.

  • GPUI handles file opens and reveals across the desktop app.
  • The tray opens local instant recordings on every platform.

No actionable issues were found. Native behavior was not tested; the pinned GPUI source was unavailable in this checkout.

Reviews (2) · Last reviewed commit: "fix(desktop-gpui): reveal and open paths..." · Reviewed by Greptile

On Windows, "open folder" / "reveal" actions opened the Documents folder
instead of the recording bundle. `explorer /select,<path>` was passed as a
single argument, so Rust quoted it (bundle names contain spaces) and
Explorer ignored the switch. The editor's bundle path additionally comes
from `std::fs::canonicalize`, whose `\?\` verbatim form the shell rejects
with E_INVALIDARG.

Replace the hand-rolled per-OS `open` / `explorer` / `cmd start` /
`xdg-open` spawns with GPUI's `reveal_path` and `open_with_system`, behind
`library::reveal_path` / `library::open_with_system` helpers that pass the
path through `dunce::simplified` first. The tray's macOS-only `open` spawn
goes through the same helpers.
@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@richiemcilroy
richiemcilroy marked this pull request as ready for review October 25, 2026 18:27
@richiemcilroy
richiemcilroy merged commit c55248a into main Oct 25, 2026
51 checks passed

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

This branch was successfully deployed

2 active deployments
Preview – cap-web — e0169375 Deployed Oct 25, 2026 by vercel[bot]
Preview – cap-status — e0169375 Deployed Oct 25, 2026 by vercel[bot]
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.

2 participants