fix(tui): preserve quotes in Windows status line commands - #2377
Conversation
🦋 Changeset detectedLatest commit: b7f549e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a555f1febe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async () => { | ||
| const command = `"${process.execPath}" -e "process.stdout.write('quoted-ok')"`; | ||
|
|
||
| expect(await runStatusLineCommand(command, payload)).toBe('quoted-ok'); |
There was a problem hiding this comment.
Give the Windows quote test a generous timeout
On a busy Windows CI runner, this launches both cmd.exe and a fresh Node process but leaves timeoutMs at the production default of 300 ms. If process startup exceeds that deadline, runStatusLineCommand returns null, so the regression test can fail even when quote handling is correct. Pass a generous explicit timeout here to isolate the quoting contract; timeout behavior already has separate coverage.
Useful? React with 👍 / 👎.
Related Issue
Resolves #2332
Problem
On Windows,
status_line.commandis passed tocmd.exe /d /s /cas one argv element. Node/libuv escapes embedded double quotes while serializing that argument, so commands that quote an executable or a path arrive atcmd.exewith literal backslashes and silently produce no status line output.What changed
cmd /s /cand enablewindowsVerbatimArguments, preserving the command's nested quotes.sh -cpath unchanged.@moonshot-ai/kimi-code.Validation
10.0.26100, PowerShell 7.6.3, code page 936@moonshot-ai/kimi-codeTypeScript check: passedchangeset status --since=origin/main: patch bump detectedNo findings.No documentation update is needed: the existing
[status_line].commanddocumentation already describes the intended command contract, and this change restores that documented behavior on Windows without changing configuration or usage.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.