Commit graph

535 commits

Author SHA1 Message Date
Lawrence Chen
49e93e4b4c
Add command palette entries to install/uninstall cmux CLI in PATH (#626)
Adds CmuxCLIPathInstaller with symlink management at /usr/local/bin/cmux,
exposed via Cmd+Shift+P command palette (VS Code style). Install entry
shown when CLI is not in PATH, uninstall entry shown when it is.
Falls back to osascript admin privilege escalation when /usr/local/bin
is not user-writable. Uses attributesOfItem instead of fileExists to
correctly handle dangling symlinks from relocated app bundles.

Closes https://github.com/manaflow-ai/cmux/issues/618
2026-02-27 01:53:13 -08:00
Lawrence Chen
978341b228
Add zoom/maximize focused pane in splits (#634)
Cmd+Shift+Enter toggles zoom on the focused pane, expanding it to fill
the workspace. Splitting or creating new tabs auto-unzooms. Zoom state
shown as icon in sidebar tab. Includes bonsplit zoom toggle support.

Closes https://github.com/manaflow-ai/cmux/issues/136
2026-02-27 01:50:56 -08:00
Lawrence Chen
dca8992901
Fix use-after-free in ghostty_surface_refresh after sleep/wake (#432) (#619)
Add nil guard in forceRefresh() to prevent dereferencing freed surface
pointer. Split else-if chains in Workspace.swift so
requestBackgroundSurfaceStartIfNeeded() runs if surface is freed during
the refresh call. Add regression test exercising the crash path.
2026-02-27 01:44:02 -08:00
Lawrence Chen
9ae737026d
Fix browser eval: await promises, always-on console hooks, undefined detection (#613)
- Wrap eval scripts in async IIFE that detects and awaits thenables,
  using callAsyncJavaScript when available (macOS 11+) (#603)
- Register console/error telemetry hooks as WKUserScript at document
  start so they survive navigation and are active before page JS (#604)
- Return typed envelope {__cmux_t, __cmux_v} from eval to distinguish
  undefined from no return value; CLI prints "undefined" (#605)
- Keep dialog hooks as lazy injection only (not document-start) to
  avoid suppressing WKUIDelegate native dialogs
- Add regression tests for async wrapper and undefined CLI rendering
2026-02-27 01:42:27 -08:00
Lawrence Chen
2202044af4
Fix drag-handle crash on launch from stale foreign-window events (#490) (#620)
Add window-identity check to windowDragHandleShouldCaptureHit so stale
leftMouseDown events from other apps (Finder, Dock) during launch don't
trigger the SwiftUI hierarchy walk while initial layout is mutating.
Add NSLock to breadcrumb limiter for thread safety. Update existing
tests to pass eventWindow for window-attached drag handles.
2026-02-27 01:42:17 -08:00
Lawrence Chen
c70ac25eef
Sort TerminalDirectoryOpenTarget enum cases alphabetically (#628)
All four switch statements (case list, commandPaletteTitle,
commandPaletteKeywords, applicationBundlePathCandidates) are now
in consistent alphabetical order.
2026-02-27 01:18:52 -08:00
Lawrence Chen
e14c5a383f
Add Tower to command palette Open Directory targets (#627) 2026-02-27 00:42:42 -08:00
Lawrence Chen
24bc23630a
Disable Sentry sendDefaultPii to match anonymous telemetry label (#623)
sendDefaultPii=true auto-collects usernames, emails, and IPs, which
contradicts the "Send anonymous telemetry" setting label. Set to false.
2026-02-26 23:53:11 -08:00
Lawrence Chen
e20d692094
Remove duplicate telemetry assignment in resetAllSettings (#611) 2026-02-26 22:14:17 -08:00
Austin Wang
a326514bf6
Fix frozen blank launch state caused by session restore race condition (#399) (#565)
The app sometimes launched to a frozen blank state with an empty sidebar
and no terminal loaded. This was caused by restoreSessionSnapshot emitting
intermediate @Published states (empty tabs, nil selectedTabId) that left
SwiftUI's mountedWorkspaceIds empty.

Two fixes:
1. Make restoreSessionSnapshot atomic: build the new tab list locally
   before assigning to @Published properties in a single batch, so
   SwiftUI observers never see an intermediate empty state.
2. Add a startup recovery timer that detects and fixes broken state
   (empty tabs, invalid selection, unmounted workspaces) 500ms after
   the view appears, with Sentry breadcrumbs for diagnostics.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:10:21 -08:00
Lawrence Chen
fa6a18c753
Add telemetry opt-out setting (#610)
Adds a "Send anonymous telemetry" toggle in Settings that lets users
disable Sentry crash reporting and PostHog analytics. The setting is
frozen at launch so toggling mid-session shows a restart hint. The hint
correctly clears if the user toggles back to the launch-time value.
2026-02-26 22:02:29 -08:00
Lawrence Chen
6f459918c5
Add throttled breadcrumbs for drag-handle hit-test anomalies (#527) 2026-02-26 20:37:50 -08:00
Lawrence Chen
e74012a728
Add cmux tree command for full hierarchy view (#592)
Adds `cmux tree` that prints the window > workspace > pane > surface
hierarchy with box-drawing characters. Includes server-side system.tree
RPC for single-round-trip performance.

Features:
- --all flag for all windows (default: current window only)
- --workspace flag to filter to a single workspace
- --json for structured JSON output
- Active path markers (◀ active) and caller identification (◀ here)
- Browser surfaces show their current URL

Closes https://github.com/manaflow-ai/cmux/issues/586
2026-02-26 20:04:09 -08:00
ALPER
4cb278c854
Fix interaction crash in titlebar drag hit-testing (#600) 2026-02-26 20:02:53 -08:00
Travis Carr
570ed27b5d
Add Kagi as a search provider option (#561)
Co-authored-by: Travis Carr <tcarr@nvidia.com>
2026-02-26 16:23:10 -08:00
Austin Wang
c51171294e
Merge pull request #590 from manaflow-ai/fix/issue-582-sidebar-branch-refresh
fix: keep sidebar git branch updates responsive after sleep/wake
2026-02-26 15:27:21 -08:00
austinpower1258
6b85265255 fix: avoid blocking git branch socket updates on main thread 2026-02-26 15:21:27 -08:00
Lawrence Chen
847ce008ed
Restore lazy keychain reads for socket password (#589)
Add a cached lazy keychain fallback to SocketControlPasswordStore so
that authentication paths in TerminalController can transparently read
a legacy keychain password without blocking on every request. The
keychain is read at most once and the result is cached behind an
NSLock. File-based and environment passwords still take priority.

Closes https://github.com/manaflow-ai/cmux/issues/579
2026-02-26 15:16:27 -08:00
Austin Wang
df119c75d5
Merge pull request #588 from manaflow-ai/fix-issue-572
Fix selected workspace status color contrast
2026-02-26 15:14:49 -08:00
austinpower1258
cdad265f1d Fix selected-workspace status contrast 2026-02-26 15:12:10 -08:00
Austin Wang
0c5ffd7f5a
Merge pull request #567 from manaflow-ai/fix/issue-490-launch-crash-drag-handle
Fix crash on launch: exclusive access violation in drag handle hit test
2026-02-26 15:06:37 -08:00
Austin Wang
c537c845f7
Merge pull request #566 from manaflow-ai/fix/issue-432-surface-refresh-crash-after-wake
Fix use-after-free crash in ghostty_surface_refresh after wake
2026-02-26 14:35:44 -08:00
Lawrence Chen
163f8572e4
Replace keychain password storage with file-based storage (#576)
Moves socket control password from the macOS login keychain to a
plain file at ~/Library/Application Support/cmux/socket-control-password.
This eliminates the system keychain prompt that interrupts users on
first launch or after keychain changes.

- Directory created with 0700, file written with 0600 permissions
- One-time migration copies existing keychain password to the file,
  deletes the keychain entry, and records a migration version in
  UserDefaults so it runs only once
- CLI SocketPasswordResolver also reads from the file path
- Security framework import is now conditional (#if canImport)
- Adds SocketControlPasswordStoreTests covering round-trip, env
  priority, path resolution, and migration behavior

Fixes https://github.com/manaflow-ai/cmux/issues/541
2026-02-26 14:29:12 -08:00
Lawrence Chen
780f959a48
Fix equalize splits to recursively set all dividers to 0.5 (#575)
The equalize splits command was a no-op that always returned false.
Implement it by recursively walking the bonsplit tree and setting
every split divider position to 0.5. Also register the command in
the command palette with a "workspace has splits" precondition so
it only appears when there are multiple panes.

Adds a regression test that creates a nested split layout, skews
divider positions, equalizes, and verifies all dividers are at 0.5.

Fixes https://github.com/manaflow-ai/cmux/issues/571
2026-02-26 14:27:18 -08:00
Lawrence Chen
b1846aaec4
Fix notification bell hover crash by conditionally tracking hover (#574)
Only enable .onHover tracking on TitlebarControlButton when the style
uses hoverBackground (e.g. pillGroup). Styles without a visible hover
background no longer install the tracking area, preventing the crash
on notification-bell hover.

Also switches the notifications anchor from .overlay to .background so
AppKit hit-testing no longer conflicts with the popover anchor view.

Includes regression test for the hover-tracking policy.

Fixes https://github.com/manaflow-ai/cmux/issues/537
2026-02-26 14:26:28 -08:00
austinpower1258
1217ba3295 Fix crash on launch: exclusive access violation in drag handle hit test (#490)
During app launch, mouseMoved events can trigger hitTest on the drag
handle while SwiftUI is still modifying view state in a layout pass.
The previous blacklist approach (only deferring mouseMoved, cursorUpdate,
nil) let unexpected event types slip through — e.g. activation events
where NSApp.currentEvent is not the mouseMoved being routed — causing
contentView.hitTest() to re-enter SwiftUI views and trigger an exclusive
access violation.

Switch to a whitelist: only leftMouseDown (the sole event the drag
handle actually handles) proceeds with the full view-hierarchy walk.
All other event types bail out immediately. The deferred-event check
runs after suppression recovery (which uses only ObjC associated-object
calls, safe from Swift exclusivity) so stale suppression is still
cleared on passive events, but before the view-hierarchy walk that
triggered the crash.

Fixes #490

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:04:46 -08:00
austinpower1258
501e893fba Fix use-after-free in ghostty_surface_refresh after wake (#432)
Prevent crash (KERN_INVALID_ADDRESS at ghostty_surface_refresh) during
geometry reconcile after wake-from-sleep by adding proper lifetime
guards for freed surfaces:

- Re-read self.surface before each ghostty C call in forceRefresh()
  instead of using a stale captured local that can outlive the surface
- Nil out self.surface in deinit before scheduling the async free Task,
  so in-flight closures see nil and bail out
- Re-check surface validity in reconcileTerminalGeometryPass() after
  reconcileGeometryNow() which can trigger AppKit layout that frees
  surfaces

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:28:24 -08:00
Lawrence Chen
fab2b8611d
Switch fullscreen shortcut to Cmd+Ctrl+F (#530) 2026-02-25 19:42:21 -08:00
Lawrence Chen
f502e6afc9
Honor focus-follows-mouse on terminal hover (#519) 2026-02-25 18:43:41 -08:00
Lawrence Chen
58af38a28d
Add cmux_hourly_active event for hourly retention cohorts (#514)
cmux_daily_active deduplicates by UTC date, so PostHog hourly retention
cohorts show 0s. Add a companion cmux_hourly_active event that fires at
most once per UTC hour, deduped via UserDefaults. No flush() after
hourly events (let them batch). The existing 30-minute timer provides
adequate hour-boundary coverage without changes.
2026-02-25 18:33:57 -08:00
Lawrence Chen
ede4e2fc99 Add Cmd+Enter shortcut to toggle fullscreen 2026-02-25 18:26:29 -08:00
Austin Wang
d517be8ddd
Merge pull request #512 from manaflow-ai/fix/issue-483-terminal-portal-recovery
Fix terminal panes going blank after repeated tab drag/reorder
2026-02-25 18:12:39 -08:00
Lawrence Chen
f38bc3b775
Move LaunchServices bundle registration off main thread (#513)
Fixes CMUXTERM-MACOS-DS
2026-02-25 18:02:00 -08:00
Lawrence Chen
930a6b5bc9
Use sheet modal for insecure HTTP warning prompt (#511)
Fixes CMUXTERM-MACOS-DD
2026-02-25 18:00:45 -08:00
austinpower1258
de8c5120fa Fix terminal pane render loss during tab drag reorder 2026-02-25 17:54:28 -08:00
Austin Wang
501bb43d04
Merge pull request #496 from manaflow-ai/cmux/branch-inactive-computer-issue
Fix sidebar git branch updates after sleep/wake
2026-02-25 17:21:48 -08:00
Austin Wang
93a9e1a3b6
Merge pull request #495 from manaflow-ai/cmux/fix-chinese-ime-active
Allow Cmd shortcuts during IME composition
2026-02-25 17:21:08 -08:00
Lawrence Chen
c3c89a80b9 Treat nil drag-handle hit-test events as passive
Refs CMUXTERM-MACOS-AF

Refs CMUXTERM-MACOS-A8
2026-02-25 17:13:56 -08:00
Lawrence Chen
f82dfa34e9 Avoid drag-handle key exclusivity conflicts
Fixes CMUXTERM-MACOS-CV
2026-02-25 16:56:54 -08:00
Lawrence Chen
47056f4074 Throttle titlebar accessory sizing churn
Fixes CMUXTERM-MACOS-F1
2026-02-25 16:47:38 -08:00
Lawrence Chen
4fe6006007 Cache sidebar drop UTTypes and hint width metrics
Fixes CMUXTERM-MACOS-GA

Fixes CMUXTERM-MACOS-JG
2026-02-25 16:39:09 -08:00
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
0483526c39
Merge pull request #502 from manaflow-ai/cmux/crash-issues
Crash requests
2026-02-25 16:18:05 -08:00
Lawrence Chen
baee7c6e85 Harden Sentry crash guards and reduce noisy events 2026-02-25 16:13:31 -08:00
austinpower1258
e8d0fd68ba ok 2026-02-25 16:10:58 -08:00
Lawrence Chen
8956d1ee7e reuse portal installation target during anchor synchronizes 2026-02-25 16:06:41 -08:00
Lawrence Chen
9140371fcd guard devtools restore from unsafe first-responder churn 2026-02-25 15:59:49 -08:00
Lawrence Chen
7b7745caa0 avoid command palette overlay subview scans on each update 2026-02-25 15:49:25 -08:00
austinpower1258
213bda5e14 Fix sidebar git branch recovery after sleep/wake (#494) 2026-02-25 15:36:51 -08:00
austinpower1258
516ace4feb Allow Cmd shortcuts during IME composition
Cmd-based keyboard shortcuts (Cmd+T, Cmd+Shift+L, etc.) were blocked
while an IME had active composition (marked text), affecting Chinese
Pinyin, Japanese, Korean, and all other input methods. Since Cmd is a
system modifier never consumed by IME input sequences, exempt
Cmd-modified events from the three IME bypass points in the key event
chain.

Fixes #440

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:34:26 -08:00