Skip to content

fix(overlay): correct padding, ANSI clipping, and Unicode rendering - #72

Merged
mabd-dev merged 4 commits into
mabd-dev:mainfrom
frittlechasm:fix/overlay-rendering
Sep 6, 2026
Merged

fix(overlay): correct padding, ANSI clipping, and Unicode rendering#72
mabd-dev merged 4 commits into
mabd-dev:mainfrom
frittlechasm:fix/overlay-rendering

Conversation

@frittlechasm

@frittlechasm frittlechasm commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Fixes overlay rendering issues found while adding test coverage in #71. The fixes address ignored bottom padding, incorrect character alignment, duplicated ANSI escape bytes, and custom whitespace rendering.

Changes Made

  • Honor vertical padding for bottom-right overlays.
  • Preserve alignment when clipping through double-width characters.
  • Prevent duplicate ANSI escape bytes while preserving styles and resets.
  • Render custom whitespace without exceeding the available width and handle patterns containing only zero-width characters.
  • Add regression tests with exact output assertions.

Testing

  • Tests from #71 also pass when combined with these fixes.
  • ran locally on macOS
  • Tested locally with example workflows
  • Added new tests (if applicable)
  • Tested with different filters, output, etc...

Checklist

  • I have starred the repository
  • My code follows the project's code style
  • I have updated the documentation (README, cli-flags, etc...)
  • My changes generate no new warnings
  • I have tested my changes in a real workflow
  • All tests pass locally

Greptile Summary

This PR corrects bottom-right overlay placement and strengthens ANSI-aware clipping, Unicode cell-width handling, and custom whitespace rendering. Focused rendering checks confirmed the updated behavior across styled wide glyphs, combining characters, and zero-width whitespace patterns.

Confidence Score: 5/5

Safe to merge: no blocking issues were identified in the changed overlay behavior.

The completed focused rendering checks passed on the PR revision, and no actionable issues remain.

Files Needing Attention: None.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the edge-case validation test for PR72 overlay and captured the before-state results showing two edge-case checks not met.
  • Compared the after-state results with the PR head and confirmed all edge-case checks pass.
  • Reviewed the authored and executed test source that drives this validation to confirm its scope and intent.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(overlay): preserve padding and unico..." | Re-trigger Greptile

@mabd-dev
mabd-dev merged commit f2891f9 into mabd-dev:main Sep 6, 2026
4 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.

2 participants