Commit b2d2806
authored
🤖 fix: expand tilde in plan file paths for editor deep links (#1090)
## Problem
When clicking the Edit button on a plan (Electron app, local worktree),
VSCode opens an empty file in the current working directory instead of
the actual plan file.
**Root cause:** Plan file paths contain tilde prefix
(`~/.mux/plans/...`). The backend `editorService` uses `shellQuote()`
which wraps paths in single quotes. In bash, tilde expansion doesn't
happen inside single quotes, so VSCode receives the literal `~/.mux/...`
and interprets it as a relative path.
## Solution
`readPlanFile` now uses `runtime.resolvePath()` to return absolute
paths. This works for both local (expands via `os.homedir()`) and SSH
(resolves remotely).
## Testing
- Updated integration test to assert returned paths are absolute (no
tilde)
- Manually verified Edit button works on local worktrees
- SSH workspaces continue to work (resolvePath handles remote expansion)
_Generated with mux_1 parent 6cd905d commit b2d2806
File tree
2 files changed
+10
-4
lines changed- src/node/utils/runtime
- tests/ipc
2 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | | - | |
| 173 | + | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
0 commit comments