Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
==========================================
- Coverage 88.81% 88.79% -0.02%
==========================================
Files 34 34
Lines 5945 5946 +1
Branches 5945 5946 +1
==========================================
Hits 5280 5280
+ Misses 550 540 -10
- Partials 115 126 +11
🚀 New features to boost your workflow:
|
f06e157 to
85f56e3
Compare
Extract per-row rendering from Canvas so individual rows can be written and compared independently. The terminal now diffs against the previous canvas and only re-renders rows that changed, reducing flicker and redundant output in both fullscreen and inline modes. In fullscreen mode, absolute cursor positioning targets only changed rows. In inline mode, relative cursor movement achieves the same. The clear_canvas path in fullscreen mode now preserves output above the canvas area. Co-Authored-By: Samuel Corsi-House <sam@chouse.dev> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85f56e3 to
322e793
Compare
This reduces TUI flicker by only re-rendering rows that changed. Also bumps crossterm to 0.29.0 to match iocraft's dependency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
We're releasing this part of devenv 2.0.6 and will let you know what folks say. |
|
Thanks for the PR! It looks great at a glance, but I'll do my best to review this fully in the next few days. |
|
Neat stuff! - it was pretty much exactly what I needed for a project that I'm working on. I gave it some testing and found some issues with inline mode:
I've put fixes for these at https://github.com/owtaylor/iocraft/tree/row-level-diff-fixes - feel free to add them to your PR if they look useful. |
When the canvas grows beyond its previous height, MoveToNextLine (CSI E) was used to reach the new rows. CSI E only repositions within existing terminal content — it won't create new lines when the cursor is at the bottom of the screen. Use \r\n instead for rows beyond the previous canvas height to actually extend the scrollback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of unconditionally clearing when the canvas height >= terminal height, check each changed row during the diff. Only fall back to a full rewrite if a changed row is above the visible area (off-screen). When only visible rows changed, the normal row-level diff handles it without any flicker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks @owtaylor I've pulled your fixes in! |
|
Note that I've reverted this change in devenv for now as it doesn't fully work yet. I'll test the bug fixes in following days. |
|
looking forward to this! |
What It Does
Extract per-row rendering from Canvas so individual rows can be written and compared independently. The terminal now diffs against the previous canvas and only re-renders rows that changed, reducing flicker and redundant output in both fullscreen and inline modes.
In fullscreen mode, absolute cursor positioning targets only changed rows. In inline mode, relative cursor movement achieves the same. The clear_canvas path in fullscreen mode now preserves output above the canvas area.
I'd be happy to add more tests for regressions since it's a substantial change in the core logic of rendering.
Related Issues
#117