Repository navigation
Add Unicode text nodes for terminal apps - #1
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
mpv unloaded a file when it finished, so seeking or replaying afterwards failed. fxcode stored that failure as a fatal player error, which ended the whole render loop. Keep the file open at its end without pausing, and treat a failed seek as a no-op. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seek_to stores the target as the position right away, so the regression test passed before the control thread applied the seek, and even when set_position was never called. Replace that optimistic value with a sentinel, so only a time-pos refresh from libmpv can satisfy the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep videos open at their end and survive failed seeks
Adds a plain
Textnode so terminal apps can render chat messages, lists, and input fields using the existing layout and renderer. Text clips by terminal cell width, keeps combining marks and wide glyphs intact, and filters control characters. Border titles now use the same safe text layout.This supports the qmsg TUI. The crate and repository names stay
fxcode; a rename tofxuican happen separately.Validation:
cargo testpasses (11 tests; 2 optional mpv tests ignored). The existing media tests requiredocs/cars.mp4, which is absent from the repo; I supplied a generated one-second video locally for the test run. New tests cover Unicode clipping, control characters, and the right edge.Used by qmsg PR #15. See the rendered chat demo (S9 file server; requires Tailscale). The consumer PR includes the matching before/after terminal captures.