Repository navigation
fix(tui): filter terminal controls in editable filenames - #239
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe editor now skips characters rejected by ChangesEditor rendering
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Editable filenames filter unsafe characters while preserving the filename used for rename. No actionable merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
merged as authored; the TUI rename editor no longer paints terminal controls from a name (d869343, v0.3.8). Thanks @GreyforgeLabs! https://github.com/thisisgm/flea/releases/tag/v0.3.8 |
Apply the normal TUI renderer's character-safety rule when painting the text editor. Filenames can contain terminal control sequences and bidirectional formatting characters; the normal rows filter them, but opening Rename previously wrote those characters directly into the terminal output buffer.
Filter only the rendered characters. Keep the original filename, byte offsets, selection and filesystem identity intact, so displaying a name cannot silently rename it or change what the operation targets.
Validation: both new regression tests fail before the fix and pass afterward. They cover control and bidi characters, Unicode, Rename selection, cursor movement and a narrow viewport, while checking that the filename and file contents are preserved. All 58 TUI tests pass in debug and release profiles. Flea's Clippy baseline gate and file-budget check pass.
The full Rust suite under
TMPDIR=/var/tmpreports 1,140 passed and one failure inbackend::undomanifest_tests::a_file_added_mid_copy_survives_inside_a_kept_directory. That exact failure reproduces on the unchanged upstream Rust tree. The initial/tmprun also encountered scratch-space quota failures; a representative test passes when moved to/var/tmp.Summary by CodeRabbit