Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/browser/components/tools/BashToolCall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const BashToolCall: React.FC<BashToolCallProps> = ({

{status === "executing" && !result && (
<DetailSection>
<DetailContent>
<DetailContent className="px-2 py-1.5">
Waiting for result
<LoadingDots />
</DetailContent>
Expand Down
49 changes: 49 additions & 0 deletions src/browser/stories/App.chat.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
createTerminalTool,
createStatusTool,
createGenericTool,
createPendingTool,
} from "./mockFactory";
import { setupSimpleChatStory, setupStreamingChatStory } from "./storyHelpers";
import { within, userEvent, waitFor } from "@storybook/test";
Expand Down Expand Up @@ -251,6 +252,54 @@ npm test 2>&1 | head -20`,
},
};

/** Bash tool in executing state showing "Waiting for result" */
export const WithBashToolWaiting: AppStory = {
render: () => (
<AppWithMocks
setup={() =>
setupSimpleChatStory({
workspaceId: "ws-bash-waiting",
messages: [
createUserMessage("msg-1", "Run the tests", {
historySequence: 1,
timestamp: STABLE_TIMESTAMP - 100000,
}),
createAssistantMessage("msg-2", "Running the test suite:", {
historySequence: 2,
timestamp: STABLE_TIMESTAMP - 90000,
toolCalls: [
createPendingTool("call-1", "bash", {
script: "npm test",
run_in_background: false,
display_name: "Test Runner",
timeout_secs: 30,
}),
],
}),
],
})
}
/>
),
parameters: {
docs: {
description: {
story:
"Bash tool in executing state with 'Waiting for result...' showing consistent padding.",
},
},
},
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
const canvas = within(canvasElement);

// Expand the bash tool to show "Waiting for result" section
await waitFor(async () => {
const toolHeader = canvas.getByText(/npm test/);
await userEvent.click(toolHeader);
});
},
};

/** Chat with agent status indicator */
export const WithAgentStatus: AppStory = {
render: () => (
Expand Down