feat(plugin): implement width-safe Tiny Actor card renderer (#1269)#1292
Merged
Conversation
Add render_card() that produces compact 2-3 line cards using display-width-safe helpers from buddy_renderer. Handles CJK text, ANSI-colored faces, and ASCII mode without visual drift.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 4, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
Review: APPROVE ✅ (CI pending — will confirm after full pass)
CI Status: 5/28 pass, 23 pending
Code Quality
render_card()produces 2-3 lines at exactcard_widthdisplay columns_center_to_width()helper: left-pad + right-pad with display-width awareness- Uses
pad_to_display_widthandtruncate_to_display_widthfrom buddy_renderer - Import from
tiny_actor_cardfor TinyActorCard type
Tests (205 lines, 6 classes)
- Basic: 3 lines with quote, 2 without, show_quote=False
- Display-width safety: all lines exact width at 14/20/6 cols
- CJK: Korean + Japanese labels truncated correctly
- ANSI: colored faces don't break width
- ASCII mode: no unicode in output
- Content: face centered, label present
No Issues Found
Recommendation: APPROVE (pending CI full pass)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render_card()inhooks/lib/tiny_actor_renderer.py— compact 2-3 line card renderer using display-width-safe helperscard_widthdisplay columnsTest plan
tests/test_tiny_actor_renderer.pyCloses #1269