Skip to content

Ask before quitting while an agent is running - #18

Merged
tdwd merged 2 commits into
mainfrom
quit-confirm
Oct 6, 2026
Merged

tdwd merged 2 commits into
mainfrom
quit-confirm

Conversation

@tdwd

@tdwd tdwd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Quitting Deck stops every agent it hosts, and q or ctrl+c did that without asking.

  • q, ctrl+c and ^g q now ask while an agent is running. With none running, Deck quits at once.
  • The cursor opens on the row that loses nothing, so q then ↵ keeps every agent.
  • Inside tmux that row is Detach tmux. Deck and its agents keep running, and tmux attach resumes them. Outside tmux it is Stay.
  • A failed tmux detach-client is reported.

Two commits: the first changes comments only (the picker headers claimed a filter that does not exist), the second is the behaviour.

Checked by hand in a real tmux: Detach tmux disconnects the client while Deck and a bash agent keep running, reattaching shows the same session, and Quit ends Deck. With two clients attached, only the one that typed is disconnected.

tdwd added 2 commits October 6, 2026 20:35
The picker.go header called the list filterable, and picker.update has
no filter. Both picker file headers also counted the kinds the modal
serves, and that number was already stale. The headers now say what
the files hold without a count. pickerKey's comment named only the
theme picker, though it routes a key to every kind.

Comments only.
The agents are Deck's children, so quitting stops every one of them,
and q or ctrl+c did that without a word. Every quit key (q, ctrl+c,
^g q) now goes through requestQuit. It quits at once when no agent is
running, and otherwise asks.

The cursor opens on the row that loses nothing, so q and a reflexive ↵
keep every agent. Quit is one row down and says how many agents it
stops. Inside tmux the safe row is Detach tmux, which runs
tmux detach-client: Deck and its agents keep running, and tmux attach
resumes them. Outside tmux it is Stay. The row is not called "Detach"
alone, because ^g esc already detaches the keyboard from the pane.

A failed detach is reported, not swallowed. The modal is the one x
already uses to end a session, and its footer now says "choose"
instead of "apply", which read oddly on a question.

The smoke test answers the new question. README and architecture
describe it, with the tmux recipe for running Deck on a server.
@tdwd
tdwd merged commit 0f646b3 into main Oct 6, 2026
3 checks passed
@tdwd
tdwd deleted the quit-confirm branch October 6, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant