Description
After the TUI renders, there's a ~20 second delay before user input becomes responsive. The Ink useInput hook doesn't fire during this period, completely blocking user interaction despite the UI appearing ready.
Evidence
Debug logs show a consistent 20.6 second gap between component mount and input readiness:
11:03:20.735Z InputLine MOUNT: InputLine mounted focus:true, disabled:false
11:03:41.352Z InputLine INPUT: useInput callback fired
→ 20.6 seconds where input is completely blocked
- Component mounts with correct state (
focus:true, disabled:false)
- Ink rendering completes successfully
- stdin appears ready but doesn't respond
- After ~20s, input suddenly becomes responsive
Hypotheses
- Ink stdin setup delay: Ink's stdin listener registration may be deferred or blocked
- Event loop blocking: Long-running synchronous operation blocking Node.js event loop
- SDK subscription interference: SDK stream subscription may be interfering with stdin
- Async initialization race: Critical async setup completing after render but before input readiness
Investigation Steps
- Profile event loop blocking
- Trace Ink stdin setup - check if
process.stdin.setRawMode() is delayed
- Measure SDK initialization timing
- Isolate component mount vs input readiness
- Test minimal reproduction outside full TUI
Acceptance Criteria
Related
Description
After the TUI renders, there's a ~20 second delay before user input becomes responsive. The Ink
useInputhook doesn't fire during this period, completely blocking user interaction despite the UI appearing ready.Evidence
Debug logs show a consistent 20.6 second gap between component mount and input readiness:
focus:true, disabled:false)Hypotheses
Investigation Steps
process.stdin.setRawMode()is delayedAcceptance Criteria
Related