Fix Muse startup behind Construct PTY - #1225
Merged
Merged
Conversation
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
Root cause
Muse emits cursor-position queries during interactive startup and waits for replies before drawing. Construct passed those bytes through but its native TUI did not answer them. Muse retried every two seconds, then exited cleanly after six seconds, leaving the session blank and closed.
Handling the query in the shared live PTY runtime makes startup independent of whether the native TUI, web UI, a remote client, or no client is attached.
Verification
cargo test -p construct-protocol --features pty adapter::pty::tests— 5 passedcargo test -p construct-adapter-muse— 6 passedenv -u NO_COLOR cargo test --workspace— passedcargo build— passedsef21973cd6fa47958a07b6f61ce1410dremained running, acceptedconstruct send, and returnedecho: Reply exactly: muse-cpr-sendNo visual recording: this is terminal protocol plumbing, and the detached installed-Muse end-to-end check exercises the failing path directly.