1. Design the state model
Outcome: The UI has explicit idle, loading, streaming, error, and approval states.
Tasks
- →Define the state machine
- →Add cancellation
- →Separate content from commands
Checks
- ✓No hidden transitional states remain
- ✓Repeated submission does not duplicate the request