Skip to content

fix(client-runtime): unwrap uppercase or mixed-case shell executables like Bash.exe in command display text - #43289

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/client-runtime-command-label-shell-case
Nov 26, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/client-runtime-command-label-shell-case

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

Work-log rows and activity banners hide a POSIX shell wrapper, so bash -lc "git status" shows as git status. On Windows, Git Bash often reports the executable as Bash.exe or BASH.EXE, and those commands stayed wrapped: Bash.exe -lc "git status" showed in full instead of git status. withoutShellWrapper stripped .exe without regard to case, but compared the rest to the lowercase shell list without lowercasing it.

Change

withoutShellWrapper lowercases the executable name once, as commandProgramNameInternal and commandHighlightLanguage already do, and both the POSIX and the Windows shell lookups reuse that value. Web and mobile both get the fix through packages/client-runtime.

Scope

A small fix of a clear bug: the same name is already lowercased on the sibling paths in this file, so it needs no issue.

Verification

Base b996cf2, head c15fb49. An AI agent (Claude Opus 5.5, T3 Code Nightly) ran each check below.

Setup: web app from vp run dev, Linux, light theme, 1280×800, fresh isolated data on each commit. The free Replay (dev) provider replays its Command output turn, with the command changed locally (capture only) to Bash.exe -lc "git status".

Steps: open the replayed thread → expand "Worked for".

b996cf2 (base) c15fb49 (head)
The command row shows Bash.exe -lc "git status". The command row shows git status.
The command row shows Bash.exe -lc "git status". The command row shows git status.

commandDisplayText on each commit (Node 26.13.1):

input                                               b996cf2 (base)                                      c15fb49 (head)
Bash.exe -lc "git status"                           Bash.exe -lc "git status"                           git status
BASH.EXE -lc "npm test"                             BASH.EXE -lc "npm test"                             npm test
"C:\Program Files\Git\bin\Bash.exe" -lc "rg foo"    "C:\Program Files\Git\bin\Bash.exe" -lc "rg foo"    rg foo
Zsh -lc "ls"                                        Zsh -lc "ls"                                        ls
bash -lc "git status"                               git status                                          git status
CMD.EXE /c "npm test"                               npm test                                            npm test
Bash.exe -c "printf ok" arg0                        Bash.exe -c "printf ok" arg0                        Bash.exe -c "printf ok" arg0
  • commandLabel.test.ts adds the first three inputs to the Windows shell wrapper table. All three fail on base and pass on head (3 of 3 runs).
  • vp run check:changed passes.

Not shown: mobile uses the same commandDisplayText in apps/mobile/src/lib/threadActivity.ts, so the fix applies there with no mobile change.

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The shell-wrapper matcher now lowercases the extracted executable before Windows shell checks. Tests cover unwrapping -lc scripts from Bash.exe and a quoted Git-for-Windows Bash executable path.

Changes: Shell wrapper matching

Layer / File(s) Summary
Normalize and test shell wrappers
packages/client-runtime/src/work-log/commandLabel.ts, packages/client-runtime/src/work-log/commandLabel.test.ts
withoutShellWrapper lowercases the extracted executable before Windows shell checks and passes the normalized program to the script-index lookup. Tests expect unwrapped script text for Bash.exe and a quoted Git-for-Windows Bash path.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to afcac

Mixed-case and uppercase Windows shell executables such as Bash.exe now have their wrapper stripped in command display text. The change is small, localized and covered by new tests, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: withoutShellWrapper now unwraps uppercase or mixed-case Windows shell executables such as Bash.exe in command display text. The raw summary confirms the executable nam…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. The problem and change are clear, and the scope explains why no issue is linked. Verification gives a before/af…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: withoutShellWrapper now unwraps uppercase or mixed-case Windows shell executables such as Bash.exe in command display text. The raw summary confirms the executable name is lowercased before shell matching, and the added tests cover Bash.exe, BASH.EXE and a quoted Git Bash path. The title is long at 107 characters, but it is specific and on topic.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. The problem and change are clear, and the scope explains why no issue is linked. Verification gives a before/after table of commandDisplayText outputs, test results on base and head, and the check run. It also states what was not shown, which is mobile. The template's Verification section asks for focused tests or manual checks with observed results, and these are provided. The description does not link an issue, but it explains why one is not needed. The Scope section does not mention a maintainer request, and the template asks for one only if a maintainer asked. The author also lists the agent and model, as the template requests.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c15fb49 and afcac3c.

Files selected for processing: 1

  • packages/client-runtime/src/work-log/commandLabel.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
@juliusmarminge

ghost commented Nov 26, 2026

Copy link
Copy Markdown
Member

Evidence

Replayed the same three commands on fresh projects in the real web app (1280×800, light theme), then expanded Worked for → Ran 3 commands. The base retains Bash.exe and BASH.EXE; the fix displays git status, npm test, and git status.

Before After
5a563f8df4 afcac3c9c6
Before: shell wrappers remain After: shell wrappers removed
Before recording After recording

Reproduction scenario and fixture driver. scenarios:prove exited 0: failed on base, passed on head.

Not shown:

  • Mobile and desktop clients were not run; this proof covers the shared command display behavior in the web client.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 26, 2026
@juliusmarminge
juliusmarminge merged commit 567aa0b into pingdotgg:main Nov 26, 2026
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants