Storybook stories for the `ToolExecutionDisplay` chat component, covering executing, success, and failure states in both collapsed and expanded views. ## Key Components | Export | Description | |---|---| | `CollapsedExecuting` | Story showing spinner state while a tool is actively running | | `CollapsedSuccess` | Story showing green check after successful RMM script execution | | `CollapsedFailure` | Story showing red error icon after a failed MDM profile deployment | | `constrainedDecorator` | Helper that wraps stories in a max-width container (default 400px) to simulate chat bubble constraints | ### Fixture Data | Variable | Type | Description | |---|---|---| | `executingMessage` | `ToolExecutionData` | In-progress RMM `run_script` call | | `executedSuccessMessage` | `ToolExecutionData` | Completed RMM `run_script` with process list output | | `executedFailureMessage` | `ToolExecutionData` | Failed Fleet MDM `deploy_profile` with error string | ## Usage Example ```typescript import { ToolExecutionDisplay } from "../components/chat/tool-execution-display"; import type { ToolExecutionData } from "../components/chat/types"; const message: ToolExecutionData = { type: "EXECUTING_TOOL", integratedToolType: "OPENFRAME_RMM", toolFunction: "run_script", parameters: { RunAsUser: "False", timeoutSeconds: 60 }, }; // Render the component directly in your chat UI ``` ## Notes - Stories are registered under `Chat/Admin/ToolExecutionDisplay` in Storybook. - The `constrainedDecorator` accepts an optional `width` argument (default `400`) to test layout at narrow chat widths. - The success fixture includes a realistic suspicious process output to validate result rendering. - Source: [`ToolExecutionDisplay.stories.tsx`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/ToolExecutionDisplay.stories.tsx)