Skip to content

fix(cockpit-chat-debug): give the devtools State tab real state to show - #1070

Merged
blove merged 1 commit into
mainfrom
blove/chat-debug-state
Sep 8, 2026
Merged

fix(cockpit-chat-debug): give the devtools State tab real state to show#1070
blove merged 1 commit into
mainfrom
blove/chat-debug-state

Conversation

@blove

@blove blove commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closes the two open items on the c-debug capability from the docs-accuracy arc: the authored fixture, and the permanently empty State tab.

The State tab had nothing to show

The dock has two tabs and only one of them demonstrated anything. The graph was a plain MessagesState, and agent.state() is the values bag with messages projected out into the transcript — so the inspector printed {} for every run, while the page promised it "pretty-prints the agent's current state".

The process node already computed the metrics; it buried them in a message. DebugState widens MessagesState with an analysis dict so those numbers land where the inspector can render them. The narrated message is unchanged, so the transcript reads the same.

The fixture is now recorded, not authored

#1063 shipped with an authored fixture because no API key was available in that environment. It is now recorded from a real run through scripts/record-aimock-cap.sh c-debug, with the registered prompt.

The spec now asserts the thing that changed

The old State assertion was /^\{[\s\S]*\}$/ — satisfied by the empty object it was documenting, and its comment said a graph carrying real state "should widen this tab's coverage, not fail it". It now asserts analysis, characters and words. That text did not exist in state before this change, so the assertion can only pass because of it.

Verification

  • nx e2e cockpit-chat-debug-angular — 4 passed, run twice (before and after tightening the assertion).
  • ast.parse on the graph; docs guards (docs-example-code, docs-content-rules, public-copy, cockpit-retirement) 50 passed.
  • GROWTH_FORM_POLICY=growth_v1 nx build website green; the page renders 5 includes for 5 tags, including the new debug-state region.

🤖 Generated with Claude Code

The dock has two tabs and only one of them demonstrated anything. Its graph
was a plain MessagesState, and agent.state() projects messages out into the
transcript, so the State inspector printed an empty object no matter what the
run did — the page still promised it 'pretty-prints the agent's current state'.

The process node already computed the metrics; it just buried them in a
message. DebugState widens MessagesState with an analysis dict, so those
numbers land in state where the inspector can render them.

The fixture is now recorded from a real run rather than authored, and the
State spec asserts the analysis keys instead of merely asserting the
inspector renders some object — the shape the old comment said should widen
this tab's coverage rather than fail it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 8, 2026 8:35pm UTC

Request Review

@blove
blove enabled auto-merge (squash) September 8, 2026 20:28

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 9403bf8 into main Sep 8, 2026
33 checks passed
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.

1 participant