feat(tui): QA fixes + approval Ctrl keys, workflow focus, session UUID

- gate session-list nav on idle so in-session arrows/jk don't move the list (5a)
- approval dismiss on esc + in-session 'a' reopens a pending approval (5b)
- auto-focus a newly started workflow session (was running invisibly)
- approval actions on Ctrl chords (^a/^r/^x) matching the modal; bare/Alt letters no longer approve; diff closes on ^x/esc
- steer hint in the approval modal; session UUID in the input bar
- env-gated debug logging (CORREX_TUI_LOG) with k.Alt in the key trace
This commit is contained in:
2026-06-01 23:23:29 +04:00
parent 94f7ad0ee9
commit da3f6c84a3
7 changed files with 114 additions and 21 deletions
+8 -1
View File
@@ -49,6 +49,7 @@ func inferCategory(t string) string {
// applyServer mutates the model for a single (non-buffered) server message.
func (m *Model) applyServer(msg protocol.ServerMessage) {
debugLog("SRV type=%s session=%s reason=%s", msg.Type, msg.SessionID, msg.Reason)
switch msg.Type {
case protocol.TypeSessionStarted:
m.onSessionStarted(msg)
@@ -244,7 +245,13 @@ func (m *Model) onSessionStarted(msg protocol.ServerMessage) {
if hadOptimistic || m.selectedID == "" {
m.selectedID = msg.SessionID
}
m.sessionEntered = true
if m.pendingWorkflowFocus {
m.selectedID = msg.SessionID
m.sessionEntered = true
m.pendingWorkflowFocus = false
} else {
m.sessionEntered = true
}
}
func (m *Model) onApprovalRequired(msg protocol.ServerMessage) {