Skip to content

fix(tui): preserve Code Mode row background after truncation - #684

Merged
tt-a1i merged 1 commit into
mainfrom
codex/codemode-background-continuity
Oct 4, 2026
Merged

tt-a1i merged 1 commit into
mainfrom
codex/codemode-background-continuity

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Refs #683. Truncating a Code Mode Bash preview clears the row background after the command, exposing terminal-colored ellipsis and right padding.

Value

Main and child Code Mode cards retain an uninterrupted background, including long or wrapped evidence.

Approach

Reapply the owning background after Pi's full SGR reset, preserving the reset's foreground/style semantics.

Summary

 framed(row)
-  background(row + padding)
+  background(each segment separated by native SGR reset)
+  retain resets between segments

Evidence

  • Before: new ANSI-state regression fails on an unpainted ellipsis/trailing cell at 40 columns.
  • After: 21/21 focused renderer/native tests pass on Pi 0.99.1 and installed Pi 1.0.2. Regression checks every visible character, including padding, at 40/120/240 columns in collapsed/expanded views with wide characters.
  • Independent review: no blockers.
  • Investigation: docs/research/CODEMODE_TUI_PRESENTATION_2026-10-04.md, dated background-continuity appendix.

Validation

bun run check and the documentation contract passed. One full bun run test passed: Node 2296 passed / 9 skipped in 326.49s, UI 1158 passed in 32.79s. All 17 exact-head CI jobs passed, including the three required merge checks. Installed dirty source was preserved; current running terminal pixels after reload remain unverified.

Impact

User-visible: continuous card background. Model-visible tools/results, execution/lifecycle, persisted configuration and truncation budgets: unchanged. Uses the existing public Theme background API; no host modification.

Merge Danger

Door: two-way. Small presentation-only change, reversible without data migration.

Blast Radius: CodeMode.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 4, 2026
@tt-a1i
tt-a1i merged commit 3cb2ecf into main Oct 4, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant