Add stackable toast notifications

Replaces the single-slot status-line flash with a top-right toast
stack over the focused pane. flashError, flashTransient, and
notifyAttention all push onto the same stack (cap 5, FIFO drop).
Ctrl-N dismisses the most recent toast; empty stack falls through to
the focused PTY so readline / nano / emacs / opencode bindings keep
working. A new "Clear notifications" palette item empties the stack.
This commit is contained in:
2026-05-15 20:26:35 +01:00
parent e6f5a94fae
commit f312b6d345
6 changed files with 492 additions and 51 deletions

View File

@@ -353,6 +353,12 @@ func (p *paletteState) buildItems(macro string) []paletteItem {
action: paletteAction{kind: "settings-open"},
group: groupSettings,
})
out = append(out, paletteItem{
label: "Clear notifications",
hint: "dismiss all toasts in the top-right of the focused pane",
action: paletteAction{kind: "toasts-clear"},
group: groupSettings,
})
// Group 4: Quit.
out = append(out, paletteItem{