Commit graph

100 commits

Author SHA1 Message Date
Lawrence Chen
b0b73e8878 Prevent stale host visibility thrash after tab move 2026-02-24 14:35:09 -08:00
Lawrence Chen
1c3f8458ee Clear stale surface bg override on config changes 2026-02-23 19:54:54 -08:00
Lawrence Chen
66a9435da6 Add background source diagnostics for theme sync 2026-02-23 19:52:01 -08:00
Lawrence Chen
946b0f28e6 Fix theme bg sync on appearance changes 2026-02-23 19:48:55 -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
austinpower1258
4bc3da65b6 Fix terminal/web portal overflow during narrow pane resizing 2026-02-23 12:26:05 -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
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
0c970858ee Fix surface userdata lifetime during async free 2026-02-23 03:23:06 -08:00
Lawrence Chen
cb0efa3edd Fix early split child-exit close race 2026-02-23 02:59:59 -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
e4379a136c Match terminal flash ring padding to browser 2026-02-23 02:37:48 -08:00
Lawrence Chen
a3f3e20d72 Unify Cmd+Shift+H flash path across panel types 2026-02-23 02:31:22 -08:00
Lawrence Chen
1b954f1d68 Sync theme updates in same frame on theme switch 2026-02-23 01:11:27 -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
afba0fb459 Coalesce Ghostty background notifications to latest value 2026-02-23 00:29:16 -08:00
Lawrence Chen
8f68ddb947 Add filesystem logs for theme resolution flow 2026-02-23 00:14:10 -08:00
Lawrence Chen
2428ae5dbd Respect browser link settings in open wrapper 2026-02-22 18:13:14 -08:00
Lawrence Chen
72791f32bc Break terminal find overlay retain cycle 2026-02-22 16:29:35 -08:00
Lawrence Chen
927b0eb2d1 Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
Lawrence Chen
f366fb0b00 Fix terminal Cmd+F overlay layering and add regression guardrails 2026-02-22 15:25:30 -08:00
Lawrence Chen
645c7f76ea Start workspace command process before workspace is opened 2026-02-21 05:06:29 -08:00
Lawrence Chen
9653113920 Queue workspace command input before surface attach 2026-02-21 04:57:46 -08:00
Lawrence Chen
ba818deb44 Fix IME firstRect preedit anchor sizing (https://github.com/manaflow-ai/cmux/issues/265) 2026-02-21 03:16:33 -08:00
Lawrence Chen
5ae36fcb91
Merge pull request #203 from cmer/browser-whitelist
Add wildcard hostname allowlist for built-in browser routing
2026-02-20 20:47:51 -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
9388358914 Merge remote-tracking branch 'origin/main' into fix-dragdrop-overlay 2026-02-20 19:53:45 -08:00
Lawrence Chen
3a24c20764 Merge remote-tracking branch 'origin/main' into pr-203-browser-whitelist 2026-02-20 19:46:39 -08:00
Lawrence Chen
745c89fba9
Merge pull request #212 from manaflow-ai/issue-171-homebrew-claude-socket-errors
Default Claude Code integration to off
2026-02-20 19:32:30 -08:00
Lawrence Chen
ce6b5e3999 Harden terminal URL host allowlist routing 2026-02-20 19:25:51 -08:00
Lawrence Chen
64f6e34e7b Merge origin/main into pr-203-browser-whitelist 2026-02-20 19:10:59 -08:00
Lawrence Chen
cf767cf9af Fix bonsplit drag routing and pin submodule commit 2026-02-20 18:47:34 -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
eb6caa5ce5 Default Claude Code integration to off 2026-02-20 15:10:48 -08:00
Lawrence Chen
ab84a02152
Fix reload config to honor legacy Ghostty config fallback (#202) 2026-02-20 14:30:21 -08:00
Carl Mercier
5e74161324
Add wildcard hostname allowlist for built-in browser routing (#195)
Adds a configurable host allowlist in Settings > Browser that controls
which terminal links open in the cmux embedded browser vs the system
default browser. Supports exact match and wildcard prefix patterns
(e.g. localhost, 127.0.0.1, *.localtest.me). Empty list preserves
existing behavior of opening all web links in cmux.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:24:50 -06: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
5560492d27
Add preference to disable in-app browser for terminal links (#174)
* Add preference for terminal link browser target

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

* Route non-web terminal links to external opener

Only route http/https terminal links to cmux's embedded browser.
Absolute paths, file:// URLs, and non-web schemes now open via NSWorkspace.

Refs https://github.com/manaflow-ai/cmux/issues/172
2026-02-20 13:58:39 -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
Lawrence Chen
eb5c52d239 Render unread notification ring above portal-hosted terminal view 2026-02-20 02:41:52 -08:00
austinpower1258
b739e918c9 works 2026-02-19 23:52:09 -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
Lawrence Chen
de666ff05b Fix split blackout race and stabilize focus handoff 2026-02-19 17:10:27 -08:00
Lawrence Chen
1b2688233f Animate terminal drop overlay and add stale tabtransfer click regression 2026-02-19 15:22:30 -08:00
austinpower1258
1af5b02629 Make drop zone overlay non-interactive
Use GhosttyFlashOverlayView (hitTest returns nil) instead of plain
NSView so the overlay doesn't steal drag/mouse routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:02:00 -08:00
austinpower1258
5d79d63af8 Fix blue hover not showing when dragging tabs onto terminal panes
The drop placeholder rendered in SwiftUI was hidden behind the
portal-hosted terminal surface. Add an AppKit overlay directly on
GhosttySurfaceScrollView driven by a new paneDropZone environment key
from Bonsplit so it renders above the Metal layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:50:45 -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
ee4848c008 Speed up workspace switching: reduce portal churn and enforce selected z-order 2026-02-18 22:13:40 -08:00