fix(tui): handle EventInputRequired via session.Respond in monitoring tab#377
Merged
Conversation
… tab - `internal/interfaces/api/sse.go`: expose prompt field for EventInputRequired events - `internal/interfaces/api/sse_test.go`: add test verifying prompt is included in SSE output - `internal/interfaces/cli/run_wiring_conversation_test.go`: switch test fixtures from sonnet to haiku model - `internal/interfaces/tui/tab_monitoring.go`: route input responses through activeSession, extract beginInputRequest helper, fix empty-state guard - `internal/interfaces/tui/tab_monitoring_test.go`: add test for facade-driven input request flow with session.Respond
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
EventInputRequiredfired directly from the facade event stream, without relying on the legacyInputRequestedMsgpath which required aTUIInputReadersession.Respond()when an active session is present, falling back toinputReader.Respond()for the older code pathEventInputRequiredin the SSE API so clients receive it as part of the event payloadsonnettohaikuto reduce test costChanges
TUI
internal/interfaces/tui/tab_monitoring.go: Store theRunSessiononExecutionStartedMsg, extractbeginInputRequest()helper shared by bothInputRequestedMsgandfacadeEventMsg/EventInputRequiredpaths; clearactiveSessionon run end; dispatch user responses viasession.Respond()when available; guard empty-state view from hiding the input box mid-conversationinternal/interfaces/tui/tab_monitoring_test.go: Add test coveringEventInputRequiredreceived viafacadeEventMsg— verifies input box appears and response is routed to the session; capture responses inmockRunSessionAPI
internal/interfaces/api/sse.go: AddPromptfield tosseEventDataand populate it fromEnrichedInputRequestpayload whenEventInputRequiredis receivedinternal/interfaces/api/sse_test.go: Add test assertingeventDataFromEventmaps prompt correctly forEventInputRequiredTests
internal/interfaces/cli/run_wiring_conversation_test.go: Replacesonnetwithhaikuin all inline workflow fixtures to reduce test execution costTest plan
go test ./internal/interfaces/tui/... ./internal/interfaces/api/... ./internal/interfaces/cli/..."prompt"in theinput.requiredevent payload for API consumersGenerated with awf commit workflow