Charcoal colour palette and improved terminal resize on connect

Theme:
- Replace all purple/blue-tinted backgrounds (#1a1a2e, #1f1f35, etc.)
  with true neutral charcoal greys (#1c1c1c, #232323, #2a2a2a, etc.)
- Neutralise text colours (remove blue tint from secondary/tertiary)
- Update xterm.js theme and session overlay to match

Terminal resize:
- Add fitSession(sessionId) method for targeted terminal fitting
- Fire fit at 30ms, 150ms, and 500ms after 'connected' state event
- Ensures terminal fills container even when layout settles late
This commit is contained in:
2026-04-15 00:00:00 +01:00
parent 00f18043af
commit 59b26918d7
4 changed files with 39 additions and 28 deletions
+15 -8
View File
@@ -172,8 +172,15 @@ class TerminalManager {
*/
fitActive() {
const id = this.app.state.activeSessionId;
if (!id) return;
const entry = this.terminals.get(id);
if (id) this.fitSession(id);
}
/**
* Re-fits a specific session's terminal to its container.
* @param {string} sessionId
*/
fitSession(sessionId) {
const entry = this.terminals.get(sessionId);
if (entry) {
requestAnimationFrame(() => {
try { entry.fitAddon.fit(); } catch (_) { /* noop */ }
@@ -266,21 +273,21 @@ class TerminalManager {
*/
_buildTheme() {
return {
background: '#1a1a2e',
foreground: '#e8e8f0',
background: '#1c1c1c',
foreground: '#e4e4e4',
cursor: '#4ecdc4',
cursorAccent: '#1a1a2e',
cursorAccent: '#1c1c1c',
selectionBackground: 'rgba(78, 205, 196, 0.3)',
selectionForeground: '#ffffff',
black: '#1a1a2e',
black: '#1c1c1c',
red: '#ef5350',
green: '#66bb6a',
yellow: '#ffa726',
blue: '#42a5f5',
magenta: '#ab47bc',
cyan: '#4ecdc4',
white: '#e8e8f0',
brightBlack: '#464670',
white: '#e4e4e4',
brightBlack: '#555555',
brightRed: '#ff7043',
brightGreen: '#81c784',
brightYellow: '#ffcc02',