zot/internal/agent/modes
patriceckhart 112341ca3d fix(tui): slash popup + transient overlays swallow esc before busy-cancel
Two rules for how esc resolves while a turn is running got
implemented this round:

1) Let the user open the slash popup during a busy turn.

   The suggest render path used to short-circuit on i.busy, so
   typing / while the agent was working did nothing. The
   dispatcher in runSlash already handles the busy-state routing
   per command (safe ones run immediately, destructive ones
   cancel first), so dropping the guard was safe. Now / opens
   the popup whether or not a turn is in flight.

2) Esc dismisses overlays before it cancels the turn.

   The global key switch used to fire the busy-cancel
   unconditionally on esc. That meant three common patterns
   silently ripped the active turn away:

     - Open the slash popup, press esc to dismiss it ->
       turn cancelled.
     - Run /help to see the key bindings while a turn was
       running, press esc when done -> turn cancelled.
     - An extension pushed a notify/display line, user pressed
       esc to clear it -> turn cancelled.

   The esc case now checks, in order:
     - slash popup active -> break out of the switch, let the
       popup's own esc handler (later in handleKey) close it
     - helpBlock or extNotes non-empty -> clear them, invalidate,
       return (turn keeps running)
     - busy + cancelable -> cancel the turn (old behaviour)
     - idle -> fall through to the editor which clears itself

Result: esc feels like a dismiss key that escalates. It nukes
the turn only when nothing else on screen wants it.

No change to dialog handlers \u2014 those already intercept esc in
their own return-false branches before the global switch ever
runs.
2026-04-21 18:32:22 +02:00
..
telegram feat(telegram): mirror tui prompts into telegram thread 2026-04-20 09:33:03 +02:00
btw_dialog.go fix(tui): blinking cursor in /btw, proper idle redraws, tighter status bar 2026-04-21 18:09:10 +02:00
changelog_dialog.go feat(tui): show github release notes once after upgrading 2026-04-19 16:12:13 +02:00
confirm_dialog.go fix(cli): load extensions in print and json modes too 2026-04-19 20:00:36 +02:00
dialog_frame.go fix(tui): cell-aware width math for dialog header rules + add /btw 2026-04-19 13:47:39 +02:00
help.go style: replace middle-dot separators with ascii hyphens 2026-04-21 17:39:08 +02:00
interactive.go fix(tui): slash popup + transient overlays swallow esc before busy-cancel 2026-04-21 18:32:22 +02:00
json.go feat(tui): live-stream file body during write/edit tool calls 2026-04-20 08:37:14 +02:00
jump_dialog.go style: replace middle-dot separators with ascii hyphens 2026-04-21 17:39:08 +02:00
login_dialog.go style: replace middle-dot separators with ascii hyphens 2026-04-21 17:39:08 +02:00
logout_dialog.go feat(auth,tui): dark login pages + /logout picker 2026-04-19 20:14:22 +02:00
model_dialog.go style: replace middle-dot separators with ascii hyphens 2026-04-21 17:39:08 +02:00
print.go initial commit 2026-04-17 20:36:38 +02:00
session_dialog.go fix(tui): scroll the /sessions picker when the list overflows 2026-04-20 16:11:49 +02:00
session_ops_dialog.go feat(session): /session export + import with portable .zotsession file 2026-04-20 10:04:33 +02:00
session_tree_dialog.go feat(session): /session fork + /session tree 2026-04-20 11:10:56 +02:00
skills_dialog.go feat: skills — reusable instructions discovered from SKILL.md files 2026-04-19 14:32:30 +02:00
slash_suggest.go style: replace middle-dot separators with ascii hyphens 2026-04-21 17:39:08 +02:00
spinner.go tweak(tui): stable spinner phrase per turn 2026-04-20 16:00:10 +02:00
telegram_dialog.go feat(tui): /telegram connect | disconnect | status 2026-04-20 09:18:04 +02:00
update_banner.go tweak(tui): update banner emits the short domain install command 2026-04-20 17:47:58 +02:00
welcome.go tui: show binary version in the welcome banner for 1 second 2026-04-19 13:22:10 +02:00