Skip to content

Commit d3dee7d

Browse files
authored
🤖 fix: add consistent padding to bash tool waiting state (#1009)
Fixes padding inconsistency in the bash tool's "Waiting for result" section when expanded during execution. ## Changes - Add `px-2 py-1.5` padding to the `DetailContent` in the waiting state to match Script/Output sections - Add `WithBashToolWaiting` story to demonstrate the executing state with proper padding _Generated with `mux`_
1 parent ad7e163 commit d3dee7d

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

src/browser/components/tools/BashToolCall.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export const BashToolCall: React.FC<BashToolCallProps> = ({
136136

137137
{status === "executing" && !result && (
138138
<DetailSection>
139-
<DetailContent>
139+
<DetailContent className="px-2 py-1.5">
140140
Waiting for result
141141
<LoadingDots />
142142
</DetailContent>

src/browser/stories/App.chat.stories.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
createTerminalTool,
1515
createStatusTool,
1616
createGenericTool,
17+
createPendingTool,
1718
} from "./mockFactory";
1819
import { setupSimpleChatStory, setupStreamingChatStory } from "./storyHelpers";
1920
import { within, userEvent, waitFor } from "@storybook/test";
@@ -251,6 +252,54 @@ npm test 2>&1 | head -20`,
251252
},
252253
};
253254

255+
/** Bash tool in executing state showing "Waiting for result" */
256+
export const WithBashToolWaiting: AppStory = {
257+
render: () => (
258+
<AppWithMocks
259+
setup={() =>
260+
setupSimpleChatStory({
261+
workspaceId: "ws-bash-waiting",
262+
messages: [
263+
createUserMessage("msg-1", "Run the tests", {
264+
historySequence: 1,
265+
timestamp: STABLE_TIMESTAMP - 100000,
266+
}),
267+
createAssistantMessage("msg-2", "Running the test suite:", {
268+
historySequence: 2,
269+
timestamp: STABLE_TIMESTAMP - 90000,
270+
toolCalls: [
271+
createPendingTool("call-1", "bash", {
272+
script: "npm test",
273+
run_in_background: false,
274+
display_name: "Test Runner",
275+
timeout_secs: 30,
276+
}),
277+
],
278+
}),
279+
],
280+
})
281+
}
282+
/>
283+
),
284+
parameters: {
285+
docs: {
286+
description: {
287+
story:
288+
"Bash tool in executing state with 'Waiting for result...' showing consistent padding.",
289+
},
290+
},
291+
},
292+
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
293+
const canvas = within(canvasElement);
294+
295+
// Expand the bash tool to show "Waiting for result" section
296+
await waitFor(async () => {
297+
const toolHeader = canvas.getByText(/npm test/);
298+
await userEvent.click(toolHeader);
299+
});
300+
},
301+
};
302+
254303
/** Chat with agent status indicator */
255304
export const WithAgentStatus: AppStory = {
256305
render: () => (

0 commit comments

Comments
 (0)