Repository navigation
fix(tui): preserve drafts and input across resize and auth handoffs - #410
Merged
Merged
Conversation
- preserve drafts and attachments until prompt queue admission succeeds - retain and display unsent drafts after turn errors - repaint buffered input and preserve Windows combining accents - add scripted PTY fixtures with exact prompt and paste verification - require terminal regression tests on Windows, Linux, and macOS
- stop and join terminal input before handing control to auth children - restore input after auth and stop owned children during shutdown - preserve input during simultaneous Unix resize and typing - flush buffered typing before terminal paste payloads - extend real PTY coverage for queues, cancellation, dialogs, auth, and bridge failures
- use a missing Unix interpreter to trigger an actual auth spawn error - retain Windows invalid executable coverage and input restoration checks - document macOS shell fallback and platform-specific fixture behavior
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.
Summary
Preserve unsent drafts and exact Unicode input through terminal resize, paste boundaries, turn failures, and authentication handoffs.
Why
The composer could be cleared before bridge queue admission or by an unrelated active-turn error. Buffered typing could also be discarded or reordered around control keys and paste events. Auth children shared stdin with a background reader while the TUI continued writing terminal output.
These changes move input consumption and terminal handoff to explicit commit points and verify the resulting workflows using the actual binary in a PTY. The auth ownership regression also fails against the previous committed implementation.
Related to #407 and #408.
Validation
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-features, andcargo fetch --lockedpassed on Windows.node --check tests/fixtures/fake-bridge.jspassed.cargo deny check bans licenses sources advisoriesandnpm run quality:duplicatespassed. macOS verification remains for the required CI matrix job.Notes
tests/fixtures/README.mddocuments scenarios, isolation, test requirements, and coverage limits. The fixtures exercise checked-in contracts and deliberate failure paths; they are not an independent SDK conformance oracle.