-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Parent: #499
Problem
tui_loop() in crates/zeph-tui/src/lib.rs processes one event per tokio::select! iteration, then draws a full frame. During fast streaming or parallel tool execution, agent events dominate the select and keyboard events queue up, causing perceived freeze.
Additionally, tokio::select! gives no priority to input events over agent events, so under load user keypresses can be starved.
Fix
- Use biased
tokio::select!with input events checked first - After waking on an agent event, drain all pending agent events via
try_recv()before drawing - This batches multiple chunks into a single frame, reducing draw calls and prioritizing user input
Files
crates/zeph-tui/src/lib.rs(tui_loopfunction)crates/zeph-tui/src/app.rs(may need adrain_agent_eventsmethod)
Acceptance Criteria
- Input events are processed with priority over agent events
- Multiple agent events between frames are batched into one draw call
- No regression in streaming display quality
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working