feat: refactor-inputpanel-usecursor — replace custom cursor with Ink's useCursor hook#266
Open
avoidwork wants to merge 8 commits into
Open
feat: refactor-inputpanel-usecursor — replace custom cursor with Ink's useCursor hook#266avoidwork wants to merge 8 commits into
avoidwork wants to merge 8 commits into
Conversation
Owner
Author
Implementation Audit Results: refactor-inputpanel-usecursorGoal FulfillmentGoal 1: Replace Custom Block Cursor with Ink's useCursor Hook ✅
Goal 2: Ensure Proper Cursor Visibility State ✅
Spec ComplianceAll requirements in
Task CompletionAll 17 tasks completed:
Quality Check
Deviations from PlanNone. Implementation followed the design document and specs exactly. |
The ink 7.x useCursor hook returns { setCursorPosition } and must be
called via useEffect — not as a renderless component with position args.
This was silently doing nothing, which is why no cursor was visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refactor the InputPanel cursor from a cosmetic Unicode block character (█) rendered as part of the text output to Ink's built-in
useCursorhook for real terminal cursor positioning.Type of Change
Testing
useCursor-based implementationCoverage
Checklist
npm run lintpassesFiles Changed
src/tui/inputPanel.js— Removed Blink component, added useCursor hook with string-width positioningsrc/tui/app.js— Removed cursorChar/cursorColor props from InputPanel usagesrc/config/schemas.js— Removed cursorChar and blinkTimeout from TUI schemapackage.json/package-lock.json— Added string-width dependencytests/unit/tui.test.js— Updated cursor tests + 4 new teststests/unit/config_loader.test.js— Updated schema validation testsopenspec/specs/input-cursor/spec.md— Updated spec to reflect new cursor behavior