cmux/Sources
Lawrence Chen cae40d1a4c
Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160)
* Sidebar ports on own line, wider sidebar, CMUX_PORT env vars

- Move listening ports to dedicated sidebar row (removed from branch/directory line)
- Allow sidebar to resize up to 2/3 of screen width (was capped at 360px)
- Add CMUX_PORT, CMUX_PORT_END, CMUX_PORT_RANGE env vars per workspace
- Each workspace gets a dedicated port range (default: base 9100, range 10)
- Add settings UI for port base and range size
- Add portOrdinal to Workspace, monotonic counter in TabManager

Closes #129

* Make port ordinal counter static to avoid overlap across windows

Each window creates its own TabManager, so a per-instance counter
would reset and reuse port ranges. Making it static ensures unique
ranges across all windows.

* Fix portOrdinal race: pass through Workspace init instead of setting after

The first TerminalPanel is created inside Workspace.init, so setting
portOrdinal after init returns meant the initial terminal always got
ordinal 0. Pass portOrdinal as an init parameter and set it before
the TerminalPanel is created.

* Fix P2/P3: snapshot port settings at surface creation, use window screen for sidebar cap

P2: Port base/range are now snapshotted on TerminalSurface when the
panel is created, so changing settings mid-session won't cause
inconsistent CMUX_PORT values across terminals in the same workspace.

P3: Sidebar max width now uses NSApp.keyWindow?.screen instead of
NSScreen.main, so multi-monitor setups get the correct 2/3 cap for
the display the window is actually on.

* Fix P1: snapshot port base/range once per app session, not per panel

Port base and range size are now static properties on TerminalSurface,
initialized once from UserDefaults at first access. This prevents
overlapping port ranges across workspaces when settings are changed
mid-session (e.g., workspace 1 with range=10 at 9110-9119, then
range changed to 5, workspace 2 would overlap at 9110).
2026-02-20 14:12:14 -08:00
..
Find Fix terminal keys swallowed after opening browser (#45) 2026-02-17 03:21:08 -08:00
Panels Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
Update Separate cmux NIGHTLY as standalone app with its own bundle ID (#164) 2026-02-20 03:54:07 -08:00
AppDelegate.swift Fix CJK IME input (Korean, Chinese, Japanese) (#125) 2026-02-19 22:37:41 -08:00
Backport.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
cmuxApp.swift Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
ContentView.swift Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
GhosttyConfig.swift Fix theme initialization to respect configured/system appearance (#161) 2026-02-20 04:51:01 -08:00
GhosttyTerminalView.swift Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
KeyboardShortcutSettings.swift Fix terminal keys swallowed after opening browser (#45) 2026-02-17 03:21:08 -08:00
NotificationsPage.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
PortScanner.swift Move port scanning from shell to app-side with batching (#100) 2026-02-19 01:04:47 -08:00
PostHogAnalytics.swift Add sidebar metadata (git branch, ports, logs, progress), fix localhost URL resolution, simplify analytics 2026-02-16 02:46:39 -08:00
SidebarSelectionState.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
SocketControlSettings.swift Fix migrateMode dropping allowAll to default cmuxOnly 2026-02-18 02:12:19 -08:00
TabManager.swift Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
TerminalController.swift Fix split blackout race and stabilize focus handoff 2026-02-19 17:10:27 -08:00
TerminalNotificationStore.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
TerminalView.swift Add sidebar blur effect with withinWindow blending (#9) 2026-02-04 03:04:45 -08:00
TerminalWindowPortal.swift works 2026-02-19 23:52:09 -08:00
UITestRecorder.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
WindowAccessor.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
WindowDecorationsController.swift Refine settings/about titlebar styling and controls alignment 2026-02-14 02:11:35 -08:00
WindowDragHandleView.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
WindowToolbarController.swift move update pill to sidebar only, add Install Update menu item 2026-02-15 21:17:33 -08:00
Workspace.swift Sidebar ports on own line, wider sidebar, CMUX_PORT env vars (#160) 2026-02-20 14:12:14 -08:00
WorkspaceContentView.swift Fix theme initialization to respect configured/system appearance (#161) 2026-02-20 04:51:01 -08:00