Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ClaudeCodeWebInterface {
this.setupTerminal();
this.setupUI();
this.setupPlanDetector();
// Pane manager after UI exists (always-on multi-pane)
// Pane manager after UI exists (optional multi-pane)
this.paneManager = new PaneManager(this);
this.loadSettings();
this.applyAliasesToUI();
Expand All @@ -85,10 +85,8 @@ class ClaudeCodeWebInterface {
// Initialize the session tab manager and wait for sessions to load
this.sessionTabManager = new SessionTabManager(this);
await this.sessionTabManager.init();
// Always enable multi-pane mode and hide global tabs
if (this.paneManager && !this.paneManager.enabled) {
this.paneManager.enable();
}
// Respect user preference from storage; do not auto-enable panes by default
// PaneManager.restoreFromStorage() will enable if previously enabled.

// Show mode switcher on mobile
if (this.isMobile) {
Expand Down
34 changes: 23 additions & 11 deletions src/public/panes.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ class ClaudePane {
this.hadOutput = true;
this.hideStartOverlay();
}
} else if (msg.type === 'session_joined') {
// Replay recent buffer so existing sessions show content immediately
if (Array.isArray(msg.outputBuffer) && msg.outputBuffer.length) {
const joined = msg.outputBuffer.join('');
const filtered = joined.replace(/\x1b\[\[?[IO]/g, '');
Comment on lines +85 to +86
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern /\x1b\[\[?[IO]/g uses a magic regular expression without explanation. Consider adding a comment explaining what ANSI escape sequences are being filtered, or extract this to a named constant like ANSI_IO_FILTER_REGEX.

Copilot uses AI. Check for mistakes.
this.terminal.write(filtered);
if (filtered) {
this.hadOutput = true;
this.hideStartOverlay();
}
}
} else if (msg.type === 'error') {
// Show errors in terminal UI for visibility
const text = (msg.message || 'Error').toString();
this.terminal.write(`\r\n\x1b[31m${text}\x1b[0m\r\n`);
}
};
this.socket.onclose = () => {};
Expand Down Expand Up @@ -267,11 +282,7 @@ class PaneManager {
const active = this.app?.currentClaudeSessionId;
if (active) this.assignSession(0, active);
this.focusPane(this.activeIndex || 0);
// Hide global tabs in tiled mode
const tabsSection = document.querySelector('.tabs-section');
if (tabsSection) tabsSection.style.display = 'none';
const overflow = document.getElementById('tabOverflowWrapper');
if (overflow) overflow.style.display = 'none';
// Keep global tabs visible; they target the active pane (VS Code-style)
this.persist();
}
disable() {
Expand All @@ -283,11 +294,7 @@ class PaneManager {
const tw = tc.querySelector('.terminal-wrapper');
if (tw) tw.style.display = '';
}
// Show global tabs again
const tabsSection = document.querySelector('.tabs-section');
if (tabsSection) tabsSection.style.display = '';
const overflow = document.getElementById('tabOverflowWrapper');
if (overflow) overflow.style.display = '';
// Global tabs remain visible in both modes
this.persist();
}

Expand Down Expand Up @@ -739,7 +746,12 @@ class PaneManager {
this.grid.querySelectorAll('.pane-add').forEach(btn => btn.addEventListener('click', (e) => {
const idx = parseInt(btn.dataset.index, 10);
this.focusPane(idx);
this.app?.showFolderBrowser?.();
// Shift-click to create a new session directly; normal click opens session picker
if (e.shiftKey) {
this.app?.showFolderBrowser?.();
} else {
this.openAddMenu(idx, btn);
}
Comment on lines +749 to +754
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The openAddMenu method is called but not defined in the visible code context. Verify that this method exists in the PaneManager class, as calling an undefined method will result in a runtime error.

Copilot uses AI. Check for mistakes.
e.stopPropagation();
}));
this.refreshSessionSelects();
Expand Down
4 changes: 1 addition & 3 deletions src/public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,7 @@ body {
.tab-tile:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.tab-tile[disabled] { opacity: .5; cursor: not-allowed; }

/* Always multi-pane: hide global tabs */
.session-tabs-bar .tabs-section { display: none !important; }
#tabOverflowWrapper { display: none !important; }
/* Global tabs are visible; panes can be enabled optionally */

.tab-new:hover {
background-color: var(--bg-tertiary);
Expand Down