feat(tui): /details Tab toggles apply immediately

Drop the pending state and confirm step: Tab cycles the highlighted
entry and applies at once, so the transcript behind the dialog is the
live preview; Enter/Esc/Ctrl+C just close.
This commit is contained in:
Turtle
2026-07-30 23:55:33 +08:00
parent f13003df75
commit 5b144238a2
11 changed files with 98 additions and 111 deletions
+4 -3
View File
@@ -663,9 +663,10 @@ describe('TUI terminal-state snapshots', () => {
harness.terminal.send('\r')
})
await checkpoint('details-command', harness.terminal, { includeScrollback: true })
// Bare /details opens the two-entry selector seeded with the current
// hidden/reasoning-off state; one Tab renders the tool-card entry's
// pending cycle as `hidden → collapsed`.
// Bare /details opens the two-entry toggle seeded with the current
// hidden/reasoning-off state; one Tab immediately cycles tool cards
// hidden -> collapsed, so the frame pins the applied notice, the restored
// tool card behind the dialog, and the updated entry value together.
await renderAfter(harness, () => {
harness.terminal.send('/details')
harness.terminal.send('\r')