Skip to content

fix(tui): wrap long JSON values in detail views - #2212

Merged
notgitika merged 1 commit into
refactorfrom
fix/tui-json-detail-wrap
Sep 3, 2026
Merged

fix(tui): wrap long JSON values in detail views#2212
notgitika merged 1 commit into
refactorfrom
fix/tui-json-detail-wrap

Conversation

@notgitika

@notgitika notgitika commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Wrap long JSON values in TUI detail views instead of truncating them.
Adds regression coverage for long harness prompts.

before:
image

after:
image

@github-actions github-actions Bot added the size/xs PR size: XS label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026
@github-actions github-actions Bot added size/xs PR size: XS and removed size/xs PR size: XS labels Sep 3, 2026

@agentcore-devx-automation agentcore-devx-automation 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.

AgentCore Harness Review

Verdict: Looks good

Small, well-scoped fix. CodeBlock already accepted a wrap prop; JsonDetail just wasn't passing it, so long JSON values (like a multi-sentence systemPrompt) were being truncated with . Toggling wrap on skips the truncation branch in CodeBlock.renderLine and lets Ink's <Text> wrap naturally within the ScrollView.

The test is a genuine behavior check, not a snapshot: it builds a ~245‑char prompt with a WRAP_SENTINEL at the end, renders at the default 100-column test width, and asserts the sentinel appears in the frame. Without wrap, the sentinel would be sliced off by the truncation in CodeBlock.renderLine, so it correctly guards against regression. Mocking is limited to TestCoreClient at the SDK boundary — appropriate. No telemetry needed for a rendering fix.

Nothing blocking — good to merge.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.08%. Comparing base (4d806e8) to head (e695fee).
⚠️ Report is 2 commits behind head on refactor.

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2212   +/-   ##
=========================================
  Coverage     97.08%   97.08%           
=========================================
  Files           544      544           
  Lines         37869    37870    +1     
=========================================
+ Hits          36765    36766    +1     
  Misses         1104     1104           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@notgitika
notgitika merged commit 97d3d9a into refactor Sep 3, 2026
38 of 40 checks passed
@notgitika
notgitika deleted the fix/tui-json-detail-wrap branch September 3, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants