Repository navigation
fix(tui): release Mini admission before waiting for follow-ups - #59837
Shubham-Padkonde wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
The fix looks correct. I ran the reproduction from #59819 against the real runPromptQueue. On the base, the follow-up is never admitted and the queue is still pending after close. With this change, the follow-up is admitted and the queue finishes. The queue and interactive runtime tests in packages/tui/test/mini pass (30 tests), and the type-check results are the same as on the base.
An error still throws before the new admission.resolve() and a close still breaks out before it, so both paths still release the admission in the existing finally. Resolving twice does nothing, and shell turns aren't affected. The two regression tests are short and wait on promises rather than timers.
The public API is unchanged: this only touches Mini's internal prompt queue.
No blocking concerns.
Issue for this PR
Closes #59819.
Type of change
What does this PR do?
Mini displays an initial prompt error and returns without signaling admission. A queued follow-up then waits for that signal while the active turn waits for the follow-up, leaving the queue stuck.
Resolve the active admission when the turn finishes, before awaiting dependent admissions. Keep the existing cleanup for errors and closing.
How did you verify your code works?
Both new cases time out before the fix: a handled initial failure followed by either successful or failed follow-up admission. After the fix, all 24 queue tests pass across ten repetitions, including during the full-suite run. The complete Mini suite passes: 416 tests, seven skipped. Package TypeScript checking and formatting pass.
The full Windows TUI run hit the previously observed environment failures plus renderer timeouts and was stopped after stalling. The nine affected renderer cases pass separately on unchanged upstream and alongside all 24 queue tests with the fix. The full suite is not claimed green. No live provider or server was used.
Visual
Checklist