Skip to content

feat(web): run shell commands from chat in the thread terminal - #13060

Merged
juliusmarminge merged 5 commits into
pingdotgg:mainfrom
Bil0000:t3code/run-shell-blocks-20260922
Sep 24, 2026
Merged

juliusmarminge merged 5 commits into
pingdotgg:mainfrom
Bil0000:t3code/run-shell-blocks-20260922

fix(web): guard chat shell run action for incomplete commands

125105c
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check succeeded Sep 24, 2026 in 1m 22s

No issues identified (2 code objects reviewed).

• Reviewed files modified since 345895b; other PR files not modified since then were skipped.
• Merge Base: aff9318
• Head: 125105c

Details

✅ File Path U3 Bytes Comments Posted Reason
✅ apps/web/src/components/ChatView.tsx 429 0
➖ apps/web/src/components/ChatMarkdown.test.tsx 311 Excluded by macroscope ignore file
✅ apps/web/src/components/ChatMarkdown.tsx 586 0

Billed Total: 10.00KB of diff | $0.50 (This review was charged at our per-review byte minimum of 10.00KB. Learn more here)

Filtered Issues Details

apps/web/src/components/ChatMarkdown.tsx
  • line 963: canRun only checks that code ends in a newline; it never rejects embedded newlines. Thus a closed bash fence such as echo one\necho two\n passes every condition and the click handler sends both commands to the terminal, even though multiline blocks are meant to have no Run action (and the added test includes this input). [ Already posted ]
apps/web/src/components/ChatView.tsx
  • line 9906: Passing onRunShellCommand here enables the Run button for multiline shell fences: MarkdownCodeBlock only requires a nonempty command ending in a newline and never checks that the trimmed text contains no internal newline. Thus a completed bash block such as echo one\necho two\n receives a Run action and both commands are written to the terminal, contrary to the intended single-line restriction. [ Already posted ]