Commit graph

82 commits

Author SHA1 Message Date
Lawrence Chen
381b0c1323 Reduce unchanged autosave snapshot churn
Fixes CMUXTERM-MACOS-RF

Fixes CMUXTERM-MACOS-H4
2026-02-25 16:28:09 -08:00
Lawrence Chen
62fffc7221 Use command palette flow for workspace rename shortcut 2026-02-25 05:12:49 -08:00
Lawrence Chen
eaabaad3d3
Add Cmd+Option+W to close other pane tabs with confirmation (#475)
* Add Cmd+Option+W close-other-tabs confirmation

* Match close-other-tabs shortcut to Cmd+Option+T
2026-02-25 03:54:51 -08:00
Austin Wang
3cf1d2501f
Merge pull request #465 from manaflow-ai/cmux/terminal-persist-issue
Fix Cmd+W close for terminal+browser split (issue #464)
2026-02-24 21:59:37 -08:00
austinpower1258
17d8956789 Fix Cmd+W terminal close in terminal+browser split 2026-02-24 21:54:25 -08:00
Lawrence Chen
b84c0539c9 browser: reuse top-right pane for sidebar PR opens 2026-02-24 21:36:10 -08:00
Lawrence Chen
afeec2d324 sidebar: open PR links in right split for target workspace 2026-02-24 21:14:57 -08:00
Lawrence Chen
7ee3831eb5
Merge pull request #317 from manaflow-ai/issue-143-session-persistence
Implement session persistence pass 1 (windows/workspaces/scrollback)
2026-02-24 15:25:46 -08:00
Lawrence Chen
afbfb5a117 Use native WebKit middle-click handling for browser links (#416)
* Add middle-click debug logging for browser links

* Handle browser middle-click via native WebKit actions

* Fix flaky middle-click new-tab detection in browser
2026-02-24 14:35:10 -08:00
Lawrence Chen
b059d0721c Reassert destination focus after cross-window tab moves 2026-02-24 14:35:09 -08:00
Amar Sood (tekacs)
c74479d0b4 Fix window title updates applying to wrong window
TabManager.updateWindowTitle() used NSApp.keyWindow to find the target
window, meaning any terminal title change (e.g. a spinner) would update
whichever window happened to be focused, not the window that owns that
TabManager. This corrupted the macOS Accessibility title attribute and
caused visible title flapping in multi-window setups.

Add a weak back-reference from TabManager to its owning NSWindow, set
by AppDelegate.registerMainWindow(), and use it instead of keyWindow.
2026-02-24 14:35:09 -08:00
Lawrence Chen
aa222dbc0d Sidebar double-click appends workspace to end 2026-02-24 14:32:56 -08:00
Lawrence Chen
0516bcb877 Merge remote-tracking branch 'origin/main' into pr-425 2026-02-24 13:58:32 -08:00
Lawrence Chen
1893fc4c7a
Use native WebKit middle-click handling for browser links (#416)
* Add middle-click debug logging for browser links

* Handle browser middle-click via native WebKit actions

* Fix flaky middle-click new-tab detection in browser
2026-02-23 23:09:36 -08:00
Amar Sood (tekacs)
3d592fb09a Fix window title updates applying to wrong window
TabManager.updateWindowTitle() used NSApp.keyWindow to find the target
window, meaning any terminal title change (e.g. a spinner) would update
whichever window happened to be focused, not the window that owns that
TabManager. This corrupted the macOS Accessibility title attribute and
caused visible title flapping in multi-window setups.

Add a weak back-reference from TabManager to its owning NSWindow, set
by AppDelegate.registerMainWindow(), and use it instead of keyWindow.
2026-02-23 23:47:25 -05:00
Lawrence Chen
5c65e25b66 Reassert destination focus after cross-window tab moves 2026-02-23 19:50:09 -08:00
Lawrence Chen
ea33e3adbd Merge remote-tracking branch 'origin/main' into pr-317-session-persistence
# Conflicts:
#	Sources/AppDelegate.swift
2026-02-23 19:20:56 -08:00
Lawrence Chen
53ef6a5f7d
Upgrade Sentry: tracing, breadcrumbs, dSYM upload (#366)
* Upgrade Sentry: tracing, breadcrumbs, dSYM upload

- Enhanced Sentry SDK init with performance tracing (10% sample),
  explicit app hang timeout, stack trace attachment, and HTTP
  failure capture
- Added breadcrumbs for key user actions: workspace switch/create/close,
  split creation, command palette open/close, app focus — these give
  context to hang/crash reports
- Added dSYM upload step to nightly and release CI workflows so hang
  stacks are fully symbolicated (requires SENTRY_AUTH_TOKEN secret)
- Created SentryHelper.swift with lightweight breadcrumb helper

Closes https://github.com/manaflow-ai/cmux/issues/365

* Remove command palette breadcrumbs

Not useful for hang diagnosis — keep only workspace/tab/split/focus
breadcrumbs that correlate with heavy operations.
2026-02-23 17:11:01 -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
Austin Wang
3c1f1792c0
Fix browser workspace focus handoff lag (#381) 2026-02-23 10:27:04 -08:00
Lawrence Chen
5070b137a4
Fix early Cmd+D then Ctrl+D split startup hang (#364)
* Harden early Ctrl+D child-exit callback routing

* Add Ctrl+D close-path tracing and suppress tiny-frame focus churn

* Suppress hidden-surface onFocus callbacks during portal churn
2026-02-23 05:19:58 -08:00
Lawrence Chen
7b9f247aa8
Merge pull request #356 from manaflow-ai/task-close-right-split-before-shell-start-hang
Fix early split close hang on Ctrl+Shift+D
2026-02-23 03:30:02 -08:00
Lawrence Chen
5d63c5f035
Add command palette (Cmd+Shift+P) (#358)
Implements a VS Code-style command palette with fuzzy search,
workspace/surface switching, rename mode, and keyboard navigation.

Closes https://github.com/manaflow-ai/cmux/issues/133
2026-02-23 03:26:36 -08:00
Lawrence Chen
9ed3744485 Align startup split regression with Ctrl+D 2026-02-23 03:15:31 -08:00
Lawrence Chen
cb0efa3edd Fix early split child-exit close race 2026-02-23 02:59:59 -08:00
Lawrence Chen
8c149428c3
Set default workspace indicator style to left rail (#332) 2026-02-22 18:25:07 -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
Lawrence Chen
63d3fc5949
Handle child-exit close for last-terminal workspaces (#254) 2026-02-21 04:31:23 -08:00
Lawrence Chen
55c7420b34 Harden Cmd+Shift+T focus against deferred stale callbacks 2026-02-21 03:19:43 -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
a2c39802d1 Merge origin/main into feat-sidebar-branch-refresh-on-close 2026-02-20 23:36:11 -08:00
Lawrence Chen
29167195fa Fix browser reopen focus across workspace switches 2026-02-20 23:14:31 -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
5ca1616bd2 Add vertical sidebar branch layout setting 2026-02-20 22:26:10 -08:00
Lawrence Chen
5c0c2d9bf9 Merge origin/main and keep TabManager title updates synchronous 2026-02-20 20:29:47 -08:00
Lawrence Chen
641124c084 Coalesce title notification updates to reduce main-thread hangs 2026-02-20 20:14:19 -08:00
Lawrence Chen
a7363a5702 Merge remote-tracking branch 'origin/main' into fix/browser-devtools-shortcuts-pr
# Conflicts:
#	cmuxTests/CmuxWebViewKeyEquivalentTests.swift
2026-02-20 16:41:08 -08:00
Austin Wang
1f3f366294
Fix #205: Add setting to disable workspace auto-reorder on notification (#215)
* chore(claude-opus-4-6): From HN feedback: https://news.ycombinator.com/item?id=47...

* Centralize workspace auto-reorder into addNotification

Move moveTabToTop into TerminalNotificationStore.addNotification so all
notification paths (Ghostty actions, v2 API, control socket) respect the
reorder-on-notification setting, not just the two Ghostty action sites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:55:31 -08:00
Lawrence Chen
438b7a6a41 Merge remote-tracking branch 'origin/main' into fix/browser-devtools-shortcuts-pr
# Conflicts:
#	Sources/Panels/BrowserPanel.swift
#	Sources/cmuxApp.swift
#	cmuxTests/CmuxWebViewKeyEquivalentTests.swift
#	vendor/bonsplit
2026-02-20 15:48:27 -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
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
5b2be45f3a
Fix browser panel mouse back/forward buttons and middle-click (#131) (#139)
Handle multi-button mouse events in the browser panel's WKWebView:

- Mouse back button (button 3) triggers goBack(), forward button
  (button 4) triggers goForward(), enabling side-button navigation
  on mice like Logitech
- Middle-click (button 2) on a link opens it in a new browser tab
  by hit-testing the click position via JavaScript and routing through
  the existing openLinkInNewTab mechanism
2026-02-19 23:38:21 -08:00
Lawrence Chen
743cfcdc6d Fix browser devtools persistence and Safari shortcut wiring 2026-02-19 20:21:01 -08:00
Lawrence Chen
cd0b8da82b Fix split-close stale-frame stretch and add regression coverage 2026-02-19 04:15:50 -08:00
Lawrence Chen
7aa80b9cdc Stabilize rapid workspace switching handoff 2026-02-18 21:17:53 -08:00
Lawrence Chen
c2fdd48290
Release v1.36.0 (#47)
* Fix multi-workspace drag/drop, WebView click focus, and add regression tests

- Wire bonsplit isInteractive to workspace active state so inactive
  workspace NSViews are hidden from AppKit event routing
- Add CmuxWebView.mouseDown notification for browser panel focus
  tracking (AppKit delivers clicks to WKWebView, not SwiftUI overlays)
- Add multi-workspace focus regression test covering isHidden fix,
  rapid workspace switching, and browser panel focus routing

* Bump version to 1.36.0
2026-02-17 04:04:29 -08:00
Lawrence Chen
2080a8ea5c
Release v1.29.0 (#37)
* Bump version to 1.29.0

* Include uncommitted TabManager changes needed for build
2026-02-15 18:41:13 -08:00