Skip to content

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

Merged
ThomasK33 merged 4 commits into
mainfrom
devtools/09-storybook-stories
Apr 22, 2026
Merged

test(site/src/pages/AgentsPage): add Debug panel Storybook stories#23921
ThomasK33 merged 4 commits into
mainfrom
devtools/09-storybook-stories

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

@ThomasK33 ThomasK33 commented Apr 1, 2026

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 • Model: anthropic:claude-opus-4-6 • Thinking: xhigh

Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 846b8bda15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx Outdated
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch from 846b8bd to ce7722a Compare April 1, 2026 14:59
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from b67aae1 to 2bb04f1 Compare April 1, 2026 14:59
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch from ce7722a to a438aad Compare April 1, 2026 16:59
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from 2bb04f1 to 9e5bdfd Compare April 1, 2026 16:59
@ThomasK33 ThomasK33 changed the title test(site/AgentsPage): add Debug panel Storybook stories test(site): add Debug panel Storybook stories Apr 1, 2026
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from 9e5bdfd to cb3da60 Compare April 1, 2026 17:02
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch from a438aad to ab825f3 Compare April 1, 2026 17:02
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab825f31bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx Outdated
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from cb3da60 to 52a4b9d Compare April 1, 2026 17:13
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch from ab825f3 to d8d79ef Compare April 1, 2026 17:13
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from 52a4b9d to 6481b60 Compare April 1, 2026 17:37
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch from d8d79ef to 57dc11a Compare April 1, 2026 17:37
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch from 6481b60 to 6b4f8e2 Compare April 1, 2026 17:39
@ThomasK33 ThomasK33 force-pushed the devtools/09-storybook-stories branch 2 times, most recently from 1a7d92e to 0c93cd7 Compare April 1, 2026 18:00
@ThomasK33 ThomasK33 force-pushed the devtools/08-debug-panel-components-settings branch 2 times, most recently from 049b797 to f7a54c1 Compare April 1, 2026 18:01
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

Testing

  • ⚠️ cd site && pnpm test:storybook src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx (failed in this environment because vitest is not installed and node_modules is missing).
  • git commit -m "test(site/src/pages/AgentsPage/components/RightPanel/DebugPanel): add disabled debug panel story" (commit 739fbad created successfully).

PR

  • Created PR metadata via make_pr with title:
    test(site/src/pages/AgentsPage/components/RightPanel/DebugPanel): add disabled state story coverage.

Screenshot

  • ⚠️ Could not take a screenshot because the browser_container screenshot tool is not available in this environment.

View task →

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

Added a dedicated Disabled story that sets enabled: false so the disabled-query path is exercised directly (not just implied by Empty), with play assertions for the "No debug runs recorded yet" heading and the Settings → Behavior guidance. Thanks for the nudge.

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6540bd27aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AgentsPage/components/RightPanel/DebugPanel/DebugPanel.stories.tsx Outdated
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Copy Markdown
Member Author

whoops, seems like the rebase broke some tests here. looking into it

Copy link
Copy Markdown
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 9. Story file unchanged since R5 (approved). All prior findings resolved. 13/13 stories pass.

One new observation from Chopper and Bisky: DebugRunCard has three internal rendering branches after a run is expanded (detail loading, detail error, empty steps) with no story coverage. This is one component layer deeper than the panel-level states covered in R3. The risk is low since these branches use shared primitives (Alert, Spinner, plain text), but the branching logic itself is untested. Posted as a P3 inline.

"A developer who breaks the error alert rendering inside an expanded run card would get no failing test." -- Chopper

🤖 This review was automatically generated with Coder Agents.

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Member Author

ThomasK33 commented Apr 22, 2026

Merge activity

  • Apr 22, 1:01 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 22, 1:36 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 22, 1:44 PM UTC: @ThomasK33 merged this pull request with Graphite.

Change-Id: Ie8f0165549c1e0d2e7467a753539d9ef4e296876
Signed-off-by: Thomas Kosiewski <tk@coder.com>
… Disabled story exercising enabled=false path

Change-Id: I458599156f70563c97ca963dea634823b4f6b620
Signed-off-by: Thomas Kosiewski <tk@coder.com>
… invalid Settings hint assertion from Disabled story

Change-Id: I215699d56b4374c0ad7f5fc190c8024f08a5bba1
Signed-off-by: Thomas Kosiewski <tk@coder.com>
…er DebugRunCard detail branches

Add three stories that exercise the detail loading spinner, detail error
Alert, and empty-steps fallback rendered by DebugRunCard after a run is
expanded. Also realign the ErrorStateWithRedactedHeaders assertion on the
rendered error message instead of the non-rendered error code, matching
DebugStepCard's getErrorMessage-based output.

Change-Id: Id04f57852686688d8a6188f61972df506b409026
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants