feat(ffi): expose bracketed paste and input mode queries over the C ABI - #171
Conversation
✅ Deploy Preview for termisu canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds bracketed paste controls and mode queries to the C, Crystal, and JavaScript FFI layers. It adds integration and routing tests. The input parser now rounds positive fractional millisecond waits upward and clamps nonpositive waits to zero. ChangesFFI mode controls
Input deadline conversion
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Termisu
participant NativeFFI
participant TerminalContext
Termisu->>NativeFFI: query or change input mode
NativeFFI->>TerminalContext: read or update mode state
TerminalContext-->>NativeFFI: return status or UInt8 state
NativeFFI-->>Termisu: return status or boolean state
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@spec/termisu/ffi_spec.cr`:
- Around line 200-203: Update the enhanced-keyboard spec around
termisu_disable_enhanced_keyboard to assert that
termisu_enhanced_keyboard(handle) returns 0_u8 after a successful disable
operation. Preserve the existing status and enabled-state assertions.
In `@src/termisu/input/parser.cr`:
- Around line 370-373: Update the deadline conversion near remaining so exact
integer millisecond values remain unchanged while fractional values round up,
without using Float#ceil or an unconditional increment. Add boundary specs
covering 0.25, 1.0, and 1.25 milliseconds.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f1e6765d-5d91-4d14-abb3-9d3a841e1ebf
📒 Files selected for processing (8)
include/termisu/ffi.hjavascript/core/src/native.tsjavascript/core/src/termisu.tsjavascript/core/tests/termisu.test.tsspec/termisu/ffi_spec.crsrc/termisu/ffi/core.crsrc/termisu/ffi/exports.crsrc/termisu/input/parser.cr
|



No description provided.