claude-code - 💡(How to fix) Fix Wide-table fallback leaves stale bordered paint in scroll buffer alongside the key-value re-render [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55938Fetched 2026-05-05 06:02:26
View on GitHub
Comments
3
Participants
2
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×4commented ×3renamed ×2closed ×1

When a markdown table is wider than the terminal can fit cleanly, the Ink renderer falls back to a vertical key-value layout (one card per row). This fallback itself is tracked separately in #44696. This issue is about the second-order bug: the failed bordered paint is not erased when the renderer switches to the card layout — it remains in the terminal's scroll buffer, so the same table appears twice in scrollback: first as a half-broken bordered ASCII table, then as the stacked key-value cards.

The result is roughly double-length output for every wide table, and the user has to scroll past a corrupted bordered render before reaching the (intended) card render.

Root Cause

When a markdown table is wider than the terminal can fit cleanly, the Ink renderer falls back to a vertical key-value layout (one card per row). This fallback itself is tracked separately in #44696. This issue is about the second-order bug: the failed bordered paint is not erased when the renderer switches to the card layout — it remains in the terminal's scroll buffer, so the same table appears twice in scrollback: first as a half-broken bordered ASCII table, then as the stacked key-value cards.

The result is roughly double-length output for every wide table, and the user has to scroll past a corrupted bordered render before reaching the (intended) card render.

RAW_BUFFERClick to expand / collapse

Summary

When a markdown table is wider than the terminal can fit cleanly, the Ink renderer falls back to a vertical key-value layout (one card per row). This fallback itself is tracked separately in #44696. This issue is about the second-order bug: the failed bordered paint is not erased when the renderer switches to the card layout — it remains in the terminal's scroll buffer, so the same table appears twice in scrollback: first as a half-broken bordered ASCII table, then as the stacked key-value cards.

The result is roughly double-length output for every wide table, and the user has to scroll past a corrupted bordered render before reaching the (intended) card render.

Repro

Send any 3-column markdown table whose natural width exceeds the current Alacritty window, e.g.:

```markdown

seedDCP pathwhy audit dropped, why keep
photopersonalInfo.selfieImageUrlDCP has the slot; not all photo fields are file-uploads
githubotherSocialLinks[platform=GitHub].urlaudit collapses to "other_social_url" — loses platform-specific routing
twitterotherSocialLinks[platform=X / Twitter].urlsame — keep specific
education_field_of_studyprimaryEducation.fieldOfStudyDCP-backed, common form field
education_gpaprimaryEducation.gradeValueDCP-backed
education_start_date / end_dateprimaryEducation datesDCP-backed
skillsskillsCompetency.hardSkillscore matching field
```

Observed (see attached screenshots)

Output contains, in this order:

  1. Stale bordered ASCII table — borders do not align across rows, content overflows columns, some cells are clipped onto separate lines (e.g. twitter shows up as just itter). This is the renderer's first attempt before it gives up on the bordered layout.
  2. Stacked key-value cards — the same rows again, one block per row with three labeled lines (seed:, DCP path:, why audit dropped, why keep:). This is the intended fallback (also the subject of #44696).

Both are present in scrollback simultaneously. Resizing or new output does not clear the first paint.

Expected

When the renderer decides to fall back from the bordered layout to the card layout, it should clear/replace the failed bordered paint, not leave it in scroll history. Only one rendering of the table should be present in scrollback.

Environment

  • Claude Code: `2.1.126`
  • OS: macOS (Darwin 25.2.0, arm64)
  • Terminal: Alacritty (`TERM=alacritty`)

Related, but distinct

  • #44696 — "Wide markdown tables collapse into stacked key-value cards" — covers the fallback layout itself. This issue is specifically about the stale first paint that #44696 doesn't mention.
  • #52866 — "Terminal re-renders entire conversation output repeatedly" — different trigger (sequential tool calls), but plausibly the same family of Ink repaint/clear bug.

extent analysis

TL;DR

The issue can be addressed by modifying the Ink renderer to clear the failed bordered paint when switching to the card layout.

Guidance

  • Investigate the Ink renderer's fallback logic to identify why the initial bordered paint is not being erased.
  • Review the code responsible for rendering the card layout to ensure it properly clears the previous render.
  • Consider adding a clear or reset function to the renderer to handle cases where the layout needs to be switched.
  • Verify that the issue is specific to the Alacritty terminal and Claude Code version 2.1.126, and test on other environments to determine if it's an isolated problem.

Example

No code snippet is provided as the issue lacks specific implementation details.

Notes

The issue may be related to other repaint or clear bugs, such as #52866, and resolving this issue may require a broader review of the Ink renderer's behavior.

Recommendation

Apply a workaround to clear the previous render when switching to the card layout, as the root cause of the issue is likely related to the Ink renderer's fallback logic.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Wide-table fallback leaves stale bordered paint in scroll buffer alongside the key-value re-render [3 comments, 2 participants]