feat: persist terminal sessions via tmux for cross-restart continuity#53
Closed
Bono2007 wants to merge 5 commits intokaanozhan:mainfrom
Closed
feat: persist terminal sessions via tmux for cross-restart continuity#53Bono2007 wants to merge 5 commits intokaanozhan:mainfrom
Bono2007 wants to merge 5 commits intokaanozhan:mainfrom
Conversation
- Add tmuxManager.js: low-level tmux session create/attach/kill/list - Add terminalPersistence.js: JSON storage of terminal metadata in userData - ptyManager: spawn PTY with tmux attach-session instead of raw shell - ptyManager: add restoreTerminals() to reattach to surviving tmux sessions - renderer/terminalManager: add restorePersistedTerminals() IPC call - multiTerminalUI: restore sessions on startup, create new only if none found - Add TERMINALS_RESTORE / TERMINALS_RESTORED IPC channels Falls back to plain PTY if tmux is not installed.
Pass -u flag to all tmux invocations (create-session, attach-session) to force UTF-8 mode. Also inject LANG/LC_ALL=en_US.UTF-8 when the host locale is not already UTF-8, so accents (ç, é, è…) render correctly.
Instead of falling back to en_US.UTF-8, derive the UTF-8 variant from the user's existing LANG (e.g. fr_FR.ISO-8859-1 → fr_FR.UTF-8).
process.env.LANG is unset when Frame launches from /Applications. Query defaults read -g AppleLocale as fallback, then pass LANG/LC_ALL explicitly via both the exec env and -e flags on new-session so the shell inside tmux also inherits the correct UTF-8 locale.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clipboard.readText()on Cmd+V/Ctrl+Shift+V; xterm.js handles paste natively via the DOM paste event, avoiding the duplicate input--dangerously-skip-permissionstoggle in the UI, visible only when Claude Code is the selected AI toolframe-term-N) that keeps running after Frame closes; on next launch, sessions are detected and reattached automaticallyHow it works
src/main/tmuxManager.js— low-level tmux operations (create/attach/kill/list sessions)src/main/terminalPersistence.js— stores terminal metadata touserData/terminal-sessions.jsonptyManager— spawns PTY viatmux attach-sessioninstead of a raw shell; restores sessions on startupTest plan
ping google.com)tmux list-sessionsshould no longer show it)