-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
The Problem
Boxen titles containing the warning sign emoji don't align correctly in the terminal. The title border line is 1 character short on each side compared to the rest of the box borders.
Visual Example
Current (broken):
╭─────────────────────────────────────────────────────────── ⚠ NO TASKS AVAILABLE ⚠ ───────────────────────────────────────────────────────────╮
│ │
│ No tasks available to work on. All tasks are either completed, blocked by dependencies, or in progress. │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Expected (fixed):
╭───────────────────────────────────────────────────────────── NO TASKS AVAILABLE ─────────────────────────────────────────────────────────────╮
│ │
│ No tasks available to work on. All tasks are either completed, blocked by dependencies, or in progress. │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Root Cause
The code uses plain text presentation ⚠ (U+26A0) instead of emoji presentation ⚠️ (U+26A0 + U+FE0F variant selector).
Boxen's titleAlignment: 'center' feature handles emoji presentation correctly (like ⚡) but has a width calculation bug with text presentation characters. The missing variant selector causes boxen to miscalculate the display width when centering the title.
Solution
Add the emoji variant selector U+FE0F to force emoji presentation:
- '⚠ NO TASKS AVAILABLE ⚠'
+ '⚠️ NO TASKS AVAILABLE ⚠️'The variant selector is an invisible character that changes the bytes from e2 9a a0 to e2 9a a0 ef b8 8f, forcing emoji rendering and fixing boxen's width calculation.
Affected Components
All warning signs (⚠) used throughout the CLI need the variant selector added:
- Box titles (2 instances)
- Warning display utility (1 instance)
- Auth command warnings (4 instances)
- Show command warnings (1 instance)
- Autopilot warnings (1 instance)
Success Criteria
- Box title lines align perfectly with the rest of the box borders
- All warning emojis render consistently as emoji presentation
- Visual consistency across all Task Master UI elements