fix: remove hardcoded Unix $ prompt prefix from terminal UI (#11429)

The terminal command display hardcoded a `$ ` before every command.
This is a Unix shell convention with no meaning on Windows (PowerShell,
cmd) and doesn't reflect the user's actual shell. Since the command is
already visually distinct inside a labeled Terminal block, the prefix
adds no information and is misleading cross-platform.

Closes #11428

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shanevcantwell 2026-03-19 16:39:05 -06:00 • committed by GitHub
parent af4383f6df
commit a952ea1450
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ describe("UnifiedTerminalCommand", () => {
);
// Should show the command
expect(screen.getByText(`$ ${MOCK_COMMAND}`)).toBeInTheDocument();
expect(screen.getByText(MOCK_COMMAND)).toBeInTheDocument();
// Should show terminal header
expect(screen.getByText("Terminal")).toBeInTheDocument();
@ -69,7 +69,7 @@ describe("UnifiedTerminalCommand", () => {
);
// Should show the command and output
expect(screen.getByText(`$ ${MOCK_COMMAND}`)).toBeInTheDocument();
expect(screen.getByText(MOCK_COMMAND)).toBeInTheDocument();
// Check that the output content exists in the container
expect(container.textContent).toMatch(/Test 1 passed/);
@ -308,7 +308,7 @@ describe("UnifiedTerminalCommand", () => {
);
// Should show command but no output section
expect(screen.getByText(`$ ${MOCK_COMMAND}`)).toBeInTheDocument();
expect(screen.getByText(MOCK_COMMAND)).toBeInTheDocument();
// Should not show any output content
const outputElements = container.querySelectorAll(

View file

@ -409,7 +409,7 @@ export function UnifiedTerminalCommand({
// Create combined content for copying (command + output)
const copyContent = useMemo(() => {
let content = `$ ${command}`;
let content = command;
if (hasOutput) {
content += `\n\n${output}`;
}
@ -458,7 +458,7 @@ export function UnifiedTerminalCommand({
<pre className="bg-editor">
<code>
{/* Command is always visible */}
<div className="text-terminal pb-2">$ {command}</div>
<div className="text-terminal pb-2">{command}</div>
{/* Running state with cursor */}
{isRunning && !hasOutput && (