Commit graph

200 commits

Author SHA1 Message Date
Lawrence Chen
dea60ea71c
Update ghostty to v1.3.0 (#1142)
* Update ghostty to v1.3.0

* Add bell handling and AppleScript support

* Add zsh shell integration handoff test

* Fix Ghostty zsh integration handoff in cmux

* Add terminal keypress notification dismissal test

* Dismiss terminal notifications on keypress

* Address PR review feedback

* Tighten notification dismissal regression test

* Pin GhosttyKit checksum for latest ghostty
2026-03-09 21:32:54 -07:00
Lawrence Chen
b3ed48191e Fix main CI failures 2026-03-09 19:11:37 -07:00
Austin Wang
b824147dcb
Fix notification ring dismissal on direct terminal clicks (#1126)
* Add regression test for terminal notification click dismissal

* Dismiss terminal notifications on direct clicks

* Add regression for focused terminal notification ring

* Keep focused terminal notifications unread until click

* Verify direct notification dismiss triggers flash

* Use focus-flash path for direct notification dismiss

* Align notification dismiss flash with ring geometry
2026-03-09 17:55:07 -07:00
Austin Wang
78b901617c
Fix browser panes reloading when switching workspaces (#1136)
* Add workspace browser portal regression test

* Preserve hidden browser portals across workspace switches
2026-03-09 17:54:32 -07:00
Austin Wang
fc8142d61d
Fix pinned workspace notification reordering (#1116)
* test: cover pinned workspace notification reorder

* fix: keep pinned workspace order on notification
2026-03-09 16:05:24 -07:00
Austin Wang
c447bee602
Fix browser pane portal anchor sizing (#1094)
* Fix browser pane webview sizing

* Guard browser portal by pane ownership

* Keep browser portal frame during transient zero geometry

* Guard portal surfaces against duplicate hosts

* Defer terminal surface reflow during tab drags

* Fix browser panel pane ID unit tests
2026-03-09 13:28:05 -07:00
Lawrence Chen
e680f1de55
Add DEBUG logging for browser omnibar/content focus handoff (#910)
* Add browser focus debug logging around omnibar/content handoff

* Avoid release-only unused-value warnings in focus debug logs

* Add omnibar focus writer trace logs

* Fix omnibar tap focus race

* Stabilize omnibar focus state transitions

* Propagate event context into responder guard

* Fix webview pointer hit testing in focus guard

* Stop omnibar reacquire on pointer blur intent

* Blur omnibar on webview click intent

* Preserve pointer intent through webview focus handoff

* Restore page input focus after omnibar escape

* Fix omnibar escape focus handoff and restore retry

* Track editable focus for omnibar restore and improve test diagnostics

* Add omnibar focus tracker telemetry to failing UI test

* Wait for page readiness before seeding focused input in UI test setup

* Strengthen omnibar escape focus regression with post-click assertion

* Use deterministic window offsets for post-escape web input click test

* Always enforce webview responder on omnibar escape

* Harden omnibar focus restore and address PR review feedback

---------

Co-authored-by: tiffanysun1 <tiffanysun8@gmail.com>
2026-03-07 03:05:13 -08:00
Lawrence Chen
e7c3961489
Revert "Add workspace pages in the titlebar (#1030)" (#1040)
This reverts commit 4de975e6a4.
2026-03-07 00:05:58 -08:00
Lawrence Chen
4de975e6a4
Add workspace pages in the titlebar (#1030)
* Add workspace pages in the titlebar

* Add workspace pages UI test target entry

* Relax workspace pages UI test titlebar checks

* Use page close button in workspace pages UI test

* Stabilize workspace pages UI test interruptions

* Skip page close confirms in UI tests

* Clean up superseded workspace handoffs

* Tighten page hint UI assertions

---------

Co-authored-by: cmux <cmux@cmuxs-Mac-mini.local>
2026-03-06 21:23:11 -08:00
austinpower1258
72c0f564c8 works 2026-03-06 18:24:20 -08:00
Austin Wang
0588aec593
Revert "ok (#717)"
This reverts commit a3681ede5b.
2026-03-06 00:19:28 -08:00
Austin Wang
0f14fc0cd1
Merge pull request #995 from manaflow-ai/issue-969-browser-drag-top-drop-targets
Fix browser portal anchor churn during pane drag
2026-03-06 00:18:18 -08:00
austinpower1258
38a89df65b Fix stale browser web view test initializer 2026-03-05 22:54:26 -08:00
Lawrence Chen
e04787789e
Fix markdown panel text click focus (#991)
* Add markdown click regression test

* Fix markdown panel click focus

* Preserve markdown text selection

* Make markdown observer tests deterministic
2026-03-05 22:38:10 -08:00
austinpower1258
3874cac08e Merge origin/main into issue-969-browser-drag-top-drop-targets 2026-03-05 22:36:33 -08:00
austinpower1258
6d95044355 Hide stale browser portals during workspace handoff 2026-03-05 22:32:16 -08:00
austinpower1258
2427a2a736 Fix browser portal anchor churn during pane drag 2026-03-05 21:55:26 -08:00
Austin Wang
a7cef78725
Revert "Fix notification unread persistence when workspaces regain focus (#971)" (#992)
This reverts commit 5f43a3fc32.
2026-03-05 21:31:13 -08:00
Austin Wang
15c7c0cc3c
Fix side-docked dev tools resize (#712)
* wip

* Fix side-docked dev tools resize
2026-03-05 21:28:31 -08:00
Lawrence Chen
29054dc709
Add sidebar help menu to footer (#958)
* Add sidebar help menu

* Fix help menu test wiring

* Fix help menu accessibility

* Use native popup for help menu

* Use icon button for sidebar help

* Add feedback composer and feedback API

* Allow preview builds without feedback env

* Tighten feedback upload limits

* Adjust sidebar footer padding

* Tighten sidebar footer spacing

* Add link affordances to help menu

* Polish sidebar feedback composer

* Move feedback icon to trailing edge

* Normalize help menu trailing icon sizes

* Enlarge help menu trailing icons

* Reduce help menu link icon size

* Shrink help menu link arrow

* Reduce help menu link arrow again

* Fix feedback message editor focus

* Add send feedback keyboard shortcut

* Polish feedback launch and delivery
2026-03-05 21:00:42 -08:00
Austin Wang
c5577dd495
Fix flaky CLI socket listener recovery (#952) (#954)
* Harden socket listener health checks and path handling

* Make socket health probe non-blocking

* Address PR feedback for issue 952 recovery guard

* Run issue 952 regression guard without pytest dependency

* Harden socket probe timing and health telemetry

* Handle missing git in issue 952 regression guard

* Address remaining PR 954 review fixes
2026-03-05 19:52:59 -08:00
Austin Wang
5f43a3fc32
Fix notification unread persistence when workspaces regain focus (#971)
* Fix notification unread persistence on focus

* Address review feedback on notification unread fix
2026-03-05 18:56:03 -08:00
Lawrence Chen
6347571b7c
Fix Dvorak Cmd+C colliding with notifications shortcut (#762)
* Fix layout-safe command shortcut matching

* Fix unshifted symbol shortcut coercion

* Fix layout handling for hardcoded Cmd shortcuts

* Support Cmd/Ctrl modifier hold shortcut hints

* Address PR shortcut review feedback

* Handle Caps Lock in command shortcut matching

* Address remaining PR shortcut review comments

* Handle Cmd+Ctrl+F control-character fallback

* Tighten shortcut hint hold-delay test

* Expose shortcut hint visibility in settings

* Restore Cmd+digit fallback on symbol-first layouts

* Stabilize shortcut regression coverage

* Align shortcut hint toggle with Cmd/Ctrl behavior

* Restore Claude workflow file

* Match Claude workflow file to main

* Keep shortcut hint hold behavior command-only

* Restore command shortcut fallback when layout data is unavailable

* Preserve command-aware shortcut translation
2026-03-05 18:32:42 -08:00
Lawrence Chen
e49e572505
Fix browser Cmd+F overlay clipping in portal mode (#916)
* Fix browser Cmd+F overlay clipping in portal mode

* Fix browser Cmd+F panel update regression

* Fix browser find overlay lifecycle and focus

* Extract regression test helpers for browser find guards

* Restore new-tab Cmd+F overlay and harden test helper

* Fix browser Cmd+F focus handoff race

* Fix browser Cmd+F focus loss across page load

* Address review feedback on browser find focus guards

* Add Cmd+F pane-switch regression UI tests

* Run Cmd+F pane-switch regressions from existing UI suite

* Restore browser find focus on pane refocus

* Stabilize Cmd+F pane-switch regressions with focus-state recorder

* Make autofocus race UI test wait on deterministic page signal

* Fix cmuxTests WebViewRepresentable init after browser search state param
2026-03-05 15:36:47 -08:00
Austin Wang
9b215eddab
Fix browser portal pane drag routing and uploads (#961) 2026-03-05 15:27:17 -08:00
Eray Bozoglu
2712cabac9
Fix orphaned child processes when closing workspace tabs (#889)
* Fix orphaned child processes when closing workspace tabs

When closing a workspace tab via the sidebar X button, child processes
(login → zsh → claude) survived as orphans because TabManager.closeWorkspace()
only removed the workspace from the tabs array without explicitly freeing
Ghostty surfaces. It relied on ARC to cascade deallocation, but SwiftUI views
and Combine publishers held references, delaying or preventing
ghostty_surface_free() (which sends SIGHUP) from ever running.

This adds explicit teardown on the workspace close path:
- TerminalSurface.teardownSurface(): idempotent method to free the Ghostty
  runtime surface eagerly, matching the existing deinit logic
- TerminalPanel.close() now calls teardownSurface() to ensure SIGHUP is sent
- Workspace.teardownAllPanels() iterates all panels and closes them
- TabManager.closeWorkspace() calls teardownAllPanels() before removing
  the workspace from the tabs array

* Harden workspace teardown and ownership checks

* Address follow-up teardown review feedback

---------

Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
2026-03-04 20:00:35 -08:00
Lawrence Chen
604ba6fcab
Fix Cmd+F Escape passthrough into terminal (#918)
* Fix find-bar Escape passthrough to terminal

* Keep find Escape suppression armed until key-up
2026-03-04 19:26:05 -08:00
Lawrence Chen
26bef7316e
Fix custom notification sound staging reliability (#919) 2026-03-04 19:19:07 -08:00
Austin Wang
34989e8ad0
Fix portal browser click focus after workspace switch (#908) 2026-03-04 18:36:26 -08:00
Lawrence Chen
80bbfdf206
Add custom file support for notification sounds (#869)
* Add custom-file notification sound option

* Add notification permission controls and test action

* Allow notification enable retries from settings

* Add notification permission flow debug logging
2026-03-04 17:18:07 -08:00
Lawrence Chen
28977c8e3b
Fix browser panel lifecycle after WebContent process termination (#892)
* Fix browser panel webview lifecycle after web content crashes

* Fix BrowserPanel observer lifecycle during webview replacement

* Fix WebKit termination delegate and harden lifecycle regression check
2026-03-04 16:23:22 -08:00
Lawrence Chen
e0ec448701
Fix Escape propagation when command palette is visible (#847)
* Fix command palette Escape propagation and add regressions

* Respect IME marked text for command palette Escape

* Harden command palette escape pending-open routing
2026-03-04 03:27:54 -08:00
Lawrence Chen
044a3dbb64
Vi mode: half-page scroll, visible cursor, gg fix (#851)
* Vi mode P0 improvements: half-page scroll, visible cursor, gg fix

Three changes to keyboard copy mode (vi mode):

1. Ctrl+U/D now scroll half-page (was full-page). Ctrl+B/F remain
   full-page. Uses Ghostty's scroll_page_fractional binding.

2. Entering copy mode now creates a 1-cell selection at the terminal
   cursor via select_cursor_cell, giving the user a visible cursor
   indicator. Visual mode (v) is tracked separately from Ghostty's
   has_selection so the cursor selection doesn't make every motion
   behave as visual. Exiting visual mode (v again) collapses back
   to the cursor cell.

3. Single 'g' is now a prefix key requiring 'gg' to scroll to top,
   matching standard vim behavior. Uses the same pendingG state
   machine pattern as pendingYankLine for 'yy'.

Part of https://github.com/manaflow-ai/cmux/issues/846

* Fix viewport row refresh with persistent cursor selection

The 1-cell cursor selection made refreshKeyboardCopyModeViewportRowFromVisibleAnchor
always bail (has_selection was always true). Guard on keyboardCopyModeVisualActive
instead so viewport row updates work after scrolling in non-visual mode. Also
re-creates the cursor cell after refresh to preserve visibility.

Additionally: use performBindingAction(_:repeatCount:) for scrollHalfPage,
add state-reset assertion to testGGWithSelectionAdjustsToHome.

Addresses review feedback from CodeRabbit, Cubic, Codex, and Greptile.
2026-03-03 23:56:01 -08:00
Lawrence Chen
2f6cb6ff38
Add keyboard copy mode for terminal scrollback (#792)
* Add keyboard copy mode for terminal scrollback

* Show vim copy mode indicator in terminal

* Fix vi copy-mode symbol keys and pending yank handling

* Refine copy-mode badge wording and font

* Rename keyboard copy-mode badge to VI MODE

* Address PR feedback for copy-mode routing and keyup handling

* Refresh copy-mode viewport row after scrolling
2026-03-03 19:01:21 -08:00
Lawrence Chen
a139c346f2
Fix Cmd+Shift+Enter pane zoom regression in browser focus (#826) 2026-03-03 18:37:46 -08:00
Austin Wang
a3681ede5b
ok (#717) 2026-03-03 15:53:39 -08:00
Lawrence Chen
919f77b6dc
Add setting to hide Cmd-hold shortcut hints (#765)
* Add setting to hide Cmd-hold shortcut hints

* Bump bonsplit for Cmd-hold pane hint toggle

* Document tagged app link format in agent notes

* Disable Ctrl pane hints when hold-hints toggle is off
2026-03-02 19:56:27 -08:00
Lawrence Chen
5bbdd87c29
Fix re-entrant exclusive-access crash in drag handle hit test (#771)
When sibling.hitTest() triggers a SwiftUI layout pass during the
drag handle's sibling walk, AppKit can call back into
windowDragHandleShouldCaptureHit before the outer invocation
finishes. This re-entry accesses SwiftUI view state that is already
held exclusively, causing a Swift runtime SIGABRT.

Add a module-level re-entrancy guard that bails out (returns false)
on nested calls to the sibling walk. Since hitTest is always called
on the main thread, a simple Bool flag is sufficient.

Crash was reproduced on macOS Sequoia 15.1.1 (24B91) in a UTM VM.
The crash stack: DraggableView.hitTest -> windowDragHandleShouldCaptureHit
-> sibling.hitTest -> SwiftUI body evaluation -> hitTest (re-entry)
-> exclusive-access violation -> SIGABRT.
2026-03-02 19:20:14 -08:00
Lawrence Chen
fdc38a3326
Add external URL bypass rules for embedded browser opens (#768)
* Add external URL bypass rules for embedded browser opens

* Align open-wrapper external regex handling with app-side matcher
2026-03-02 17:50:34 -08:00
Lawrence Chen
ae79d32494
Add inline VS Code open-directory command palette action (#685)
* Add inline VS Code directory command-palette action

* Harden inline VS Code serve-web lifecycle handling

* Add command-palette actions to stop/restart inline VS Code server

* Fix inline VS Code serve-web review comments

* Fix serve-web stop/start race and add regression test
2026-03-01 18:53:08 -08:00
Lawrence Chen
bc1b6fd9eb
Honor Ghostty background-opacity across all cmux chrome (#667)
* Honor Ghostty background-opacity across all cmux chrome

Parse background-opacity from Ghostty config and propagate it through
the entire chrome pipeline: bonsplit tab bar (via RRGGBBAA hex),
browser panel/omnibar, titlebar, empty panel, and window background.

Decouple glass effect from sidebar blend mode — bgGlassEnabled now
defaults to false so opacity works independently. Add
GhosttyBackgroundTheme helper for consistent color+opacity resolution
across all UI surfaces.

Fixes https://github.com/manaflow-ai/cmux/issues/263

* Titlebar and chrome opacity matches terminal background-opacity

Use CALayer-level opacity for the titlebar background instead of SwiftUI
Color alpha, matching the terminal's Metal compositing path. Account for
the double alpha stacking in the terminal area (Bonsplit container bg +
Ghostty renderer) so the titlebar visually matches.

Also fix opacity-only config changes not triggering titlebar refresh on
Cmd+Shift+, reload.
2026-03-01 03:48:46 -08:00
Lawrence Chen
838d1b07b1
Fix local HTML file routing in open wrapper (#684)
* Route local HTML open targets to cmux browser

* Keep file:// omnibar navigation inside cmux browser

* Load local file URLs via WKWebView file API

* Add browser regression test for local file URL loads

* Address PR feedback on local HTML and file URL handling
2026-02-28 19:08:39 -08:00
Lawrence Chen
168e6b9b25
Auto-heal missing CLI listener socket (#679)
* Auto-heal missing CLI socket listener

* Add Sentry socket listener breadcrumbs and failure capture
2026-02-28 01:19:38 -08:00
Lawrence Chen
c3b55e2a9f
Fix Cmd+plus zoom handling on non-US layouts (#680) 2026-02-28 00:16:03 -08:00
Lawrence Chen
f73887154d
Precompute panel ordering to reduce sidebar scroll lag (#661)
Sidebar body was calling sidebarOrderedPanelIds() multiple times per
render for branches, directories, and pull requests. Now computes it
once and passes through. Reduces redundant work during scroll frames.

Closes https://github.com/manaflow-ai/cmux/issues/655
2026-02-27 18:44:07 -08:00
Lawrence Chen
1392bd16d7 Revert "Use workspace color for notification ring and selection bar (#664)"
This reverts commit 4bfe95d125.
2026-02-27 18:24:51 -08:00
Lawrence Chen
4bfe95d125
Use workspace color for notification ring and selection bar (#664)
- Notification/focus flash uses workspace customColor (fallback: accent)
- Selection bar/indicator uses workspace customColor when set
- Flash color propagated through Panel.triggerFlash(color:) API
- Browser panel flash overlay uses workspace color
- Regression tests for flash color resolution

Fixes https://github.com/manaflow-ai/cmux/issues/557
2026-02-27 18:14:19 -08:00
Austin Wang
f72ce07ad5
Merge pull request #585 from manaflow-ai/fix/issue-552-trackpad-scroll-not-working
Fix trackpad scrolling in terminal panes
2026-02-27 11:44:51 -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
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