From aa2ef88ed744079eb419b4180c203be36f7c49fc Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Mon, 30 Mar 2026 09:52:43 -0400 Subject: [PATCH] =?UTF-8?q?fix:=206=20UX=20regressions=20=E2=80=94=20popup?= =?UTF-8?q?s,=20themes,=20cursor,=20selection,=20status=20bar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Popup windows (tools/editor/help): - CSP script-src 'self' blocked Tauri's inline IPC bridge scripts in child WebviewWindows. Added 'unsafe-inline' to script-src. Still restrictive (was null before SEC-4). Theme application: - Watcher on sessionStore.activeTheme needed { deep: true } — Pinia reactive proxy identity doesn't change on object replacement - LocalTerminalView.vue had ZERO theme support — added full applyTheme() with watcher and mount-time application - Container background now syncs with theme (was stuck on CSS variable) Cursor blink: - terminal.focus() after mount in useTerminal.ts — terminal opened without focus, xterm.js rendered static outline instead of blinking block Selection highlighting: - applyTheme() was overwriting theme without selectionBackground/ selectionForeground/selectionInactiveBackground — selection invisible after any theme change - Removed !important from terminal.css that overrode canvas selection - Bumped default selection opacity 0.3 → 0.4 Status bar: - h-6 text-[10px] → h-8 text-xs (24px/10px → 32px/12px) Co-Authored-By: Claude Opus 4.6 (1M context) --- src-tauri/tauri.conf.json | 2 +- src/assets/css/terminal.css | 6 ++- src/components/common/StatusBar.vue | 2 +- src/components/common/ThemePicker.vue | 2 + src/components/terminal/LocalTerminalView.vue | 48 +++++++++++++++++++ src/components/terminal/TerminalView.vue | 15 +++++- src/composables/useTerminal.ts | 3 +- 7 files changed, 71 insertions(+), 7 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b9dc23a..030847f 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -23,7 +23,7 @@ } ], "security": { - "csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: https://asset.localhost data:; connect-src 'self' ipc: http://ipc.localhost" + "csp": "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: https://asset.localhost data:; connect-src 'self' ipc: http://ipc.localhost" }, "withGlobalTauri": false }, diff --git a/src/assets/css/terminal.css b/src/assets/css/terminal.css index c4ff062..6eaac7f 100644 --- a/src/assets/css/terminal.css +++ b/src/assets/css/terminal.css @@ -20,9 +20,11 @@ height: 100%; } -/* Selection styling */ +/* Selection styling — let xterm.js theme handle selection colors. + The !important override was removed because it conflicts with + theme-driven selectionBackground set via terminal.options.theme. */ .terminal-container .xterm-selection div { - background-color: rgba(88, 166, 255, 0.3) !important; + background-color: rgba(88, 166, 255, 0.3); } /* Cursor styling */ diff --git a/src/components/common/StatusBar.vue b/src/components/common/StatusBar.vue index 2a44ae2..476296f 100644 --- a/src/components/common/StatusBar.vue +++ b/src/components/common/StatusBar.vue @@ -1,5 +1,5 @@