Skip to content
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Tether gives you a **single window** with a sidebar to manage it all — while e
- **Multiple concurrent sessions** with instant switching — click in the sidebar, or `Ctrl+1`–`Ctrl+9`
- **Session grouping** by environment and working directory; collapsible groups, **drag-reorder** inside a group
- **Bulk group actions** — Stop all / Restart all / Clear all per repo group from a right-click menu
- **Split panes** *(experimental)* — drag from the sidebar into drop zones to view sessions side-by-side; keyboard-driven focus (`Alt+Arrow`) and swap (`Alt+Shift+Arrow`); broadcast input to multiple panes; in-pane recovery overlay when a session dies
- **Canvas layout** *(experimental)* — arrange movable, resizable session panels, pan across larger workspaces, and retain their arrangement when switching layouts
- **Split panes** — pick a single pane or up to 2 or 4 panes from the title bar's **Layout** control; drag from the sidebar into drop zones to view sessions side-by-side; keyboard-driven focus (`Alt+Arrow`) and swap (`Alt+Shift+Arrow`); broadcast input to multiple panes; in-pane recovery overlay when a session dies
- **Canvas layout** — arrange movable, resizable session panels, pan across larger workspaces, and retain their arrangement when switching layouts
- **Workspace recipes** — save named session groups and layouts, then reopen selected slots with edited paths or remapped environments; opening a recipe starts fresh sessions and leaves existing ones running
- **Navigation and visibility** — `Ctrl+P` session search, an attention queue, local repository branch/dirty badges, and terminal hover previews
- **Child-agent visibility** — Claude subagent rows for local, SSH, and Coder sessions, with status, model, timing, tokens, and a read-only transcript viewer. Trusted, opted-in local Codex lifecycle hooks also show `codex exec` runs launched by Claude
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Most settings apply on **Save**. Theme changes preview and revert on Cancel. Act

Eleven themes and independent UI/terminal font settings are defined in the renderer, with bundled fonts, a live specimen preview, and comfortable/compact density. The default theme key is `mocha`; the theme labeled **Tether (Default Dark)** is another choice, not the startup default.

Pane splitting is opt-in, with maximum counts of 1, 2, or 4. Layout and session selection stay in the renderer. Keyboard defaults live in `src/shared/keybindings.ts`. Broadcast input is selected from pane headers and only fans out from a selected pane when at least two live targets are selected.
The title bar's Layout control picks a single pane, a maximum of 2 or 4 split panes, or Canvas. Layout and session selection stay in the renderer. Keyboard defaults live in `src/shared/keybindings.ts`. Broadcast input is selected from pane headers and only fans out from a selected pane when at least two live targets are selected.

Canvas is an independent experimental layout with movable/resizable panels, panning, keyboard navigation, and persisted geometry. Offscreen panels detach their views and retain their terminal buffers. Entering Canvas clears broadcast targets. Terminal search reads the focused pane's scrollback without sending CLI input.

Expand Down
2 changes: 1 addition & 1 deletion src/docs/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Recipes use the same launch path as creating sessions manually. Manual CLI flags

### Canvas workspace

Select **Layout → Canvas** or **View → Canvas Mode** to use movable, resizable session panels. Canvas is independent of the split-pane setting and its four-pane limit.
Select **Layout → Canvas** or **View → Canvas Mode** to use movable, resizable session panels. Canvas is independent of the split layouts and their four-pane limit.

- On first use, existing sessions are placed on the canvas. Click a session in the sidebar or use **Add session** to open another panel. Selecting a session already on the canvas brings its panel into view and focuses it.
- Drag a sidebar session onto the canvas to place it at the drop position. Drag panel headers to move them and panel edges or corners to resize them.
Expand Down
10 changes: 3 additions & 7 deletions src/docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ When the xterm.js cursor is visible, pick its shape (block / underline / bar) an

## Sessions

Launch profiles and default environment variables appear first. CLI defaults and per-tool controls are under **CLI tools**. Expand **Advanced session options** for Helm, CLI status hooks, pane splitting, and the maximum pane count. These options keep their existing opt-in behavior.
Launch profiles and default environment variables appear first. CLI defaults and per-tool controls are under **CLI tools**. Expand **Advanced session options** for Helm and CLI status hooks. These options keep their existing opt-in behavior.

Pane layout is not a setting in this dialog. Pick **Single pane**, **Up to 2 panes**, **Up to 4 panes**, or **Canvas** from the title bar's **Layout** control; see [split panes](getting-started.md#split-panes).

### Allow Helm

Expand All @@ -265,12 +267,6 @@ signal.

