mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-27 03:27:14 -06:00
The detail view's filmstrip shortened a long file name with `&name[..13]`, a byte slice. For a name with multi-byte characters byte 13 can fall inside a character (`202407層三限定訂閱圖(4)`: inside '限'), and the slice panicked the UI thread as soon as that photo scrolled into the strip, so the app quit. `film_label` now counts characters: more than 14 are cut to 13 and an ellipsis, as before for ASCII names. Tests: a unit test of `film_label` (CJK, exactly 14 characters, ASCII, empty) and a headless filmstrip test with the name from the issue; both panicked with the reported message before the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>