chore: bump version to 0.1444

This commit is contained in:
arkon
2026-01-31 04:44:46 +01:00
parent 2a8882a94b
commit 6123ce8ba9
16 changed files with 2465 additions and 141 deletions
+88
View File
@@ -342,6 +342,13 @@ export class Session extends EventEmitter {
// Flicker filter setting (per-session toggle, applied on frontend)
private _flickerFilterEnabled: boolean = false;
// Claude Code CLI info (parsed from terminal startup)
private _cliVersion: string = '';
private _cliModel: string = '';
private _cliAccountType: string = '';
private _cliLatestVersion: string = '';
private _cliInfoParsed: boolean = false; // Only parse once per session
// Timer tracking for cleanup (prevents memory leaks)
private _autoCompactTimer: NodeJS.Timeout | null = null;
private _autoClearTimer: NodeJS.Timeout | null = null;
@@ -747,6 +754,10 @@ export class Session extends EventEmitter {
niceValue: this._niceConfig.niceValue,
color: this._color,
flickerFilterEnabled: this._flickerFilterEnabled,
cliVersion: this._cliVersion || undefined,
cliModel: this._cliModel || undefined,
cliAccountType: this._cliAccountType || undefined,
cliLatestVersion: this._cliLatestVersion || undefined,
};
}
@@ -967,6 +978,9 @@ export class Session extends EventEmitter {
// Parse token count from status line (e.g., "123.4k tokens" or "5234 tokens")
this.parseTokensFromStatusLine(data);
// Parse Claude Code CLI info (version, model, account type) from startup
this.parseClaudeCodeInfo(data);
// Parse task descriptions from terminal output (e.g., "Explore(Check files)")
// This enables correlating subagent windows with their short descriptions
this.parseTaskDescriptionsFromTerminalData(data);
@@ -1636,6 +1650,80 @@ export class Session extends EventEmitter {
}
}
// Parse Claude Code CLI info from terminal startup output
// Extracts version, model, and account type for display in Claudeman UI
private parseClaudeCodeInfo(data: string): void {
// Only parse once per session (during startup)
if (this._cliInfoParsed) return;
// Quick pre-checks
if (!data.includes('Claude') && !data.includes('current:') && !data.includes('Opus') && !data.includes('Sonnet')) {
return;
}
const cleanData = data.replace(ANSI_ESCAPE_PATTERN_FULL, '');
let changed = false;
// Match "Claude Code v2.1.27" or "Claude Code vX.Y.Z"
if (!this._cliVersion) {
const versionMatch = cleanData.match(/Claude Code v(\d+\.\d+\.\d+)/);
if (versionMatch) {
this._cliVersion = versionMatch[1];
changed = true;
}
}
// Match model and account: "Opus 4.5 · Claude Max" or "Sonnet 4 · API"
// The · character separates model from account type
if (!this._cliModel || !this._cliAccountType) {
// Try various model patterns
const modelPatterns = [
/(Opus \d+(?:\.\d+)?)\s*[·•]\s*(.+?)(?:\s*$|\s+[~/])/,
/(Sonnet \d+(?:\.\d+)?)\s*[·•]\s*(.+?)(?:\s*$|\s+[~/])/,
/(Haiku \d+(?:\.\d+)?)\s*[·•]\s*(.+?)(?:\s*$|\s+[~/])/,
];
for (const pattern of modelPatterns) {
const match = cleanData.match(pattern);
if (match) {
if (!this._cliModel) {
this._cliModel = match[1].trim();
changed = true;
}
if (!this._cliAccountType) {
this._cliAccountType = match[2].trim();
changed = true;
}
break;
}
}
}
// Match version check: "current: 2.1.27" and "latest: 2.1.27"
if (!this._cliLatestVersion) {
const latestMatch = cleanData.match(/latest:\s*(\d+\.\d+\.\d+)/);
if (latestMatch) {
this._cliLatestVersion = latestMatch[1];
changed = true;
}
}
// Mark as parsed once we have the essential info
if (this._cliVersion && this._cliModel) {
this._cliInfoParsed = true;
}
// Emit update if anything changed
if (changed) {
this.emit('cliInfoUpdated', {
version: this._cliVersion,
model: this._cliModel,
accountType: this._cliAccountType,
latestVersion: this._cliLatestVersion,
});
}
}
// Check if we should auto-compact based on token threshold
private checkAutoCompact(): void {
if (this._isStopped) return; // Early exit check
+8
View File
@@ -188,6 +188,14 @@ export interface SessionState {
color?: SessionColor;
/** Flicker filter enabled (buffers output after screen clears) */
flickerFilterEnabled?: boolean;
/** Claude Code CLI version (parsed from terminal, e.g., "2.1.27") */
cliVersion?: string;
/** Claude model in use (parsed from terminal, e.g., "Opus 4.5") */
cliModel?: string;
/** Account type (parsed from terminal, e.g., "Claude Max", "API") */
cliAccountType?: string;
/** Latest CLI version available (parsed from version check) */
cliLatestVersion?: string;
}
// ========== Global Stats Types ==========
+270 -56
View File
@@ -344,9 +344,11 @@ class NotificationManager {
subagent_complete: { enabled: false, browser: false, audio: false },
};
// Device-specific defaults: mobile has notifications disabled by default
const isMobile = MobileDetection.getDeviceType() === 'mobile';
const defaults = {
enabled: true,
browserNotifications: true,
enabled: !isMobile, // Disabled on mobile by default
browserNotifications: !isMobile,
audioAlerts: false,
stuckThresholdMs: STUCK_THRESHOLD_DEFAULT_MS,
// Legacy urgency muting (keep for backwards compat)
@@ -358,7 +360,8 @@ class NotificationManager {
_version: 3,
};
try {
const saved = localStorage.getItem('claudeman-notification-prefs');
const storageKey = this.getStorageKey();
const saved = localStorage.getItem(storageKey);
if (saved) {
const prefs = JSON.parse(saved);
// Migrate: v1 had browserNotifications defaulting to false
@@ -370,7 +373,7 @@ class NotificationManager {
if (prefs._version < 3) {
prefs.eventTypes = defaultEventTypes;
prefs._version = 3;
localStorage.setItem('claudeman-notification-prefs', JSON.stringify(prefs));
localStorage.setItem(storageKey, JSON.stringify(prefs));
}
// Merge with defaults to ensure all eventTypes exist
return {
@@ -383,8 +386,14 @@ class NotificationManager {
return defaults;
}
// Get storage key for notification prefs (device-specific)
getStorageKey() {
const isMobile = MobileDetection.getDeviceType() === 'mobile';
return isMobile ? 'claudeman-notification-prefs-mobile' : 'claudeman-notification-prefs';
}
savePreferences() {
localStorage.setItem('claudeman-notification-prefs', JSON.stringify(this.preferences));
localStorage.setItem(this.getStorageKey(), JSON.stringify(this.preferences));
}
notify({ urgency, category, sessionId, sessionName, title, message }) {
@@ -923,7 +932,8 @@ class ClaudemanApp {
brightWhite: '#ffffff',
},
fontFamily: '"Fira Code", "Cascadia Code", "JetBrains Mono", "SF Mono", Monaco, monospace',
fontSize: 14,
// Use smaller font on mobile to fit more columns (prevents wrapping of Claude's status line)
fontSize: MobileDetection.getDeviceType() === 'mobile' ? 10 : 14,
lineHeight: 1.2,
cursorBlink: false,
cursorStyle: 'block',
@@ -936,7 +946,21 @@ class ClaudemanApp {
const container = document.getElementById('terminalContainer');
this.terminal.open(container);
this.fitAddon.fit();
// On mobile Safari, delay initial fit() to allow layout to settle
// This prevents 0-column terminals caused by fit() running before container is sized
const isMobileSafari = MobileDetection.getDeviceType() === 'mobile' &&
document.body.classList.contains('safari-browser');
if (isMobileSafari) {
// Wait for layout, then fit multiple times to ensure proper sizing
requestAnimationFrame(() => {
this.fitAddon.fit();
// Double-check after another frame
requestAnimationFrame(() => this.fitAddon.fit());
});
} else {
this.fitAddon.fit();
}
// Register link provider for clickable file paths in Bash tool output
this.registerFilePathLinkProvider();
@@ -956,6 +980,10 @@ class ClaudemanApp {
this._resizeTimeout = null;
this._lastResizeDims = null;
// Minimum terminal dimensions to prevent vertical text wrapping
const MIN_COLS = 40;
const MIN_ROWS = 10;
const throttledResize = () => {
if (this._resizeTimeout) return;
this._resizeTimeout = setTimeout(() => {
@@ -964,15 +992,18 @@ class ClaudemanApp {
this.fitAddon.fit();
if (this.activeSessionId) {
const dims = this.fitAddon.proposeDimensions();
// Enforce minimum dimensions to prevent layout issues
const cols = dims ? Math.max(dims.cols, MIN_COLS) : MIN_COLS;
const rows = dims ? Math.max(dims.rows, MIN_ROWS) : MIN_ROWS;
// Only send resize if dimensions actually changed
if (dims && (!this._lastResizeDims ||
dims.cols !== this._lastResizeDims.cols ||
dims.rows !== this._lastResizeDims.rows)) {
this._lastResizeDims = { cols: dims.cols, rows: dims.rows };
if (!this._lastResizeDims ||
cols !== this._lastResizeDims.cols ||
rows !== this._lastResizeDims.rows) {
this._lastResizeDims = { cols, rows };
fetch(`/api/sessions/${this.activeSessionId}/resize`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cols: dims.cols, rows: dims.rows })
body: JSON.stringify({ cols, rows })
});
}
}
@@ -1377,6 +1408,12 @@ class ClaudemanApp {
this.clearTerminal();
}
// Ctrl/Cmd + Shift + R - restore terminal size (after mobile squeeze)
if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.key === 'R') {
e.preventDefault();
this.restoreTerminalSize();
}
// Ctrl/Cmd + +/- - font size
if ((e.ctrlKey || e.metaKey) && (e.key === '=' || e.key === '+')) {
e.preventDefault();
@@ -1588,14 +1625,7 @@ class ClaudemanApp {
}
// Send resize to ensure proper dimensions
const dims = this.fitAddon.proposeDimensions();
if (dims) {
await fetch(`/api/sessions/${data.id}/resize`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cols: dims.cols, rows: dims.rows })
});
}
await this.sendResize(data.id);
} catch (err) {
console.error('clearTerminal refresh failed:', err);
}
@@ -1910,6 +1940,21 @@ class ClaudemanApp {
});
});
// Claude Code CLI info (version, model) parsed from terminal
addListener('session:cliInfo', (e) => {
const data = JSON.parse(e.data);
const session = this.sessions.get(data.sessionId);
if (session) {
if (data.version) session.cliVersion = data.version;
if (data.model) session.cliModel = data.model;
if (data.accountType) session.cliAccountType = data.accountType;
if (data.latestVersion) session.cliLatestVersion = data.latestVersion;
}
if (data.sessionId === this.activeSessionId) {
this.updateCliInfoDisplay();
}
});
// Background task events
addListener('task:created', (e) => {
const data = JSON.parse(e.data);
@@ -2644,8 +2689,14 @@ class ClaudemanApp {
// Build tabs HTML using array for better string concatenation performance
// Iterate in sessionOrder to respect user's custom tab arrangement
// On mobile: put active session first (only one tab visible anyway)
const parts = [];
for (const id of this.sessionOrder) {
let tabOrder = this.sessionOrder;
if (MobileDetection.getDeviceType() === 'mobile' && this.activeSessionId) {
// Reorder to put active tab first
tabOrder = [this.activeSessionId, ...this.sessionOrder.filter(id => id !== this.activeSessionId)];
}
for (const id of tabOrder) {
const session = this.sessions.get(id);
if (!session) continue; // Skip if session was removed
@@ -3079,14 +3130,7 @@ class ClaudemanApp {
}
// Send resize and Ctrl+L to trigger Claude to redraw at correct size
const dims = this.fitAddon.proposeDimensions();
if (dims) {
await fetch(`/api/sessions/${sessionId}/resize`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cols: dims.cols, rows: dims.rows })
});
}
await this.sendResize(sessionId);
// Update respawn banner
if (this.respawnStatus[sessionId]) {
@@ -3120,6 +3164,9 @@ class ClaudemanApp {
}
this.renderRalphStatePanel();
// Update CLI info bar (mobile - shows Claude version/model)
this.updateCliInfoDisplay();
// Update project insights panel for this session
this.renderProjectInsightsPanel();
@@ -6199,9 +6246,14 @@ class ClaudemanApp {
// Build options - existing cases first, then testcase as fallback if not present
let options = '';
const hasTestcase = cases.some(c => c.name === 'testcase');
const isMobile = MobileDetection.getDeviceType() === 'mobile';
const maxNameLength = isMobile ? 8 : 20; // Truncate to 8 chars on mobile
cases.forEach(c => {
options += `<option value="${c.name}">${c.name}</option>`;
const displayName = c.name.length > maxNameLength
? c.name.substring(0, maxNameLength) + '…'
: c.name;
options += `<option value="${c.name}">${displayName}</option>`;
});
// Add testcase option if it doesn't exist (will be created on first run)
@@ -6459,14 +6511,14 @@ class ClaudemanApp {
fetch(`/api/sessions/${id}/shell`, { method: 'POST' })
));
// Step 3: Resize all in parallel
const dims = this.fitAddon.proposeDimensions();
// Step 3: Resize all in parallel (with minimum dimension enforcement)
const dims = this.getTerminalDimensions();
if (dims) {
await Promise.all(sessionIds.map(id =>
fetch(`/api/sessions/${id}/resize`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cols: dims.cols, rows: dims.rows })
body: JSON.stringify(dims)
})
));
}
@@ -6724,6 +6776,59 @@ class ClaudemanApp {
} else {
tokensEl.style.display = 'none';
}
// Also update mobile CLI info bar (shows tokens on mobile)
this.updateCliInfoDisplay();
}
// Update CLI info display (tokens, version, model - shown on mobile)
updateCliInfoDisplay() {
const infoBar = this.$('cliInfoBar');
if (!infoBar) return;
const session = this.sessions.get(this.activeSessionId);
if (!session) {
infoBar.style.display = 'none';
return;
}
// Build display parts - tokens first (most important on mobile)
let parts = [];
// Add tokens if available
if (session.tokens) {
const total = typeof session.tokens === 'object' ? session.tokens.total : session.tokens;
if (total > 0) {
parts.push(`${this.formatTokens(total)} tokens`);
}
}
// Add model (condensed)
if (session.cliModel) {
// Shorten model names for mobile: "claude-sonnet-4-20250514" -> "Sonnet 4"
let model = session.cliModel;
if (model.includes('opus')) model = 'Opus';
else if (model.includes('sonnet')) model = 'Sonnet';
else if (model.includes('haiku')) model = 'Haiku';
parts.push(model);
}
// Add version (compact format)
if (session.cliVersion) {
// Show "v2.1.27" or "v2.1.27 ↑" if update available
let versionStr = `v${session.cliVersion}`;
if (session.cliLatestVersion && session.cliLatestVersion !== session.cliVersion) {
versionStr += ' ↑'; // Arrow indicates update available
}
parts.push(versionStr);
}
if (parts.length > 0) {
infoBar.textContent = parts.join(' · ');
infoBar.style.display = '';
} else {
infoBar.style.display = 'none';
}
}
// ========== Countdown Timer Display Methods ==========
@@ -6924,6 +7029,41 @@ class ClaudemanApp {
this.terminal.clear();
}
/**
* Restore terminal size to match web UI dimensions.
* Use this after mobile screen attachment has squeezed the terminal.
* Sends resize to PTY and Ctrl+L to trigger Claude to redraw.
*/
async restoreTerminalSize() {
if (!this.activeSessionId) {
this.showToast('No active session', 'warning');
return;
}
const dims = this.getTerminalDimensions();
if (!dims) {
this.showToast('Could not determine terminal size', 'error');
return;
}
try {
// Send resize to restore proper dimensions (with minimum enforcement)
await this.sendResize(this.activeSessionId);
// Send Ctrl+L to trigger Claude to redraw at new size
await fetch(`/api/sessions/${this.activeSessionId}/input`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ input: '\x0c' })
});
this.showToast(`Terminal restored to ${dims.cols}x${dims.rows}`, 'success');
} catch (err) {
console.error('Failed to restore terminal size:', err);
this.showToast('Failed to restore terminal size', 'error');
}
}
// Send Ctrl+L to fix display for newly created sessions once Claude is running
sendPendingCtrlL(sessionId) {
console.log('[DEBUG] sendPendingCtrlL called for:', sessionId, 'pending:', this.pendingCtrlL ? [...this.pendingCtrlL] : 'none');
@@ -6940,22 +7080,15 @@ class ClaudemanApp {
}
console.log('[DEBUG] Sending resize + Ctrl+L for session:', sessionId);
// Send resize + Ctrl+L to fix the display
const dims = this.fitAddon.proposeDimensions();
if (dims) {
fetch(`/api/sessions/${sessionId}/resize`, {
// Send resize + Ctrl+L to fix the display (with minimum dimension enforcement)
this.sendResize(sessionId).then(() => {
console.log('[DEBUG] Resize sent, now sending Ctrl+L');
fetch(`/api/sessions/${sessionId}/input`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cols: dims.cols, rows: dims.rows })
}).then(() => {
console.log('[DEBUG] Resize sent, now sending Ctrl+L');
fetch(`/api/sessions/${sessionId}/input`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ input: '\x0c' })
});
body: JSON.stringify({ input: '\x0c' })
});
}
});
}
async copyTerminal() {
@@ -7001,6 +7134,37 @@ class ClaudemanApp {
}
}
/**
* Get terminal dimensions with minimum enforcement.
* Prevents extremely narrow terminals that cause vertical text wrapping.
* @returns {{cols: number, rows: number}|null}
*/
getTerminalDimensions() {
const MIN_COLS = 40;
const MIN_ROWS = 10;
const dims = this.fitAddon?.proposeDimensions();
if (!dims) return null;
return {
cols: Math.max(dims.cols, MIN_COLS),
rows: Math.max(dims.rows, MIN_ROWS)
};
}
/**
* Send resize to a session with minimum dimension enforcement.
* @param {string} sessionId
* @returns {Promise<void>}
*/
async sendResize(sessionId) {
const dims = this.getTerminalDimensions();
if (!dims) return;
await fetch(`/api/sessions/${sessionId}/resize`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(dims)
});
}
// ========== Timer ==========
showTimer() {
@@ -8171,7 +8335,7 @@ class ClaudemanApp {
};
// Save to localStorage
localStorage.setItem('claudeman-app-settings', JSON.stringify(settings));
this.saveAppSettingsToStorage(settings);
// Save notification preferences separately
const notifPrefsToSave = {
@@ -8339,21 +8503,67 @@ class ClaudemanApp {
return settings.ralphTrackerEnabled ?? false;
}
// Get the settings storage key based on device type (mobile vs desktop)
getSettingsStorageKey() {
const isMobile = MobileDetection.getDeviceType() === 'mobile';
return isMobile ? 'claudeman-app-settings-mobile' : 'claudeman-app-settings';
}
// Get default settings based on device type
// Note: Notification prefs are handled separately by NotificationManager
getDefaultSettings() {
const isMobile = MobileDetection.getDeviceType() === 'mobile';
if (isMobile) {
// Mobile defaults: minimal UI for small screens
return {
// Header visibility - hide everything on mobile
showFontControls: false,
showSystemStats: false,
showTokenCount: false,
showCost: false,
// Panel visibility - hide panels on mobile (not enough space)
showMonitor: false,
showProjectInsights: false,
showFileBrowser: false,
showSubagents: false,
// Feature toggles - disable tracking features on mobile
subagentTrackingEnabled: false,
subagentActiveTabOnly: true, // Only show subagents for active tab
imageWatcherEnabled: false,
ralphTrackerEnabled: false,
};
}
// Desktop defaults - rely on ?? operators in apply functions
// This allows desktop to have different defaults without duplication
return {};
}
loadAppSettingsFromStorage() {
try {
const saved = localStorage.getItem('claudeman-app-settings');
const key = this.getSettingsStorageKey();
const saved = localStorage.getItem(key);
if (saved) {
return JSON.parse(saved);
}
} catch (err) {
console.error('Failed to load app settings:', err);
}
return {};
// Return device-specific defaults
return this.getDefaultSettings();
}
saveAppSettingsToStorage(settings) {
try {
const key = this.getSettingsStorageKey();
localStorage.setItem(key, JSON.stringify(settings));
} catch (err) {
console.error('Failed to save app settings:', err);
}
}
applyHeaderVisibilitySettings() {
const settings = this.loadAppSettingsFromStorage();
// Default all to true (enabled) if not set
// Use stored values or fallback defaults (mobile has different defaults via getDefaultSettings)
const showFontControls = settings.showFontControls ?? false;
const showSystemStats = settings.showSystemStats ?? true;
const showTokenCount = settings.showTokenCount ?? true;
@@ -8427,7 +8637,7 @@ class ClaudemanApp {
// Save the setting
const settings = this.loadAppSettingsFromStorage();
settings.showMonitor = false;
localStorage.setItem('claudeman-app-settings', JSON.stringify(settings));
this.saveAppSettingsToStorage(settings);
}
closeSubagentsPanel() {
@@ -8441,7 +8651,7 @@ class ClaudemanApp {
// Save the setting
const settings = this.loadAppSettingsFromStorage();
settings.showSubagents = false;
localStorage.setItem('claudeman-app-settings', JSON.stringify(settings));
this.saveAppSettingsToStorage(settings);
}
async clearAllSubagents() {
@@ -8489,7 +8699,7 @@ class ClaudemanApp {
// Save setting
const settings = this.loadAppSettingsFromStorage();
settings.showSubagents = true;
localStorage.setItem('claudeman-app-settings', JSON.stringify(settings));
this.saveAppSettingsToStorage(settings);
}
// Toggle open/collapsed state
@@ -8516,11 +8726,11 @@ class ClaudemanApp {
// Merge app settings with localStorage (server takes precedence)
const localSettings = this.loadAppSettingsFromStorage();
const merged = { ...localSettings, ...appSettings };
localStorage.setItem('claudeman-app-settings', JSON.stringify(merged));
this.saveAppSettingsToStorage(merged);
// Apply notification prefs from server if present (only if localStorage has none)
if (notificationPreferences && this.notificationManager) {
const localNotifPrefs = localStorage.getItem('claudeman-notification-prefs');
const localNotifPrefs = localStorage.getItem(this.notificationManager.getStorageKey());
if (!localNotifPrefs) {
this.notificationManager.preferences = notificationPreferences;
this.notificationManager.savePreferences();
@@ -12122,7 +12332,7 @@ class ClaudemanApp {
// Save setting
const settings = this.loadAppSettingsFromStorage();
settings.showFileBrowser = false;
localStorage.setItem('claudeman-app-settings', JSON.stringify(settings));
this.saveAppSettingsToStorage(settings);
}
async openFilePreview(filePath) {
@@ -13035,3 +13245,7 @@ class ClaudemanApp {
// Initialize
const app = new ClaudemanApp();
// Expose for debugging/testing
window.app = app;
window.MobileDetection = MobileDetection;
+2
View File
@@ -191,6 +191,8 @@
<!-- Main Terminal Area -->
<main class="main">
<!-- CLI Info Bar (shown on mobile - displays Claude Code version/model) -->
<div class="cli-info-bar" id="cliInfoBar" style="display: none;"></div>
<div class="terminal-container" id="terminalContainer"></div>
<!-- Welcome Overlay (shown when no session active) -->
+400 -71
View File
@@ -109,7 +109,9 @@ body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg-dark);
color: var(--text);
/* Use dynamic viewport height for mobile browsers */
height: 100vh;
height: 100dvh;
overflow: hidden;
}
@@ -117,7 +119,10 @@ body {
.app {
display: flex;
flex-direction: column;
/* Use dynamic viewport height for mobile browsers with fallbacks */
height: 100vh;
height: -webkit-fill-available;
height: 100dvh;
}
/* Compact Header */
@@ -1602,11 +1607,31 @@ body {
.main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--bg-dark);
position: relative;
}
/* CLI Info Bar - shows tokens/version/model on mobile */
.cli-info-bar {
display: none; /* Hidden by default on desktop */
flex-shrink: 0;
padding: 0.25rem 0.5rem;
font-size: 0.65rem;
font-family: 'SF Mono', Monaco, monospace;
color: var(--text-muted);
background: linear-gradient(180deg, rgba(30, 58, 95, 0.3) 0%, rgba(20, 20, 25, 0.95) 100%);
border-bottom: 1px solid rgba(59, 130, 246, 0.2);
text-align: center;
letter-spacing: 0.02em;
/* Prevent overflow on mobile */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.terminal-container {
flex: 1;
background: #0d0d0d;
@@ -1614,6 +1639,8 @@ body {
/* Performance: isolate layout and paint operations */
contain: strict;
will-change: contents;
/* Minimum width to prevent 0-column terminal on mobile */
min-width: 280px;
}
.terminal-container .xterm {
@@ -7831,10 +7858,74 @@ kbd {
padding-right: var(--safe-area-right);
}
/* Increase header height for better touch targets */
/* Compact header for tablet */
.header {
min-height: 48px;
padding: 0.5rem 0.75rem;
min-height: 44px;
max-height: 64px;
padding: 0.35rem 0.5rem;
}
/* Hide some header elements on tablet for more space */
.header-font-controls {
display: none;
}
.header-system-stats {
display: none;
}
.header-right {
gap: 0.35rem;
}
/* Compact session tabs */
.session-tabs {
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
max-height: 52px;
gap: 3px;
}
.session-tabs::-webkit-scrollbar {
display: none;
}
.session-tab {
padding: 0.4rem 0.6rem;
font-size: 0.75rem;
min-height: 40px;
}
.session-tab .tab-name {
max-width: 80px;
}
/* Compact toolbar */
.toolbar {
padding: 0.4rem 0.5rem;
gap: 0.4rem;
}
/* Hide instance count buttons on tablet too */
.tab-count-group {
display: none;
}
/* Compact toolbar buttons */
.btn-toolbar {
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
min-height: 40px;
}
.case-select-group {
max-width: 150px;
}
.toolbar-select {
font-size: 0.75rem;
}
/* Stack panels vertically */
@@ -7845,23 +7936,11 @@ kbd {
left: 0;
right: 0;
border-radius: 8px 8px 0 0;
max-height: 40vh;
}
/* Larger toolbar buttons */
.btn-toolbar {
padding: 0.5rem 1rem;
font-size: 0.8rem;
}
/* Session tabs horizontal scroll */
.session-tabs {
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.session-tabs::-webkit-scrollbar {
/* Hide project insights on tablet */
.project-insights-panel {
display: none;
}
}
@@ -7892,88 +7971,267 @@ kbd {
display: none;
}
/* Hide token count on phones - takes too much space */
.header-tokens {
display: none;
}
/* Compact header */
.header {
min-height: 48px;
padding: 0.4rem;
gap: 0.25rem;
min-height: 40px;
max-height: 52px; /* Tighter max height for mobile */
padding: 0.25rem 0.4rem;
gap: 0.2rem;
flex-shrink: 0;
overflow: hidden;
}
.header-right {
padding-left: 0.5rem;
gap: 0.25rem;
padding-left: 0.35rem;
gap: 0.15rem;
flex-shrink: 0;
border-left: none;
}
/* Full-width session tabs with horizontal scroll */
/* Smaller header buttons on mobile */
.btn-icon-header {
width: 32px;
height: 32px;
}
.btn-icon-header.btn-settings {
width: 32px;
height: 32px;
}
/* App container - prevent scrolling, strict layout */
.app {
overflow: hidden;
}
/* Compact session tabs - horizontal scroll, smaller */
.session-tabs {
flex: 1;
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
max-height: 56px;
max-height: 44px;
gap: 2px;
padding: 0.1rem 0.15rem;
}
.session-tabs::-webkit-scrollbar {
display: none;
}
/* Compact tabs for mobile */
.session-tab {
flex-shrink: 0;
min-height: var(--touch-target-min);
padding: 0.5rem 0.75rem;
min-height: 36px;
max-height: 36px;
padding: 0.3rem 0.5rem;
font-size: 0.7rem;
gap: 0.25rem;
border-radius: 3px;
}
/* Simplified toolbar */
/* Smaller status indicator on mobile */
.session-tab .tab-status {
width: 5px;
height: 5px;
}
/* Truncate tab names more aggressively on mobile */
.session-tab .tab-name {
max-width: 60px;
overflow: hidden;
text-overflow: ellipsis;
}
/* Smaller close/gear buttons on mobile tabs */
.session-tab .tab-close,
.session-tab .tab-gear {
font-size: 0.75rem;
padding: 0.1rem 0.25rem;
}
/* Compact toolbar - only essential buttons */
.toolbar {
height: auto;
min-height: var(--toolbar-height);
padding: 0.5rem;
padding-bottom: calc(0.5rem + var(--safe-area-bottom));
flex-wrap: wrap;
gap: 0.5rem;
height: 44px;
min-height: 44px;
max-height: 44px;
padding: 0.4rem 0.6rem;
padding-bottom: calc(0.4rem + var(--safe-area-bottom));
flex-wrap: nowrap;
gap: 0.4rem;
align-items: center;
background: linear-gradient(180deg, var(--bg-card) 0%, rgba(20, 20, 25, 0.98) 100%);
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
/* Hide secondary toolbar groups */
.toolbar-center {
display: none;
display: none !important;
}
.toolbar-left .toolbar-group:not(:first-child) {
display: none;
.toolbar-right {
display: none !important;
}
/* Full-width primary toolbar group */
/* Hide version display on mobile */
.version-display {
display: none !important;
}
/* Full-width primary toolbar group - left-aligned for mobile */
.toolbar-left {
flex: 1;
justify-content: center;
justify-content: flex-start;
width: 100%;
align-items: center;
gap: 0.4rem;
}
.toolbar-left .toolbar-group {
display: flex;
align-items: center;
gap: 0.4rem;
}
.toolbar-left .toolbar-group:first-child {
flex: 1;
justify-content: space-around;
justify-content: flex-start;
gap: 0.4rem;
flex-wrap: nowrap;
align-items: center;
}
/* Larger toolbar buttons for touch */
/* Hide instance count buttons (±) on mobile - cleaner UI */
.tab-count-group {
display: none !important;
}
/* Sleek compact toolbar buttons for mobile */
.btn-toolbar {
min-height: var(--touch-target-min);
padding: 0.5rem 1rem;
font-size: 0.85rem;
}
.btn-toolbar.btn-claude {
flex: 1;
min-height: 28px !important;
max-height: 28px !important;
height: 28px !important;
padding: 0 0.6rem !important;
font-size: 0.7rem !important;
border-radius: 6px;
line-height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 500;
letter-spacing: 0.01em;
}
/* Full-width panels */
/* Primary action button - Run Claude */
.btn-toolbar.btn-claude {
flex: 0 0 auto;
padding: 0 0.75rem !important;
background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
border: none;
box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.btn-toolbar.btn-claude:hover {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
box-shadow: 0 3px 8px rgba(37, 99, 235, 0.4);
}
.btn-toolbar.btn-claude svg {
width: 11px;
height: 11px;
margin-right: 4px;
}
/* Secondary action - Run Shell */
.btn-toolbar.btn-shell {
flex: 0 0 auto;
background: rgba(34, 197, 94, 0.15);
border: 1px solid rgba(34, 197, 94, 0.3);
color: #4ade80;
}
.btn-toolbar.btn-shell:hover {
background: rgba(34, 197, 94, 0.25);
border-color: rgba(34, 197, 94, 0.5);
}
/* Compact case selector for mobile - centered in toolbar */
.case-select-group {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 4px;
/* Center in available space, not pushed to edge */
margin: 0 auto;
}
.toolbar-select {
font-size: 0.7rem !important;
padding: 0 1.2rem 0 0.5rem !important;
min-height: 28px !important;
max-height: 28px !important;
height: 28px !important;
line-height: 28px;
border-radius: 6px;
background: var(--bg-input);
border: 1px solid rgba(255, 255, 255, 0.15);
/* Limit width so long names don't overflow */
max-width: 90px;
text-overflow: ellipsis;
overflow: hidden;
}
/* Add case button - always visible on mobile */
.btn-case-add {
min-width: 28px !important;
max-width: 28px !important;
width: 28px !important;
min-height: 28px !important;
max-height: 28px !important;
height: 28px !important;
padding: 0 !important;
font-size: 1rem;
font-weight: bold;
display: inline-flex !important;
align-items: center;
justify-content: center;
line-height: 1;
border-radius: 6px;
background: rgba(34, 197, 94, 0.15);
border: 1px solid rgba(34, 197, 94, 0.3);
color: var(--success);
}
.btn-case-add:hover {
background: rgba(34, 197, 94, 0.25);
border-color: rgba(34, 197, 94, 0.5);
}
/* Full-width panels - hide on phones due to limited screen space and toolbar overlap */
.monitor-panel,
.subagents-panel {
/* Hide by default on phones - not enough screen space and overlaps toolbar */
display: none !important;
}
/* When explicitly shown via class, use proper mobile styling */
.monitor-panel.force-show-mobile,
.subagents-panel.force-show-mobile {
display: flex !important;
width: 100%;
max-width: 100%;
left: 0;
right: 0;
border-radius: 8px 8px 0 0;
/* Position well above the mobile toolbar (44px + safe area) */
bottom: calc(44px + 2rem + var(--safe-area-bottom));
max-height: 35vh;
}
/* Full-screen modals on phones */
@@ -7993,19 +8251,23 @@ kbd {
}
.modal-header {
padding: 1rem;
padding: 0.75rem 1rem;
}
.modal-header h3 {
font-size: 1rem;
}
.modal-body {
padding: 1rem;
padding: 0.75rem 1rem;
flex: 1;
overflow-y: auto;
}
.modal-footer,
.form-actions {
padding: 1rem;
padding-bottom: calc(1rem + var(--safe-area-bottom));
padding: 0.75rem 1rem;
padding-bottom: calc(0.75rem + var(--safe-area-bottom));
}
/* Terminal container safe area */
@@ -8013,24 +8275,69 @@ kbd {
padding-bottom: var(--safe-area-bottom);
}
/* Welcome overlay adjustments */
/* Main area must fill available space */
.main {
flex: 1;
min-height: 0; /* Allow flex item to shrink below content size */
}
/* Show CLI info bar on mobile (Claude version/model) */
.cli-info-bar {
display: block;
}
.terminal-container {
height: calc(100% + 45px); /* Make taller so bottom is clipped */
min-height: 0;
position: relative;
margin-bottom: -45px; /* Clip bottom - hides status line but keeps input visible */
}
/* Gradient mask at bottom to smoothly fade content into clipped area */
.terminal-container::after {
content: '';
position: absolute;
bottom: 45px; /* Position above the clipped area */
left: 0;
right: 0;
height: 20px;
background: linear-gradient(to bottom, transparent 0%, #0d0d0d 100%);
pointer-events: none;
z-index: 5;
}
/* Compact welcome overlay for mobile */
.welcome-content {
padding: 1.5rem 1rem;
padding: 1rem 0.75rem;
}
.welcome-title {
font-size: 1.4rem;
font-size: 1.2rem;
margin-bottom: 0.5rem;
}
.welcome-desc {
font-size: 0.8rem;
margin-bottom: 0.4rem;
}
.welcome-actions {
flex-direction: column;
gap: 0.75rem;
gap: 0.5rem;
margin-top: 1rem;
}
.welcome-btn {
width: 100%;
justify-content: center;
min-height: var(--touch-target-min);
min-height: 44px;
padding: 0.75rem 1rem;
font-size: 0.85rem;
}
.welcome-hint {
font-size: 0.7rem;
margin-top: 0.75rem;
}
/* Ralph wizard responsive */
@@ -8040,31 +8347,53 @@ kbd {
}
.wizard-progress {
padding: 0.75rem;
padding: 0.5rem;
}
.wizard-step {
padding: 0.3rem;
}
.wizard-step-number {
width: 24px;
height: 24px;
font-size: 0.7rem;
}
.wizard-step-label {
display: none;
}
/* Tab count group responsive */
.tab-count-group {
margin: 0;
/* Respawn/Ralph panels - more compact on mobile */
.respawn-banner {
padding: 0.4rem 0.5rem;
font-size: 0.7rem;
}
.tab-count-btn {
min-width: var(--touch-target-min);
min-height: var(--touch-target-min);
.ralph-panel {
font-size: 0.75rem;
}
/* Case select responsive */
.case-select-group {
flex: 0 0 auto;
.ralph-summary {
padding: 0.4rem 0.5rem;
}
.toolbar-select {
font-size: 0.8rem;
padding: 0.5rem 1.5rem 0.5rem 0.75rem;
/* Project insights panel - hide on mobile */
.project-insights-panel {
display: none !important;
}
/* File browser panel - hide on mobile */
.file-browser-panel {
display: none !important;
}
/* Notification drawer - full width on mobile */
.notification-drawer {
width: 100%;
max-width: 100%;
right: 0;
border-radius: 0;
}
}
+6
View File
@@ -3663,6 +3663,12 @@ NOW: Generate the implementation plan for the task above. Think step by step.`;
if (tracker) tracker.recordAutoCompact(data.tokens, data.threshold);
});
// Claude Code CLI info parsed from terminal (version, model, account)
session.on('cliInfoUpdated', (data: { version?: string; model?: string; accountType?: string; latestVersion?: string }) => {
this.broadcast('session:cliInfo', { sessionId: session.id, ...data });
this.broadcastSessionStateDebounced(session.id);
});
// Ralph tracking events
session.on('ralphLoopUpdate', (state: RalphTrackerState) => {
this.broadcast('session:ralphLoopUpdate', { sessionId: session.id, state });