fix: TUI crash with Unicode characters in branch selector

- Use truncateToWidth instead of substring in user-message-selector.ts
- Fix truncateToWidth to use Intl.Segmenter for proper grapheme handling
- Add tests for Unicode truncation behavior
This commit is contained in:
Mario Zechner 2025-12-05 11:59:39 +01:00
parent ed2c182501
commit 240064eec3
4 changed files with 121 additions and 22 deletions

View file

@ -9,6 +9,7 @@
### Fixed
- **Print mode error handling**: `-p` flag now outputs error messages and exits with code 1 when requests fail, instead of silently producing no output.
- **Branch selector crash**: Fixed TUI crash when user messages contained Unicode characters (like `✔` or ``) that caused line width to exceed terminal width. Now uses proper `truncateToWidth` instead of `substring`.
### Added