SSH environments can extend this to their remote hosts, but only with a second, per-environment opt-in — see [CLI status hooks on remote hosts](environments.md#cli-status-hooks-on-remote-hosts). With the global toggle on and the environment checkbox off, remote sessions stay on cadence-only detection and nothing is written to the host.

### Enable pane splitting

Turns on drag-to-split and the split pane layout. When off, the standard layout shows one full-screen session. **Layout → Canvas** is a separate mode with movable, resizable panels and works regardless of this setting. See [Getting Started](getting-started.md#split-panes).

**Maximum panes** sets a limit of 1, 2, or 4 (default 4 when splitting is enabled). The title bar's **Layout** control changes the same settings immediately. Lowering the limit leaves other sessions running in the sidebar.

### Default environment variables

Key-value pairs applied as the **global defaults** for every new session. Common examples:
Expand Down
26 changes: 15 additions & 11 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ export function App() {
const [showResumeBadge, setShowResumeBadge] = useState(false);
const [enableResumePicker, setEnableResumePicker] = useState(true);
const [allowHelm, setAllowHelm] = useState(false);
const [enablePaneSplitting, setEnablePaneSplitting] = useState(false);
const [maxPanes, setMaxPanes] = useState(4);
// The title bar's Layout control is the only place this changes. 1 means a single pane.
const [maxPanes, setMaxPanes] = useState(1);
const enablePaneSplitting = maxPanes > 1;
const [resumePickerFor, setResumePickerFor] = useState<{ sessionId: string; workingDir: string; cliTool: CreateSessionOptions['cliTool']; currentTranscriptId?: string } | null>(null);
const [isDragging, setIsDragging] = useState(false);
const [draggingPaneId, setDraggingPaneId] = useState<string | null>(null);
Expand Down Expand Up @@ -251,7 +252,7 @@ export function App() {
// the restored sessions and any failed entries have been accounted for.
const [workspaceReady, setWorkspaceReady] = useState(false);
const savedCanvas = useMemo(() => saveCanvas(canvasState, sessions.map(s => s.id)), [canvasState, sessions]);
const effectiveMaxPanes = canvasEnabled ? Number.POSITIVE_INFINITY : enablePaneSplitting ? maxPanes : 1;
const effectiveMaxPanes = canvasEnabled ? Number.POSITIVE_INFINITY : maxPanes;

const handleCanvasMode = useCallback((enabled: boolean) => {
if (enabled) {
Expand Down Expand Up @@ -430,8 +431,7 @@ export function App() {
if (cancelled) return;
setShowResumeBadge(badge === 'true');
setEnableResumePicker(picker !== 'false');
setEnablePaneSplitting(splitting === 'true');
setMaxPanes(parseMaxPanes(maxPaneValue));
setMaxPanes(savedPaneLimit(splitting, maxPaneValue));
const shouldHideCursor = hideCursor !== 'false';
setHideTerminalCursor(shouldHideCursor);
setAllowHelm(helm === 'true');
Expand Down Expand Up @@ -523,7 +523,7 @@ export function App() {
// The main process still owns the PTY processes — just rebuild UI state.
const splittingSetting = await window.electronAPI.config.get?.('enablePaneSplitting');
const maxPaneSetting = await window.electronAPI.config.get?.('maxPanes');
const reconnectMaxPanes = splittingSetting === 'true' ? parseMaxPanes(maxPaneSetting) : 1;
const reconnectMaxPanes = savedPaneLimit(splittingSetting, maxPaneSetting);

// Load saved workspace for ordering/focus hints
const workspace = await window.electronAPI.workspace?.load?.();
Expand Down Expand Up @@ -633,7 +633,7 @@ export function App() {
const resumeChats = resumeSetting !== 'false';
const splittingSetting = await window.electronAPI.config.get?.('enablePaneSplitting');
const maxPaneSetting = await window.electronAPI.config.get?.('maxPanes');
const restoreMaxPanes = splittingSetting === 'true' ? parseMaxPanes(maxPaneSetting) : 1;
const restoreMaxPanes = savedPaneLimit(splittingSetting, maxPaneSetting);

const workspace = await window.electronAPI.workspace?.load?.();
if (!workspace || !workspace.sessions.length) return;
Expand Down Expand Up @@ -911,7 +911,7 @@ export function App() {
}, [splitDispatch, canvasDispatch, setCanvasEnabled]);
const workspaceRecipes = useWorkspaceRecipeController({
activeSessionId, splitState: splitLayoutState, canvasState, canvasEnabled,
maxPanes: enablePaneSplitting ? maxPanes : 1,
maxPanes,
registerSession: registerRecipeSession, requestVaultLogin: requestRecipeVaultLogin,
applyLayout: applyRecipeLayout, focusPane: termManager.focusPane, notifyError,
});
Expand Down Expand Up @@ -2000,7 +2000,6 @@ export function App() {
await window.electronAPI.config.set('maxPanes', String(limit));
await window.electronAPI.config.set('enablePaneSplitting', limit > 1 ? 'true' : 'false');
setMaxPanes(limit);
setEnablePaneSplitting(limit > 1);
handleCanvasMode(false);
} catch (error) {
notifyError('Could not update the pane layout', error);
Expand Down Expand Up @@ -2410,7 +2409,12 @@ function setsEqual<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): boolean {
return true;
}

function parseMaxPanes(value: string | null | undefined): number {
const parsed = Number(value);
/**
* Pane limit from the two saved keys. `enablePaneSplitting` predates the Layout control and is still
* written alongside `maxPanes`, so an older build reads the same layout.
*/
function savedPaneLimit(splitting: string | null | undefined, maxPanes: string | null | undefined): number {
if (splitting !== 'true') return 1;
const parsed = Number(maxPanes);
return clampMaxPanes(Number.isFinite(parsed) ? parsed : 4);
}
58 changes: 3 additions & 55 deletions src/renderer/components/SettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
const [showResumeBadge, setShowResumeBadge] = useState(false);
const [showSubagents, setShowSubagents] = useState(true);
const [enableResumePicker, setEnableResumePicker] = useState(true);
const [enablePaneSplitting, setEnablePaneSplitting] = useState(false);
const [maxPanes, setMaxPanes] = useState(4);
const [allowHelm, setAllowHelm] = useState(false);
const [cliHooksEnabled, setCliHooksEnabled] = useState(false);
const [codexLifecycleHooksEnabled, setCodexLifecycleHooksEnabled] = useState(false);
Expand Down Expand Up @@ -263,8 +261,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
window.electronAPI.config.get?.('resumePreviousChats')?.catch(() => null),
window.electronAPI.config.get?.('showResumeBadge')?.catch(() => null),
window.electronAPI.config.get?.('enableResumePicker')?.catch(() => null),
window.electronAPI.config.get?.('enablePaneSplitting')?.catch(() => null),
window.electronAPI.config.get?.('maxPanes')?.catch(() => null),
window.electronAPI.config.get?.('updateCheckEnabled')?.catch(() => null),
window.electronAPI.config.get?.('confirmQuitWithActiveSessions')?.catch(() => null),
window.electronAPI.config.get?.('quotaEnabled')?.catch(() => null),
Expand All @@ -287,7 +283,7 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
window.electronAPI.config.get?.('updateChannel')?.catch(() => null),
window.electronAPI.config.get('uiDensity').catch(() => null),
window.electronAPI.config.get?.('showSubagentsInSidebar')?.catch(() => null),
]).then(([vars, restore, perToolFlags, cliToolSetting, customCliBinarySetting, resumeChats, badge, picker, splitting, maxPaneValue, updateCheck, confirmQuit, quota, codexQuotaWarning, usageStrip, globalUsage, cliBreakdown, dailyBudget, weeklyBudget, hideCursor, helm, fontSize, fontFamily, uiFont, cursorStyle, cursorBlink, scrollback, cliHooks, codexLifecycleHooks, updateCh, densityValue, subagentsSetting]) => {
]).then(([vars, restore, perToolFlags, cliToolSetting, customCliBinarySetting, resumeChats, badge, picker, updateCheck, confirmQuit, quota, codexQuotaWarning, usageStrip, globalUsage, cliBreakdown, dailyBudget, weeklyBudget, hideCursor, helm, fontSize, fontFamily, uiFont, cursorStyle, cursorBlink, scrollback, cliHooks, codexLifecycleHooks, updateCh, densityValue, subagentsSetting]) => {
if (cancelled) return;
setEnvVars(vars || {});
setRestoreOnLaunch(restore !== 'false');
Expand All @@ -299,8 +295,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
setShowResumeBadge(badge === 'true');
setShowSubagents(subagentsSetting !== 'false');
setEnableResumePicker(picker !== 'false');
setEnablePaneSplitting(splitting === 'true');
setMaxPanes(parseMaxPanes(maxPaneValue));
setUpdateCheckEnabled(updateCheck !== 'false');
setConfirmQuitWithActiveSessions(confirmQuit !== 'false');
setQuotaEnabled(quota !== 'false');
Expand Down Expand Up @@ -393,8 +387,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
await window.electronAPI.config.set?.('showResumeBadge', showResumeBadge ? 'true' : 'false');
await window.electronAPI.config.set?.('showSubagentsInSidebar', showSubagents ? 'true' : 'false');
await window.electronAPI.config.set?.('enableResumePicker', enableResumePicker ? 'true' : 'false');
await window.electronAPI.config.set?.('enablePaneSplitting', enablePaneSplitting ? 'true' : 'false');
await window.electronAPI.config.set?.('maxPanes', String(maxPanes));
await window.electronAPI.config.set?.('updateCheckEnabled', updateCheckEnabled ? 'true' : 'false');
await window.electronAPI.config.set?.('confirmQuitWithActiveSessions', confirmQuitWithActiveSessions ? 'true' : 'false');
await window.electronAPI.config.set?.('updateChannel', updateChannel);
Expand Down Expand Up @@ -436,7 +428,7 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
} finally {
setSaving(false);
}
}, [saving, loaded, currentTheme, uiDensity, envVars, restoreOnLaunch, resumePreviousChats, showResumeBadge, showSubagents, enableResumePicker, enablePaneSplitting, maxPanes, updateCheckEnabled, confirmQuitWithActiveSessions, updateChannel, quotaEnabled, codexQuotaWarningPercent, usageStripEnabled, globalUsageEnabled, cliToolBreakdownEnabled, dailyBudgetUsd, weeklyBudgetUsd, hideTerminalCursor, terminalCursorStyle, terminalCursorBlink, allowHelm, cliHooksEnabled, codexLifecycleHooksEnabled, terminalFontSize, terminalScrollback, terminalFontFamily, uiFontFamily, defaultCliTool, defaultCustomCliBinary, cliFlagsPerTool, vaultConfig, notificationPrefs, jobsSettings, jobsDirty, jobsTesting, onClose]);
}, [saving, loaded, currentTheme, uiDensity, envVars, restoreOnLaunch, resumePreviousChats, showResumeBadge, showSubagents, enableResumePicker, updateCheckEnabled, confirmQuitWithActiveSessions, updateChannel, quotaEnabled, codexQuotaWarningPercent, usageStripEnabled, globalUsageEnabled, cliToolBreakdownEnabled, dailyBudgetUsd, weeklyBudgetUsd, hideTerminalCursor, terminalCursorStyle, terminalCursorBlink, allowHelm, cliHooksEnabled, codexLifecycleHooksEnabled, terminalFontSize, terminalScrollback, terminalFontFamily, uiFontFamily, defaultCliTool, defaultCustomCliBinary, cliFlagsPerTool, vaultConfig, notificationPrefs, jobsSettings, jobsDirty, jobsTesting, onClose]);

const handleJobsAction = async (action: 'save' | 'disable' | 'remove') => {
if (jobsTesting || saving || (action === 'save' && !jobsSettings)) return;
Expand Down Expand Up @@ -615,7 +607,7 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
appearance: 'theme color dark light font interface density comfortable compact sidebar subagents',
general: 'restore resume startup launch update quit close folder logs',
terminal: 'terminal cursor font size scrollback blink',
sessions: 'profiles environment variables helm hooks splitting maximum panes advanced',
sessions: 'profiles environment variables helm hooks advanced',
'cli-tools': 'claude codex opencode copilot cli default flags update account usage quota configuration model agent reasoning profile hooks lifecycle mcp skill',
notifications: 'notifications alerts sound waiting idle webhook',
shortcuts: 'shortcuts keyboard keybindings remap',
Expand Down Expand Up @@ -1262,42 +1254,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
</p>
</div>

<div className="form-group">
<label className="form-radio-label">
<input
type="checkbox"
checked={enablePaneSplitting}
onChange={e => setEnablePaneSplitting(e.target.checked)}
/>
<span>Enable pane splitting</span>
<span className="settings-tag settings-tag--experimental">Experimental</span>
</label>
<p className="form-hint">
Drag session headers to split the terminal area into multiple panes.
Disable if you hit layout bugs &mdash; new sessions will replace the focused pane instead.
</p>
{enablePaneSplitting && (
<div style={{ marginLeft: 22, marginTop: 10 }}>
<label className="form-label" htmlFor="max-panes-select">
Maximum panes
</label>
<select
id="max-panes-select"
className="form-input"
value={maxPanes}
onChange={e => setMaxPanes(parseMaxPanes(e.target.value))}
>
<option value={1}>1</option>
<option value={2}>2</option>
<option value={4}>4</option>
</select>
<p className="form-hint">
Panes use equal locked splits. Three-pane layouts are skipped.
</p>
</div>
)}
</div>

</details>
</>
)}
Expand Down Expand Up @@ -2145,14 +2101,6 @@ export function SettingsDialog({ isOpen, initialSection, onClose, currentTheme,
);
}

function parseMaxPanes(value: string | null | undefined): number {
const parsed = Number(value);
if (!Number.isFinite(parsed)) return 4;
if (parsed <= 1) return 1;
if (parsed <= 2) return 2;
return 4;
}

function trimmedSetting(value: unknown): string {
return typeof value === 'string' ? value.trim() : '';
}
Expand Down
Loading