fix: correct TUI Ink API mismatches, key handling, and error handling - #167
Merged
Conversation
- Remove dead activeToolCall assignments (never read, caused ReferenceError) - Fix broken areEqual comparator in MessageBubble memo (conversationPanel.js) - Replace invalid 'dim' prop with 'dimColor' (conversationPanel.js) - Replace invalid 'gray' prop with 'color: gray' (conversationPanel.js) - Remove invalid 'growDirection' prop from OnboardingPanel (onboardingPanel.js) - Fix key.up/key.down to key.upArrow/key.downArrow in SkillsPanel - Fix key.up/key.down to key.upArrow/key.downArrow in MemoryPanel - Fix key.space to input check in MemoryPanel - Fix key.up/key.down to key.upArrow/key.downArrow in SettingsPanel - Fix key.enter to key.return in SettingsPanel - Add isActive guard to all panel useInput hooks - Replace process.exit(0) with graceful useApp().exit() in App - Remove no-op stdout guard in conversationPanel.js
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
Fixes 11 TUI issues discovered during an audit against the Ink v7 API spec: 2 critical runtime errors, 3 invalid Ink prop usages, 3 incorrect key property names, and 3 design improvements (graceful exit, input guards, dead code removal).
Type of Change
Testing
node -cCoverage
Checklist
npm run lintpassesChanges by File
src/tui/app.js
activeToolCall = nullassignments (never read, caused ReferenceError on tool events)process.exit(0)with gracefuluseApp().exit()viaexitRefsrc/tui/conversationPanel.js
areEqualcomparator:p._index === nextProps.assistantName→p._index === n._index(was always false, breaking React.memo)dim: true→dimColor: true(3 occurrences)gray: true→color: "gray"(empty message prompt)if (!stdout) returnguardsrc/tui/onboardingPanel.js
growDirection: "down"prop (not a valid Ink Box prop)src/tui/skillsPanel.js
key.up/key.down→key.upArrow/key.downArrowisActiveguard touseInputsrc/tui/memoryPanel.js
key.up/key.down→key.upArrow/key.downArrowkey.space→input === " "(space not a documented Ink key property)isActiveguard touseInputsrc/tui/settingsPanel.js
key.up/key.down→key.upArrow/key.downArrowkey.enter→key.returnisActiveguard touseInput