Skip to content

Commit 7608761

Browse files
committed
Stop scrolling the last frame away when a terminal exits
The "[Terminal process exited]" line cost a row and pushed the top of the final screen out of view -- and for a coding agent the first line of its last answer is often the part you wanted to read. Nothing is appended now; the dead terminal is pinned exactly on its last live frame and the exit is reported on the tab ("claude (exited)") and by the status-bar restart indicator. Terminal tab names also survive an editor restart. Restored panes were falling back to foreground-process auto-naming, so an agent tab named "claude" came back as "bash" or "*Terminal 1*"; the explicit title is now captured and reapplied along with the rest of the terminal's state, including for terminals restored as already-exited.
1 parent d1c8f28 commit 7608761

23 files changed

Lines changed: 267 additions & 91 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Keyboard and mouse input is now parsed by our own `fresh-input-parser` crate ins
1919
* **`Run Agent…` command** launches a terminal or a coding agent (`claude`, `codex`, `opencode`, `aider`) in your current workspace or a new one, without the full New Workspace dialog.
2020
* **Non-blocking workspace creation** - creating a workspace no longer freezes the editor; choose **Create & Visit** or **Create in Background** and keep working while it comes up.
2121
* **Restart an exited terminal in place** - when a terminal's process quits, the status bar offers a clickable `⟳ Restart terminal` (or `⟳ Resume claude`, named after whatever was running, with the exit code when it's non-zero). Click it, run **Restart Terminal Process** from the command palette, or use **View → Terminal → Restart Terminal Process**, and the process comes back in the *same* buffer below the existing scrollback — no new terminal, no lost place. A coding agent with a resume spec rejoins its conversation rather than starting over, exactly as it does when you reopen the editor. Works for plain shells and commands too; a *running* terminal is never restarted. The offer survives quitting the editor — the pane comes back with its transcript and the indicator, deliberately still stopped rather than silently re-running.
22+
* A terminal's exit is **no longer written into the output** as a `[Terminal process exited]` line, which cost a row and scrolled the top of the final screen out of view — often the first, most important line of an agent's last answer. The tab reads `claude (exited)` instead, and the dead terminal is left exactly on its last frame.
23+
* **Terminal tab names now survive an editor restart** — a restored agent tab stays named `claude` instead of falling back to `bash` / `*Terminal 1*`.
2224
* **Run Agent… and New Workspace are now one dialog.** A "Launch in" switch at the top chooses the current workspace or a new one; picking a new one reveals the backend tabs, Project Path, Workspace Name and the Advanced fold, and picking the current one hides them, leaving just the agent controls. Both palette commands open the same form — they only differ in where the switch starts.
2325
* Fixes **Run Agent… → current workspace**, which recorded neither the launch nor the resume argv: that agent used to vanish from the saved workspace entirely, and restarting it produced a bare shell instead of the agent. It now behaves exactly like an agent started in its own new workspace.
2426
* **Classic Mac (CR) line endings** are now fully supported (#2736, requested by @720720).

crates/fresh-editor/locales/cs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Obnovit %{program}",
16411641
"status.terminal_restart": "⟳ Restartovat %{program}",
16421642
"status.terminal_restart_shell": "⟳ Restartovat terminál",
1643-
"status.terminal_restart_code": "%{label} (kód %{code})"
1643+
"status.terminal_restart_code": "%{label} (kód %{code})",
1644+
"terminal.tab_exited": "%{name} (ukončeno)"
16441645
}

crates/fresh-editor/locales/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ %{program} fortsetzen",
16411641
"status.terminal_restart": "⟳ %{program} neu starten",
16421642
"status.terminal_restart_shell": "⟳ Terminal neu starten",
1643-
"status.terminal_restart_code": "%{label} (Code %{code})"
1643+
"status.terminal_restart_code": "%{label} (Code %{code})",
1644+
"terminal.tab_exited": "%{name} (beendet)"
16441645
}

crates/fresh-editor/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Resume %{program}",
16411641
"status.terminal_restart": "⟳ Restart %{program}",
16421642
"status.terminal_restart_shell": "⟳ Restart terminal",
1643-
"status.terminal_restart_code": "%{label} (exit %{code})"
1643+
"status.terminal_restart_code": "%{label} (exit %{code})",
1644+
"terminal.tab_exited": "%{name} (exited)"
16441645
}

crates/fresh-editor/locales/es.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Reanudar %{program}",
16411641
"status.terminal_restart": "⟳ Reiniciar %{program}",
16421642
"status.terminal_restart_shell": "⟳ Reiniciar terminal",
1643-
"status.terminal_restart_code": "%{label} (salida %{code})"
1643+
"status.terminal_restart_code": "%{label} (salida %{code})",
1644+
"terminal.tab_exited": "%{name} (finalizado)"
16441645
}

crates/fresh-editor/locales/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Reprendre %{program}",
16411641
"status.terminal_restart": "⟳ Redémarrer %{program}",
16421642
"status.terminal_restart_shell": "⟳ Redémarrer le terminal",
1643-
"status.terminal_restart_code": "%{label} (code %{code})"
1643+
"status.terminal_restart_code": "%{label} (code %{code})",
1644+
"terminal.tab_exited": "%{name} (terminé)"
16441645
}

crates/fresh-editor/locales/it.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Riprendi %{program}",
16411641
"status.terminal_restart": "⟳ Riavvia %{program}",
16421642
"status.terminal_restart_shell": "⟳ Riavvia il terminale",
1643-
"status.terminal_restart_code": "%{label} (uscita %{code})"
1643+
"status.terminal_restart_code": "%{label} (uscita %{code})",
1644+
"terminal.tab_exited": "%{name} (terminato)"
16441645
}

crates/fresh-editor/locales/ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ %{program} を再開",
16411641
"status.terminal_restart": "⟳ %{program} を再起動",
16421642
"status.terminal_restart_shell": "⟳ ターミナルを再起動",
1643-
"status.terminal_restart_code": "%{label} (終了 %{code})"
1643+
"status.terminal_restart_code": "%{label} (終了 %{code})",
1644+
"terminal.tab_exited": "%{name}(終了)"
16441645
}

crates/fresh-editor/locales/ko.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ %{program} 이어서",
16411641
"status.terminal_restart": "⟳ %{program} 다시 시작",
16421642
"status.terminal_restart_shell": "⟳ 터미널 다시 시작",
1643-
"status.terminal_restart_code": "%{label} (종료 %{code})"
1643+
"status.terminal_restart_code": "%{label} (종료 %{code})",
1644+
"terminal.tab_exited": "%{name} (종료됨)"
16441645
}

crates/fresh-editor/locales/pt-BR.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,5 +1640,6 @@
16401640
"status.terminal_resume": "⟳ Retomar %{program}",
16411641
"status.terminal_restart": "⟳ Reiniciar %{program}",
16421642
"status.terminal_restart_shell": "⟳ Reiniciar terminal",
1643-
"status.terminal_restart_code": "%{label} (saída %{code})"
1643+
"status.terminal_restart_code": "%{label} (saída %{code})",
1644+
"terminal.tab_exited": "%{name} (encerrado)"
16441645
}

0 commit comments

Comments
 (0)