From 06f7d40c42871321542cf7c8360e264287fe8fb0 Mon Sep 17 00:00:00 2001 From: zhouyuan Date: Tue, 10 Mar 2026 14:30:21 +0800 Subject: [PATCH] feat: reduce default font size and persist tabs across refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Default terminal font 14px → 12px, min 10px → 8px - Save tab metadata to localStorage on every render - Restore ended sessions as dimmed tabs after page refresh - Ended tabs show "Session ended" message on click --- src/web/public/app.js | 53 ++++++++++++++++++++++++++++++++++----- src/web/public/styles.css | 2 ++ 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/src/web/public/app.js b/src/web/public/app.js index 8eccc6e3..522f9b6a 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -600,7 +600,7 @@ class CodemanApp { }, fontFamily: '"Fira Code", "Cascadia Code", "JetBrains Mono", "SF Mono", Monaco, monospace', // Use smaller font on mobile to fit more columns (prevents wrapping of Claude's status line) - fontSize: MobileDetection.getDeviceType() === 'mobile' ? 10 : 14, + fontSize: MobileDetection.getDeviceType() === 'mobile' ? 10 : 12, lineHeight: 1.2, cursorBlink: false, cursorStyle: 'block', @@ -3118,6 +3118,9 @@ class CodemanApp { } }); + // Restore tabs that were open before refresh but are no longer on the server + this._restoreEndedTabs(); + // Sync sessionOrder with current sessions (preserve order, add new, remove stale) this.syncSessionOrder(); @@ -3409,7 +3412,8 @@ class CodemanApp { const tallTabsEnabled = this._tallTabsEnabled ?? false; const showFolder = tallTabsEnabled && session.name && folderName && folderName !== name; - parts.push(`