* feat: open saved session logs from terminal toolbar Add one-click access to the current automatic or manual session log, flush before opening, and reuse application selection with a remembered log preference. Preserve recording controls and current-session ownership across worker routing and reconnects. Refs #3807 * fix(logging): preserve saved logs on failed reconnect and localize failures Address both Codex review findings with generation- and identity-checked replacement cleanup and localized user-facing error handling. * fix(logging): guard successful main-process session replacement Add shared inactive-log cleanup to fallback start handlers with regression coverage. Registration activation follows separately. * fix(logging): enable log lifecycle cleanup for main-process fallback * fix(terminal): keep log cleanup and tuck open-log into More actions Always end a raw session-log write stream on finalize, including when a flush already disabled it. Keep immediate snapshot retries, and pause them only while prepare is waiting so a disk error can be reported. Show open, reveal, and open-with in the toolbar overflow menu when logging is active, instead of a default toolbar button. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(logging): back off failed snapshot writes and drop retired log actions Persistent snapshot failures retry on a growing delay instead of a tight loop, and still flush immediately when new output arrives. Hide open-log actions after a successful reconnect retires a stopped manual log. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): keep open-log actions after automatic logging is turned off The current automatic log keeps recording until reconnect, so the menu stays available for that connection and clears on the next successful connect. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> * fix(terminal): derive log menu availability from saved session logs * fix(terminal): nest session log actions in one More actions submenu Collapse Open, Show in folder, and the two open-with actions into a Session log submenu that follows the Terminal Encoding menu, and drop the remembered-application hint. Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
1.6 KiB
Saved session logs
Recording and opening a session log stay separate.
- Start / Stop session log controls manual recording.
- Session log lives in the terminal toolbar's existing More actions menu, as one submenu with Open, Show in folder, Open with…, and Open with system default. It is not a default toolbar button. Toolbar customization can show the shortcut on the bar or hide it. When it is shown, the arrow beside it offers the same reveal and open-with actions.
The submenu appears when this session has a saved log, and it stays available after recording stops. A successful reconnect drops a stopped log from the old connection, and the submenu goes with it. A failed reconnect keeps it. Pending terminal output is flushed before opening; recording continues normally. Automatic logs and manually recorded logs both open this way.
A successfully selected application is remembered locally for subsequent log opens, independently of SFTP file associations. Choosing the system default clears this preference. Text, raw, and HTML logs retain their original format.
The last log remains accessible after recording stops or a session disconnects. After a successful reconnect, a stopped log from the old connection is not reused. If reconnecting fails, the previous saved log remains available. Manual recording that is still active remains the current log. If the current session has no saved log, or the file was moved or deleted, the action reports an error rather than opening an unrelated file. The action does not enable logging automatically.