Skip to content

fix(app): ask before multi-line terminal pastes and archiving running terminals; let Cmd+K open the palette - #672

Merged
iamnbutler merged 2 commits into
mainfrom
fix-term-paste
Oct 22, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
fix-term-paste

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Three terminal fixes from the map study:

  • Multi-line paste (^757): when the shell hasn't turned on bracketed paste, pasting text with more than one line asks "Paste N lines? The shell runs each line as a command as soon as it's pasted." first. Single lines, and shells with bracketed paste, paste as before.
  • ⌘K (^765): a focused terminal no longer claims Cmd/Ctrl+K to clear its screen; the window's command palette opens instead. (^758 "Clear with Cmd+K" goes away; clear / Ctrl+L still clear.)
  • Archive (^776): archiving a channel whose terminals are running a command asks first, naming the commands ("A terminal is still running sleep. Archiving ends it."). The host's terminals listing now reports each shell's foreground command, read from the terminal's foreground process group, so idle shells and prompt helpers don't count. Archiving with only idle shells goes straight through as before.

Part of #622. Left: listing and reopening shells whose tabs are gone, ace kill leaving a visible tab on "Connecting...", and the palette listing only tabs not on screen.

Map: ^757, ^765, ^776 (https://ace-map.iamnbutler.pages.nexthub.sh/terminal.html#757)

Smoke: own ace serve --loopback (isolated ACE_HOME, port 4166, SHELL=/bin/bash so there's no bracketed paste) in a headless browser. In a Terminal tab after echo ready: Cmd+K opened the Command Palette and the screen kept ready. Pasting echo one-757\necho two-757 showed "Paste 2 lines?"; Paste ran both. A single-line paste showed no dialog. With sleep 300 running, the sidebar's Archive channel showed "Archive #times? … running sleep"; Cancel left it; Archive channel archived it and pgrep found no sleep 300 afterwards. Idle shells in the same channel weren't counted.

Built in Ace

No. Made from Claude Code (fix-train worker), with a headless browser for the smoke, because the fix train runs outside Ace. Gap tracked in the dogfooding meta issue #5.

… terminals; let Cmd+K open the palette

Why: apps/app/src/panels/terminal.tsx#function Terminal | without bracketed paste the shell runs each pasted line, so a multi-line paste must confirm first; Cmd/Ctrl+K is left to the window's palette, not cleared
Why: apps/host/src/terminals.ts#function list | a shell counts as running a command only when its terminal's foreground group isn't the shell's own; prompt helpers that are children of the shell must not count
@iamnbutler
iamnbutler merged commit 06573a9 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-term-paste branch October 22, 2026 22:20
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