feat(dashboard): show thinking blocks fully expanded in LLM Calls tab#1037
Merged
feat(dashboard): show thinking blocks fully expanded in LLM Calls tab#1037
Conversation
nhopeatall
approved these changes
Mar 24, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — clean, focused change that replaces a collapsible <details>/<summary> wrapper with an always-visible <div> block for thinking content. The component change is minimal and correct, CI passes, and the parser is well-tested.
Notes
- The
buildThinkingLabeltests in the firstdescribeblock (tests/unit/web/llm-call-detail.test.ts:22) re-implement the label logic in a local helper rather than testing the actual component. They effectively testString.prototype.lengthandtoLocaleString()— built-in JS behavior. Consider whether these 4 tests add enough signal to justify their maintenance cost. - Several
parseLlmResponsetests (tests/unit/web/llm-call-detail.test.ts:63+) overlap with the existing suite intests/unit/utils/llmResponseParser.test.ts(which already covers thinking block parsing at line 60). The new tests do add some incremental coverage (multiple thinking blocks in sequence, full text preservation assertions), but the overlap is worth noting for future maintainers since the parser is a mirrored file (web/src/lib/↔src/utils/) and tests exist for both copies.
🕵️ claude-code · claude-opus-4-6 · run details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<details>/<summary>collapsible wrapper from theThinkingBlockcomponent inweb/src/components/llm-calls/llm-call-detail.tsx— thinking content now renders inline without requiring a click to expand💭 Thinking (N chars)as a header and the full thinking text below using consistent styling (text-xs,text-muted-foreground,whitespace-pre-wrap)max-h-96on the raw view (separate scroll container for full JSON) and add a clarifying comment explaining the intentional design differencetests/unit/web/llm-call-detail.test.tscovering char count label logic, thinking block parsing, full text preservation, and structural guaranteesWhat changed
web/src/components/llm-calls/llm-call-detail.tsxThe
ThinkingBlockcomponent previously used a<details>/<summary>HTML element requiring a click to expand thinking content. It now renders using a<div>with:💭 Thinking (N chars)<pre>element withwhitespace-pre-wrapandtext-muted-foregroundThe raw view retains its
max-h-96scroll constraint with an explanatory comment.tests/unit/web/llm-call-detail.test.ts(new file)11 tests across 4 describe blocks:
toLocaleString()formatting for various text lengthsTest plan
npx vitest run --project unit-core tests/unit/web/llm-call-detail.test.ts)npm run lint)npm run typecheck)Notes
getLlmCall; no backend changes neededsrc/api/routers/runs.ts) is unaffectedCard: https://trello.com/c/69c2917a20a5a3219e237bb7
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details