Skip to content

fix(plugin): improve buddy rendering alignment for wide characters#1220

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/buddy-rendering-alignment
Apr 3, 2026
Merged

fix(plugin): improve buddy rendering alignment for wide characters#1220
JeremyDev87 merged 1 commit into
masterfrom
fix/buddy-rendering-alignment

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Add display-width-aware text rendering utilities (display_width, pad_to_display_width, truncate_to_display_width, truncate_left_to_display_width) using unicodedata
  • Extract reusable render_face_banner, render_section_header, and render_box_line helpers
  • Fix face box misalignment when custom/wide Unicode faces are used (e.g., CJK, emoji)
  • Fix Intelligence Report and Impact Report box lines breaking alignment with wide text
  • Dynamic box width calculation based on actual content display width
  • Fix face variable shadowing in render_session_summary that caused wrong face in farewell line

Test plan

  • New test: test_render_buddy_face_box_scales_for_longer_face — verifies top rule width matches custom face
  • New test: test_render_session_summary_farewell_keeps_buddy_face_when_agents_exist — verifies farewell uses buddy face, not agent face
  • New test: test_box_lines_share_same_display_width_for_wide_text — verifies Intelligence Report alignment with Korean text
  • New test: test_impact_report_box_aligns_with_wide_text — verifies Impact Report alignment with Korean text
  • New test: test_custom_face_banner_keeps_top_and_bottom_aligned — verifies onboarding tour banner alignment
  • All existing tests pass (71 TS + Python tests)
  • 100% statement/function coverage maintained

@JeremyDev87 JeremyDev87 added the bug Something isn't working label Apr 3, 2026
@vercel

vercel Bot commented Apr 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 3, 2026 2:23pm

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit cc6c6f7 into master Apr 3, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/buddy-rendering-alignment branch April 3, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant