test(site/src/pages/AgentsPage): add Debug panel Storybook stories (#23921)

## Summary

Add comprehensive Storybook stories covering the Debug panel in various states: loading, empty, single/multiple runs, expanded steps, tool calls, error states, and streaming indicators.

This is PR 9/9 in the chat debug logging stack.

### Changes

- **DebugPanel stories** (`site/src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx`): Storybook stories with `play` functions for interaction testing, covering:
  - Loading state
  - Empty / disabled state
  - Single-step successful run
  - Multi-step run with tool calls
  - Error state with redacted headers
  - Compaction and title generation run kind badges
  - Long raw request/response payload rendering
  - Streaming / in-progress indicators

### Stack overview

1. Database schema & SDK types
2. Types, context, and model normalization
3. Recorder, transport, and redaction
4. Service and summary aggregation
5. Chat lifecycle wiring
6. HTTP handlers and API docs
7. Frontend API layer and panel utilities
8. Debug panel components and settings
9. **→ Storybook stories** (this PR)

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `anthropic:claude-opus-4-6` • Thinking: `xhigh`_
This commit is contained in:
Thomas Kosiewski
2026-04-22 15:44:32 +02:00
committed by GitHub
parent 249b71b96a
commit 5c316d4252
3 changed files with 1358 additions and 1 deletions
@@ -22,6 +22,15 @@ const baseProps = {
desktopEnabledData: {
enable_desktop: false,
} as TypesGen.ChatDesktopEnabledResponse,
debugLoggingData: {
allow_users: false,
forced_by_deployment: false,
} as TypesGen.ChatDebugLoggingAdminSettings,
userDebugLoggingData: {
debug_logging_enabled: false,
user_toggle_allowed: false,
forced_by_deployment: false,
} as TypesGen.UserChatDebugLoggingSettings,
workspaceTTLData: {
workspace_ttl_ms: 0,
} as TypesGen.ChatWorkspaceTTLResponse,
@@ -46,6 +55,10 @@ const baseProps = {
isSaveUserPromptError: false,
isSavingDesktopEnabled: false,
isSaveDesktopEnabledError: false,
isSavingDebugLogging: false,
isSaveDebugLoggingError: false,
isSavingUserDebugLogging: false,
isSaveUserDebugLoggingError: false,
isSavingWorkspaceTTL: false,
isSaveWorkspaceTTLError: false,
isSavingRetentionDays: false,
@@ -61,6 +74,8 @@ const meta = {
onSavePlanModeInstructions: fn(),
onSaveUserPrompt: fn(),
onSaveDesktopEnabled: fn(),
onSaveDebugLogging: fn(),
onSaveUserDebugLogging: fn(),
onSaveWorkspaceTTL: fn(),
onSaveRetentionDays: fn(),
onSaveThreshold: fn(),
@@ -174,8 +174,8 @@ const BehaviorRouteElement = () => {
}}
userDebugLoggingData={{
debug_logging_enabled: false,
forced_by_deployment: false,
user_toggle_allowed: false,
forced_by_deployment: false,
}}
workspaceTTLData={{ workspace_ttl_ms: 0 }}
isWorkspaceTTLLoading={false}