Repository navigation
Conversation
|
@Ectropy is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
b2657f5 to
933ab22
Compare
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.
933ab22 to
203f103
Compare
|
Thanks, this looks good to us now. When you're happy with it, please mark it ready for review and merge main into the branch; we'll then run the Greptile review and CI, and it needs 5/5 plus green CI to merge. |
|
I've done all 13 tests I wanted to do now. I can confirm thru testing via a build made with I'll merge in main's changes then open the PR. Should be good pending any Mac tests you wish to try. |
Problem
On Windows, the folder icon in the recordings list and the editor's Open recording bundle button open the user's Documents folder instead of revealing the
.capbundle.Two causes:
reveal_in_folderranexplorerwith/select,<path>as one argument. Bundle names contain spaces, so Rust quotes the whole argument ("/select,C:\…\My Recording.cap"). Explorer doesn't recognize a quoted/select, so it falls back to Documents.std::fs::canonicalize, which on Windows returns a\?\C:\…verbatim path. The shell rejects that withThe parameter is incorrect. (0x80070057), so even a correctly quoted reveal does nothing.Fix
The hand-written per-OS
open/explorer/cmd /C start/xdg-openspawns inlibrary.rsare replaced with GPUI's owncx.reveal_pathandcx.open_with_system, which use the native APIs on each platform (SHOpenFolderAndSelectItems/ShellExecuteWon Windows,NSWorkspace/openon macOS, the desktop portal on Linux).Two thin helpers,
library::reveal_pathandlibrary::open_with_system, pass the path throughdunce::simplifiedfirst so verbatim paths never reach the shell.duncewas already in the lockfile, andsimplifiedis a no-op on macOS and Linux. Canonicalization itself is unchanged, because other code compares those canonical paths (for example the editor's delete check).The tray's macOS-only
openspawn now uses the same helpers. Windows already called GPUI there. On Linux that tray item previously did nothing, and now opens.Related: #2309 ("Open File" after export flashes a terminal on Windows) came from the removed
cmd /C startpath, so this may also address it (not yet verified). #2316 edits thereveal_in_folderblock this PR deletes.How to test
Use recordings and screenshots whose names contain spaces (the default names do). On macOS every item should behave exactly as before. On Windows, items 1–7 previously opened Documents or did nothing.
Reveal: Explorer/Finder opens the folder with the item selected
original.png)Open: opens in the default app
contentfoldercontentfoldercontentfolder.capfrom outside the app (anopen_editordeep link) opensoutput.mp4in the system playeroutput.mp4if not sharedOn a dev build without the
capCLI sidecar, the diagnostic report (item 7) is partial and says so, but Show File still reveals it.Tested
cargo clippy --all-targetsforapps/desktop-gpuishows no new warnings, and thelibrary,trayanddeeplinktests pass.

Confidence Score: 5/5
The PR appears safe to merge; no actionable defects were found.Summary
The PR replaces hand-written file-opening commands with GPUI calls.
No actionable issues were found. Review checks covered the diff, callers, tray callbacks, and repository rules. No build or native-platform runtime tests were run.
Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile