Commit graph

54 commits

Author SHA1 Message Date
Lawrence Chen
bcd024d8f8 Keep focus on destination after cross-window surface move 2026-02-24 14:35:09 -08:00
Lawrence Chen
58376c3fbc Handle moving the last surface out of a window 2026-02-24 14:35:09 -08:00
Lawrence Chen
ce681bac67 Implement cross-window tab and workspace move UI 2026-02-24 14:35:09 -08:00
Lawrence Chen
06cd25ed52 Fix session restore routing and browser history persistence 2026-02-24 14:34:55 -08:00
Lawrence Chen
78d1a43733 Persist workspace tab colors across session restore 2026-02-23 19:27:32 -08:00
Lawrence Chen
6eeca9c5da Merge remote-tracking branch 'origin/main' into pr-317-session-persistence
# Conflicts:
#	Sources/AppDelegate.swift
#	Sources/cmuxApp.swift
2026-02-23 14:58:16 -08:00
Austin Wang
6598a38fe3
Fix terminal zoom inheritance for new splits/surfaces/workspaces (#384)
* Fix terminal Cmd zoom routing for Ghostty focus descendants (#383)

* Inherit new terminal zoom from last terminal context

Prefer pane-selected terminal as Ghostty config inheritance source when creating splits/new terminals, then focused/fallback terminals. This preserves runtime zoom/font size when opening the next terminal.

* Fix terminal zoom inheritance across split/tab/workspace creation
2026-02-23 11:26:11 -08:00
Lawrence Chen
4fb5da373d
Merge pull request #345 from manaflow-ai/feat-theme-switch-frame-sync
Keep chrome/theme updates in lockstep on theme switch
2026-02-23 02:46:08 -08:00
Lawrence Chen
eb1f0bdd43 Unify theme refresh path across workspace and titlebar 2026-02-23 02:44:28 -08:00
Lawrence Chen
a3f3e20d72 Unify Cmd+Shift+H flash path across panel types 2026-02-23 02:31:22 -08:00
Lawrence Chen
8f68ddb947 Add filesystem logs for theme resolution flow 2026-02-23 00:14:10 -08:00
Lawrence Chen
e90b45f75e Match bonsplit chrome to Ghostty theme 2026-02-22 23:48:13 -08:00
Lawrence Chen
0e2ac79e06
Merge pull request #340 from manaflow-ai/feat-bonsplit-border-colors
Match bonsplit split/tab borders and remove active-tab bottom line
2026-02-22 20:13:12 -08:00
Lawrence Chen
d31cbb7123 Use gray separator borders and drop active-tab bottom border 2026-02-22 20:01:37 -08:00
Lawrence Chen
283b898307 Match bonsplit border styling to Ghostty split divider color 2026-02-22 19:57:46 -08:00
Lawrence Chen
6f44f17f33 Fix follow-up PR331 settings and split focus regressions 2026-02-22 19:55:06 -08:00
Lawrence Chen
0dbe95b797 Reassert non-focus split focus after delayed callbacks 2026-02-22 19:04:57 -08:00
Lawrence Chen
4ee6640e35 Preserve terminal focus for non-focus split opens 2026-02-22 18:50:01 -08:00
Lawrence Chen
0105b6256a
Add workspace tab color schemes and debug scheme toggle (#324)
* Add tab color feature to sidebar workspaces

Lets users assign a custom background color to any sidebar workspace tab
via a right-click "Tab Color" submenu. The primary motivation is working
across multiple projects simultaneously — coloring tabs by project makes
it instant to visually locate the right workspace without reading the title.

- Workspace: adds `customColor: String?` (@Published hex string) and
  `setCustomColor()` setter
- TabManager: adds `setTabColor(tabId:color:)` convenience method
- ContentView: 16-color dark palette (all luminance < 0.30, white text
  always readable), `Color(hex:)` extension, `coloredCircleImage(hex:)`
  helper to render bitmapped NSImage circles (needed because macOS menus
  strip SwiftUI foregroundColor from SF Symbols), updated `backgroundColor`
  to use custom color at full/70%/35% opacity for active/inactive/
  multi-selected states, "Tab Color" submenu in context menu with
  "Clear Color" option, and a 1.5pt `Color.primary` border overlay on
  the active tab for clear selection indication when custom colors are set

* Add workspace tab color schemes with settings and debug toggles

* Remove Kelly scheme and keep only original tab color palette

* Preserve neutral grayscale when brightening tab colors

* Harden UpdatePill UI test polling timeouts

---------

Co-authored-by: Andreas Fruth <andreas.fruth@gmail.com>
2026-02-22 17:30:30 -08:00
Lawrence Chen
927b0eb2d1 Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
Austin Wang
740b4b11e5
Deduplicate branch context lines by directory (#288) 2026-02-21 17:45:52 -08:00
Austin Wang
fb2ae855db
Light mode (#258) 2026-02-21 15:39:25 -08:00
Lawrence Chen
a1e05fab84 Improve CLI workspace command responsiveness 2026-02-21 04:37:32 -08:00
Lawrence Chen
1dcb11fc54 Handle unknown Bonsplit tab context actions 2026-02-21 03:11:40 -08:00
Lawrence Chen
e9f25ef67f Merge origin/main and resolve reopen-focus conflicts 2026-02-21 03:08:14 -08:00
Lawrence Chen
4cbdd999d8 Socket CLI: prevent focus stealing + add rename-tab and focus regressions 2026-02-21 02:21:27 -08:00
Lawrence Chen
e74f67d369 Merge remote-tracking branch 'origin/main' into issue-230-cli-unix-socket-lag
# Conflicts:
#	Sources/TerminalController.swift
2026-02-21 01:39:04 -08:00
Lawrence Chen
a2c39802d1 Merge origin/main into feat-sidebar-branch-refresh-on-close 2026-02-20 23:36:11 -08:00
Lawrence Chen
68cf29cd2d Deduplicate high-frequency socket metadata updates 2026-02-20 23:30:59 -08:00
Lawrence Chen
ede5b701bb
Fix Mark Tab as Unread no-op on focused tab (#249)
* Fix manual unread clear race on focused tab

* Add mark-as-read tab action and show ring for manual unread

* Flash then clear manual unread on tab focus
2026-02-20 23:07:52 -08:00
Lawrence Chen
12374c4a76
Add Cmd+Shift+T reopen for closed browser panels (#253)
Implements browser-only recently-closed restore stack with capped LIFO behavior and split-placement fallback.

Issue: https://github.com/manaflow-ai/cmux/issues/244
2026-02-20 23:06:49 -08:00
Lawrence Chen
b3c28a8723 Render vertical sidebar rows as branch and directory 2026-02-20 22:31:17 -08:00
Lawrence Chen
e9da15d563 Clean up panel branch state when closing a pane 2026-02-20 22:15:17 -08:00
Lawrence Chen
c533ebe5e5 Render sidebar branches in split/tab display order 2026-02-20 21:59:35 -08:00
Lawrence Chen
60e7aeeb16 Fix stale sidebar git branch after split close 2026-02-20 21:47:06 -08:00
Austin Wang
95ac588bb2
Fix browser download UX and stabilize browser crash path (#235)
* Fix browser download UX and stabilize download crash path

* Fix context menu image/link download target resolution

* Restore native WebKit context-menu download actions

* Improve browser download feedback and context menu downloads

* Fix flaky alternating context-menu downloads

* Stabilize linked-file context downloads

* Use per-menu-item fallback for context downloads

* Harden linked-file URL resolution for context downloads
2026-02-20 21:21:03 -08:00
Lawrence Chen
5c0c2d9bf9 Merge origin/main and keep TabManager title updates synchronous 2026-02-20 20:29:47 -08:00
Lawrence Chen
d1524c347c Merge origin/main into issue-230-main-thread-notification-cascade 2026-02-20 20:18:02 -08:00
Lawrence Chen
641124c084 Coalesce title notification updates to reduce main-thread hangs 2026-02-20 20:14:19 -08:00
Lawrence Chen
48685f2dcb Allow clearing custom tab names from tab menu 2026-02-20 20:13:36 -08:00
Lawrence Chen
dc2b3e506b Implement horizontal tab context menu actions 2026-02-20 20:13:36 -08:00
Lawrence Chen
a5c7600458 Harden drag overlay routing and add terminal overlay regression probes 2026-02-20 19:58:58 -08:00
Lawrence Chen
c9cafc0806 Merge origin/main into issue-180-http-nonsecure-hosts 2026-02-20 15:27:59 -08:00
Lawrence Chen
df9ba6dcd9
Fix #155: remap-aware bonsplit tooltips + browser split shortcuts (#200)
* Issue #155: remap bonsplit tooltips and add browser split shortcuts

* Fix split button mousedown feedback regression

* Match split button sizing with main
2026-02-20 15:17:00 -08:00
Lawrence Chen
3ffceb7e8e Fix insecure HTTP proceed to be one-time unless saved 2026-02-20 15:16:12 -08:00
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
Lawrence Chen
7b2675cd1e
Fix theme initialization to respect configured/system appearance (#161)
* Respect configured appearance before Ghostty initialization

* Apply Ghostty theme colors to cmux titlebar and tab chrome

* Fix builtin theme resolution and tab strip icon contrast

* Alias builtin Solarized names to current Ghostty themes

* Sync tab chrome with active Ghostty theme

* Fix system appearance theme switching for surfaces

* Refresh titlebar on background theme updates

* Refresh split overlay config on appearance change

* Update bonsplit for chrome color review fixes
2026-02-20 04:51:01 -08:00
austinpower1258
b739e918c9 works 2026-02-19 23:52:09 -08:00
Lawrence Chen
de666ff05b Fix split blackout race and stabilize focus handoff 2026-02-19 17:10:27 -08:00
Lawrence Chen
9642bb59fc
Move port scanning from shell to app-side with batching (#100)
* Move port scanning from shell to app-side with batching

Replace per-shell `ps -axo + lsof` scanning with a centralized
PortScanner singleton in the app. Each shell now sends lightweight
`report_tty` (once per session) and `ports_kick` (on preexec/precmd)
socket messages. The app coalesces kicks across all panels and runs a
single `ps -t <ttys> + lsof -p <pids>` covering every active panel.

Also fixes a macOS 26 Tahoe regression where `getsockopt(LOCAL_PEERPID)`
returns ENOTCONN on accepted sockets when the peer disconnects before
the handler thread starts. This was silently breaking ALL socket
commands sent via ncat --send-only. The fix captures the peer PID in
the accept loop immediately after accept(), and falls back to
LOCAL_PEERCRED (uid check) when the PID lookup fails.

* Fix PR review feedback: burst timing and auth comment clarity

- P2: burstDelays were accumulating (0.5+1.5+3+... = ~22.5s) instead of
  firing at absolute offsets from burst start. Now uses burstStart anchor
  so scans fire at 0.5s, 1.5s, 3s, 5s, 7.5s, 10s as intended.

- P1: Clarify LOCAL_PEERCRED fallback rationale — same security boundary
  as socket file permissions (0600), does not widen attack surface.
  Long-lived connections still get full descendant check via LOCAL_PEERPID.
2026-02-19 01:04:47 -08:00