Commit graph

91 commits

Author SHA1 Message Date
Lawrence Chen
2877531ea2
Auto-focus omnibar when focusing blank browser surfaces (#448)
* Auto-focus omnibar when focusing blank browser surfaces

* Fix browser omnibar autofocus across pane and palette paths

* Fix Cmd+P switcher omnibar autofocus timing
2026-02-24 16:00:03 -08:00
austinpower1258
d255942f92 wip 2026-02-24 14:36:13 -08:00
austinpower1258
df9f1a1e6c Remove temporary Enter tracing instrumentation 2026-02-24 14:36:13 -08:00
austinpower1258
ab1368828b Fix browser Return/Enter routing and add enter trace logs 2026-02-24 14:36:13 -08:00
Lawrence Chen
06adb6228c Add drag transfer timing logs for bonsplit tabs 2026-02-24 14:35:10 -08:00
Lawrence Chen
710ed9b068 Fix Cmd+P/Cmd+Shift+P window routing (#413)
* Fix command palette shortcuts to stay window-scoped

* Fix cross-window command palette typing focus lock
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
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
92d558cb95 Refine command palette focus restore and shortcut gating 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
06cd25ed52 Fix session restore routing and browser history persistence 2026-02-24 14:34:55 -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
396942c7e4
Merge pull request #357 from manaflow-ai/task-titlebar-folder-icon-drags-window
Fix titlebar folder icon drag hit-testing
2026-02-23 17:05:29 -08:00
Lawrence Chen
0d98db7277 Fix titlebar text dragging while preserving folder icon drag 2026-02-23 17:03:55 -08:00
Lawrence Chen
638801cce8 Merge remote-tracking branch 'origin/main' into task-white-rect-frame-cmd-d-ctrl-d
# Conflicts:
#	Sources/AppDelegate.swift
#	Sources/TerminalWindowPortal.swift
2026-02-23 16:54:42 -08:00
Lawrence Chen
41b24b7883 Guard split shortcuts during transient focus fallback 2026-02-23 16:01:35 -08:00
Lawrence Chen
e9d9c6faf5 Preserve startup window geometry when session snapshot is missing 2026-02-23 15:25:16 -08:00
Lawrence Chen
c5d20ae032
Add Cmd+P open-directory shortcuts for installed apps (#368)
* Add smart Cmd+P directory-open app shortcuts

* Fix command palette scroll snap and jank

* Fix command palette selection-follow scrolling

* Use scrollPosition for command palette list scrolling

* Remove generic IDE directory command from Cmd+P

* Increase command palette max height to 450px
2026-02-23 15:02:48 -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
65b3b570c9
Fix Caps Lock handling in browser omnibar keyboard paths (#382) 2026-02-23 10:27:13 -08:00
Lawrence Chen
2426590e91
Fix terminal focus when window loses key (#359)
* Fix terminal blur when window loses key

* Fix shortcut routing across multiple windows

* Fix shortcut window detection when identifiers change
2026-02-23 05:50:10 -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
82d2d0e474 Add command palette apply and attempt update actions 2026-02-23 04:53:25 -08:00
Lawrence Chen
8d03657c94
Command palette caret uses white tint (#361)
* Set command palette caret tint to white

* Add command palette window actions and shortcut sync
2026-02-23 04:08:01 -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
2499ba1bb2
Fix browser-surface click focus without regressing open (#355)
* Allow click-to-focus for unfocused browser surfaces

* Add browser click-focus diagnostics and guard fix

* Allow pointer-initiated browser focus through responder guard
2026-02-23 03:09:19 -08:00
Lawrence Chen
cd570dbab2 Unify runtime theme reload path and prioritize surface background updates 2026-02-23 01:03:16 -08:00
Lawrence Chen
4fd669d76e Guard NSWindow responder against unfocused webview descendants 2026-02-22 19:34: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
1bc3edf75f
Merge pull request #321 from manaflow-ai/pr-316-head
Follow-up: sync customizable workspace shortcuts across UI
2026-02-22 17:04:07 -08:00
Lawrence Chen
c51a5bf7cf
Merge pull request #316 from 0xble/feat/rename-workspace-keybind
Add keyboard shortcut to rename current workspace
2026-02-22 17:00:19 -08:00
Lawrence Chen
07796232d7 Sync customizable shortcuts across menus and tooltips 2026-02-22 16:24:43 -08:00
Lawrence Chen
927b0eb2d1 Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
Brian Le
1824d1a8f1
feat(shortcuts): add rename-workspace keybind 2026-02-22 18:38:34 -05:00
Lawrence Chen
04073f1fd8 Route terminal Cmd zoom shortcuts to Ghostty 2026-02-22 15:32:43 -08:00
Lawrence Chen
d69bd66588 Fix Cmd +/- browser zoom shortcut matching 2026-02-22 15:13:49 -08:00
Lawrence Chen
18550e5d1f Add expanded socket access modes with password auth
Implements https://github.com/manaflow-ai/cmux/issues/296 with new modes: off, cmuxOnly, automation, password, and allowAll.

Adds keychain-backed password storage, connection-level auth gates (v1 auth + v2 auth.login), settings UX with warning confirmation, CLI --password support, and regression tests.
2026-02-22 00:55:14 -08:00
Lawrence Chen
4c733d4e8e
Add Cmd+Q quit warning with suppression toggle (#295) 2026-02-21 21:53:39 -08:00
Lawrence Chen
4cbdd999d8 Socket CLI: prevent focus stealing + add rename-tab and focus regressions 2026-02-21 02:21:27 -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
7a5b67049c Fix initial window top inset on new window creation 2026-02-20 18:41:35 -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
Austin Wang
270115ccbb
Fix Cmd+Enter being routed as browser reload (#213) 2026-02-20 15:36:24 -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
153b73c952 Add earlier devtools shortcut snapshots and geometry probes 2026-02-20 01:04:16 -08:00
Lawrence Chen
db66fc4bb0 Stabilize browser portal bounds and log inspector height metrics 2026-02-19 23:19:00 -08:00
Lawrence Chen
463c6baabb
Fix CJK IME input (Korean, Chinese, Japanese) (#125)
* Fix CJK IME input not working (#118)

CJK (Korean, Japanese, Chinese) IME input was completely broken because
cmux never forwarded preedit/composition state to Ghostty's libghostty.

Root causes and fixes:

1. Missing preedit sync: Added syncPreedit() that calls
   ghostty_surface_preedit() to notify Ghostty about IME composition
   text. Called from setMarkedText, unmarkText, and after
   interpretKeyEvents in keyDown.

2. Wrong composing flag: The composing flag on key events now correctly
   accounts for when composition just ended (markedTextBefore was true
   but markedText is now empty), preventing spurious deletions when
   canceling composition.

3. Event interception during IME: Added early exits in
   performKeyEquivalent, the NSWindow swizzle, and the local event
   monitor (handleCustomShortcut) to avoid stealing key events while
   IME has active marked text.

4. IME popup positioning: firstRect(forCharacterRange:) now uses
   ghostty_surface_ime_point() for accurate cursor-relative positioning
   of the IME candidate window.

* Add regression tests for CJK IME composition (#118)

31 tests covering Korean, Japanese, and Chinese IME input scenarios:

- Korean jamo combining: ㅎ -> 하 -> 한 composition lifecycle
- Chinese pinyin: multi-letter marked text and candidate selection
- Japanese hiragana-to-kanji: romaji -> hiragana -> kanji conversion
- insertText correctly commits composed text and clears marked state
- unmarkText properly clears composition state (idempotent)
- performKeyEquivalent returns false during active composition for
  all key types (plain, shift, space, return, escape)
- Shortcut bypass: hasMarkedText gates the handleCustomShortcut bypass
- Multi-syllable sequences, backspace correction, and rapid transitions
- keyTextAccumulator lifecycle tests

Also adds #if DEBUG test accessors for keyTextAccumulator on
GhosttyNSView to enable unit testing the accumulator path.
2026-02-19 22:37:41 -08:00