CL-9361: quote whitespace args in shared MCP trust prompt helper (TTY + TUI) - #1183
Merged
TheGreatAxios merged 4 commits intoSep 27, 2026
Conversation
TheGreatAxios
changed the base branch from
cl-8996-exec-mcp-tofu-prompt-omits-spawn-args
to
main
September 27, 2026 22:29
The trust prompt showed Command whenever command was set, but connect opens HTTP when type is http or type is unset and url is set. Name and url also interpolated raw. Display now shares isHttpServer and escapes those fields plus Unicode/C1 line breaks. Fingerprint inputs are unchanged.
TheGreatAxios
force-pushed
the
cl-9361-quote-whitespace-args-in-shared-trust-prompt-helper-tty-tui
branch
from
September 27, 2026 22:33
ab27029 to
1747d4d
Compare
TheGreatAxios
enabled auto-merge (squash)
September 27, 2026 22:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks onto #1165 (CL-8996, unmerged): that PR created the TTY helper with a bare space-join; this change adds argv quoting in one shared helper consumed by both the TTY exec prompt and the TUI prompt.
formatMcpTrustQuestioninsrc/trust/project-trust.ts(next tomcpServerFingerprint): args containing whitespace (also quotes, empty args) render double-quoted with backslash/quote escaping, so["a b"]and["a","b"]never look alike.formatExecMcpTrustQuestion(TTY, src/exec/runner.ts) and newformatTuiMcpTrustQuestion(TUI, src/tui/runner/session.ts) both delegate to it; both surfaces fixed together.mcpServerFingerprint); existing fingerprint suites green.tests/unit/tui/mcp-trust-prompt-parity.test.tsasserting both surfaces render identically across a 12-config matrix.Verification:
bun run typecheckexit 0; exec+TUI runner + trust suites 108 pass 0 fail; fullbun test ./src ./tests ./evals ./scripts --randomize --seed 4242428052 pass 0 fail;bun run lintexit 0.