fix(data): normalize a list working dir's trailing separator on write
A list working_dir stored as "C:\Dev\Tests\StaplerTracking\" broke every consumer that puts it on a Windows command line: argv rules read \" as an escaped quote, so the token never closes. "Open in terminal" passed wt.exe a starting directory of C:\Dev\Tests\StaplerTracking" and it failed with 0x8007010b; the same data had already corrupted the ConPTY list handler's arg list in August. Paths.TrimTrailingSeparator is now the single helper (replacing the copies in InteractiveLaunchSpecService and ClaudeHelpLauncher) and ListRepository applies it on Add/Update, which covers every writer: UI create, repo import, hub UpdateList, and MCP CreateList/UpdateList. OpenInTerminal also switches to ArgumentList so its quoting is correct regardless of what's stored.
This commit is contained in:
@@ -54,8 +54,16 @@ so a token like `"C:\repo\"` never closes and every following argument is swallo
|
||||
preceding **variadic** flag. A list working dir stored as `C:\Dev\Repos\Bandel.Hub\` therefore
|
||||
fed `--add-dir` the repo, `--append-system-prompt-file`, its value **and** the positional kickoff:
|
||||
the CLI warned `brief.md is not a directory` and the session opened with no prompt at all
|
||||
(2026-08-06). `BuildForMergeHelperAsync`/`BuildForMergeHelperHandoffAsync` now run the repo
|
||||
through `TrimTrailingSeparator`; session dirs the worker builds never carry one.
|
||||
(2026-08-06). `BuildForMergeHelperAsync`/`BuildForMergeHelperHandoffAsync` run the repo through
|
||||
`TrimTrailingSeparator`; session dirs the worker builds never carry one.
|
||||
|
||||
The same data bit the UI's "Open in terminal" on 2026-08-10 (`wt -d "C:\…\StaplerTracking\"` →
|
||||
`Could not access starting directory "C:\…\StaplerTracking""`), so the fix moved to the write side:
|
||||
**`ListRepository.AddAsync`/`UpdateAsync` normalize `WorkingDir` via `Paths.TrimTrailingSeparator`**,
|
||||
which covers every writer (UI create, repo import, hub `UpdateList`, MCP `CreateList`/`UpdateList`) —
|
||||
the UI and worker keep their own defensive trim for rows written before that. Anything new that puts
|
||||
a **user-supplied** path on a command line should use `Paths.TrimTrailingSeparator` and, on the
|
||||
`ProcessStartInfo` side, `ArgumentList` rather than an interpolated `Arguments` string.
|
||||
|
||||
Diagnosing this from code or a PowerShell repro is a dead end — PowerShell quotes correctly, so
|
||||
every repro passes. Read the real command line instead:
|
||||
|
||||
Reference in New Issue
Block a user