Skip to content

fix(plugin): make Tiny Actor preview use width-safe renderer and grid pipeline (#1303)#1314

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775295268/pane-1
Apr 4, 2026
Merged

fix(plugin): make Tiny Actor preview use width-safe renderer and grid pipeline (#1303)#1314
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775295268/pane-1

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Replace manual _render_card_lines() / _arrange_cards_horizontal() with the display-width-safe render_card() + layout_grid() pipeline
  • Remove 52 lines of duplicate preview-specific centering/slicing logic that bypassed the width-safe renderer
  • Update test to use display_width() instead of len() for correct Unicode width measurement

Closes #1303

Test plan

  • python3 -m pytest tests/test_tiny_actor_preview.py -v — 14/14 passed
  • python3 -m pytest tests/ -v — 651/651 passed
  • tsc --noEmit — clean
  • vitest run — 5893 passed

… pipeline (#1303)

Replace manual _render_card_lines/_arrange_cards_horizontal with the
display-width-safe render_card() + layout_grid() pipeline, eliminating
naive string slicing and .center() that could break CJK/ANSI alignment.

- Import render_card from tiny_actor_renderer and layout_grid from
  tiny_actor_grid
- Remove 52 lines of duplicate rendering logic
- Update test to use display_width() instead of len() for width assertion
@JeremyDev87 JeremyDev87 added fix plugin packages/claude-code-plugin labels Apr 4, 2026
@vercel

vercel Bot commented Apr 4, 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 4, 2026 9:46am

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: ✅ APPROVE

CI Status: ALL PASS

Code Quality:

  • preview.py: Removed ~50 lines of manual rendering (_render_card_lines, _arrange_cards_horizontal)
  • Pipeline integration: Now uses render_card()layout_grid() — proper width-safe pipeline
  • Tests: Updated width assertion from len(line) to display_width(line) for Unicode correctness
  • Feature flag preserved: CODINGBUDDY_TINY_ACTORS behavior unchanged

Key improvement:

  • Before: naive center(width) + str[:width] slicing (breaks CJK/ANSI)
  • After: render_card() + layout_grid() (display-width-safe)

✅ Preview now uses the full Tiny Actor rendering pipeline.

@JeremyDev87 JeremyDev87 self-assigned this Apr 4, 2026
@JeremyDev87 JeremyDev87 merged commit 62b3f8e into master Apr 4, 2026
29 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775295268/pane-1 branch April 4, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix plugin packages/claude-code-plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugin): make Tiny Actor preview use the width-safe renderer and grid pipeline

1 participant