Skip to content

Commit 11a09b8

Browse files
nedtwiggclaude
andcommitted
Add custom app bar to standalone mode.
Custom title bar with project directory display, shell dropdown for creating new terminal splits, and platform-adaptive window controls. macOS uses native traffic lights via titleBarStyle overlay; Windows/Linux gets custom minimize/maximize/close buttons. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6c9dd4d commit 11a09b8

11 files changed

Lines changed: 743 additions & 5 deletions

File tree

lib/src/components/Pond.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,30 @@ export function Pond({
16881688
const handleReattachRef = useRef(handleReattach);
16891689
handleReattachRef.current = handleReattach;
16901690

1691+
// Listen for external "new terminal" requests (e.g. from the standalone AppBar)
1692+
useEffect(() => {
1693+
const handler = () => {
1694+
const api = apiRef.current;
1695+
if (!api) return;
1696+
const newId = generatePaneId();
1697+
const active = api.activePanel;
1698+
let direction: 'right' | 'below' = 'right';
1699+
if (active) {
1700+
direction = (active.api.width - active.api.height > 0) ? 'right' : 'below';
1701+
}
1702+
api.addPanel({
1703+
id: newId,
1704+
component: 'terminal',
1705+
tabComponent: 'terminal',
1706+
title: '<unnamed>',
1707+
position: active ? { referencePanel: active.id, direction } : undefined,
1708+
});
1709+
selectPanel(newId);
1710+
};
1711+
window.addEventListener('mouseterm:new-terminal', handler);
1712+
return () => window.removeEventListener('mouseterm:new-terminal', handler);
1713+
}, [generatePaneId, selectPanel]);
1714+
16911715
const addSplitPanel = useCallback((
16921716
id: string | null,
16931717
direction: 'right' | 'below',

0 commit comments

Comments
 (0)