Commit graph

418 commits

Author SHA1 Message Date
Lawrence Chen
7dbd7811df Fix workspace routing for surface.read_text
Addresses review feedback from https://github.com/manaflow-ai/cmux/pull/219 by resolving read-screen targets against requested workspace/surface instead of the selected workspace.
2026-02-20 16:31:48 -08:00
Lawrence Chen
71a8644411
Merge pull request #219 from manaflow-ai/issue-152-153-read-screen-production
Expose production read-screen capture-pane APIs
2026-02-20 16:25:31 -08:00
Lawrence Chen
b163c2bbf3 Expose production read-screen capture APIs
Implements capture-pane parity item from https://github.com/manaflow-ai/cmux/issues/153 by shipping production read-screen support from https://github.com/manaflow-ai/cmux/issues/152.
2026-02-20 16:22:33 -08:00
Lawrence Chen
47151f45e7
Merge pull request #216 from manaflow-ai/manaflow/add-community-section-to-bottom-of-readme-similar-5a48v
Add community section to README
2026-02-20 15:55:46 -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
70716d23bf Add community section to README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:50:54 +00:00
Lawrence Chen
ea0593475c
Merge pull request #206 from manaflow-ai/issue-180-http-nonsecure-hosts
Allow HTTP in built-in browser for local dev hosts
2026-02-20 15:39:22 -08:00
Austin Wang
270115ccbb
Fix Cmd+Enter being routed as browser reload (#213) 2026-02-20 15:36:24 -08:00
Lawrence Chen
c9cafc0806 Merge origin/main into issue-180-http-nonsecure-hosts 2026-02-20 15:27:59 -08:00
Lawrence Chen
834e156556 Make HTTP allowlist helper and save row responsive 2026-02-20 15:20:44 -08:00
Lawrence Chen
6133da0b20 Prefer navigate row over switch-to-tab for identical URL 2026-02-20 15:19:06 -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
3ffceb7e8e Fix insecure HTTP proceed to be one-time unless saved 2026-02-20 15:16:12 -08:00
Lawrence Chen
d1bcb17b0d Add explicit save for HTTP host allowlist setting 2026-02-20 15:04:58 -08:00
Lawrence Chen
79b34052cb Persist HTTP allowlist selection when opening externally 2026-02-20 15:00:54 -08:00
Lawrence Chen
573cec4a75
Fix inconsistent Tab/Workspace terminology in settings and menus (#187)
Unify user-facing labels to consistently use "Workspace" instead of
mixing "Tab" and "Workspace":

- Settings: "New Tab" → "New Workspace" (keyboard shortcuts section)
- Menu: "Tab 1"–"Tab 9" → "Workspace 1"–"Workspace 9" (Cmd+1–9)
- Sidebar context menu: "Close Tabs" → "Close Workspaces",
  "Close Tabs Below/Above" → "Close Workspaces Below/Above"

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

Co-authored-by: austinpower1258 <austinwang115@gmail.com>
2026-02-20 14:58:58 -08:00
Lawrence Chen
821e3ab4c3 Guard insecure HTTP in browser with allowlist and proceed flow 2026-02-20 14:55:26 -08:00
Lawrence Chen
1650ba372f
Fix sidebar workspace staying dim after external drop (#207)
* Fix stuck sidebar dim state after external drop

* Debug sidebar drag outside-drop flow with content overlay

* Handle sidebar drag endings outside window

* Fix stale update feed resolver tests
2026-02-20 14:53:57 -08:00
Lawrence Chen
327d658069
Fix CLI v2 commands showing JSON parse error instead of actual error (#189)
When the server returns a plain-text error (e.g., "ERROR: Access denied
...") before the JSON protocol starts, sendV2() would pass it through
JSONSerialization which throws a confusing NSCocoaErrorDomain 3840 error.

Now sendV2() checks for "ERROR:" prefix and surfaces the real message.
Also includes the raw response in the fallback error for easier debugging.

Fixes https://github.com/manaflow-ai/cmux/issues/188
2026-02-20 14:53:00 -08:00
Austin Wang
f455af4541
Fix issue #185 overlay recursion hardening and scroll regression (#193) 2026-02-20 14:51:44 -08:00
Lawrence Chen
9c52373141 Allow HTTP loads in built-in web content
Fixes https://github.com/manaflow-ai/cmux/issues/180 by enabling NSAllowsArbitraryLoadsInWebContent for WKWebView and adding a regression test that asserts ATS web-content override exists in Resources/Info.plist.
2026-02-20 14:31:15 -08:00
Austin Wang
94d44fefd2
chore(claude-opus-4-6): Branch name in sidebar sometimes doesn't update correctly... (#199) 2026-02-20 14:31:13 -08:00
Lawrence Chen
f3a4e4db43
Cache GhosttyKit builds by ghostty commit in setup script (#204) 2026-02-20 14:30:31 -08:00
Lawrence Chen
ab84a02152
Fix reload config to honor legacy Ghostty config fallback (#202) 2026-02-20 14:30:21 -08:00
Lawrence Chen
c40ec75616
docs(web): refresh API access modes and socket examples (#196)
* docs(web): refresh API socket and automation mode docs

* docs(web): fix v1 JSON note and restore API metadata scope
2026-02-20 14:19:48 -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
Austin Wang
a804a8e767
Update landing page discord invite link
Merged by manaflow for task kn7d8qr7jvjsv3wf1axwq77gs981ha9j.
2026-02-20 14:09:31 -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
Austin Wang
bd9871d6c4
Fix CLI symlink path in docs
Merged by manaflow for task kn78rbgm4extfnpjcazqmw9c7d81hgdb.
2026-02-20 13:53:26 -08:00
Lawrence Chen
5502bec29a
Fix homebrew cask template: homepage → cmux.dev, min macOS → Sonoma (#162) 2026-02-20 13:45:20 -08:00
Lawrence Chen
305d22e4e6
Fix same-day nightly update detection in Sparkle (#173)
* Fix nightly build version monotonicity for Sparkle updates

* Include run attempt in nightly build version
2026-02-20 13:43:51 -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
6f9146e895
Run nightly workflow hourly instead of daily (#170)
The decide job already skips when main HEAD matches the nightly tag,
so this only builds when there are actual changes. Hourly means users
get nightly updates within an hour of merging to main.
2026-02-20 04:40:14 -08:00
Lawrence Chen
1196640789
Match nightly section tone with rest of README (#169)
* Add nightly builds download section to README

* Match nightly section tone with rest of README
2026-02-20 04:36:23 -08:00
Lawrence Chen
dd387a2a81
Add nightly builds download section to README (#168) 2026-02-20 04:35:30 -08:00
Lawrence Chen
ca09a7a6d5
Fix nightly icon to match debug icon style (#167)
Recolor the debug icon (orange DEV → purple NIGHTLY) instead of
pasting a banner onto the production icon. This preserves the exact
same chevron positioning, glow effects, and banner integration.
2026-02-20 04:19:10 -08:00
Lawrence Chen
ec9b80f389
Add nightly-specific app icon with purple NIGHTLY banner (#166)
Follows the same pattern as AppIcon-Debug (orange DEV banner) but with
a purple banner and "NIGHTLY" text. The nightly CI workflow now passes
ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon-Nightly to xcodebuild so
the nightly app gets its own distinct icon.

Includes scripts/generate_nightly_icon.py for regenerating the icons
from the production AppIcon source files.
2026-02-20 04:10:32 -08:00
Lawrence Chen
ecee9386cf
Add GitHub issue templates for bug reports and feature requests (#165)
Bug reports now require cmux version, macOS version, chip type,
install method, repro steps, and expected behavior. Blank issues
are disabled to encourage structured reports.
2026-02-20 04:02:26 -08:00
Lawrence Chen
707be44aaf
Separate cmux NIGHTLY as standalone app with its own bundle ID (#164)
The nightly build is now a distinct app called "cmux NIGHTLY" with
bundle ID com.cmuxterm.app.nightly, allowing side-by-side installation
with the stable release. The nightly appcast URL is baked into the
app's Info.plist by CI, so no in-app channel switching is needed.

- Nightly workflow: rename app to "cmux NIGHTLY", set bundle ID to
  com.cmuxterm.app.nightly, hardcode nightly Sparkle feed URL, publish
  DMG as cmux-nightly-macos.dmg
- Remove "Receive Nightly Builds" toggle from settings
- Remove UpdateChannelSettings enum and simplify feed URL resolution
  to just use SUFeedURL from Info.plist
- Remove UpdateChannelSettingsTests (no longer applicable)
2026-02-20 03:54:07 -08:00
Lawrence Chen
c11453fa6c
Merge pull request #132 from manaflow-ai/issue-126-notification-ring
Fix notification ring not appearing on terminal panes
2026-02-20 02:53:52 -08:00
Lawrence Chen
eb5c52d239 Render unread notification ring above portal-hosted terminal view 2026-02-20 02:41:52 -08:00
Lawrence Chen
4588c3b0d1 Avoid O(N) re-renders by passing derived Bool instead of ObservableObject
Replace @ObservedObject notificationStore in TerminalPanelView and
PanelContentView with a plain `let hasUnreadNotification: Bool`.
The parent WorkspaceContentView already subscribes to the store
via @EnvironmentObject; it now computes the per-panel Bool and
passes it down, so child views only re-render when their own
notification state actually changes.
2026-02-20 02:41:52 -08:00
Lawrence Chen
cef1513ceb Fix notification ring not appearing on terminal panes
TerminalPanelView and PanelContentView held notificationStore as a
plain `let` property. Since it's a reference type (class), SwiftUI's
structural diffing saw no change when notifications were added and
skipped re-evaluating the view body. Changed to @ObservedObject var
so the views properly subscribe to the store's @Published changes.

Closes #126
2026-02-20 02:41:52 -08:00
Lawrence Chen
d74d2afb01
Merge pull request #146 from manaflow-ai/cmux/browserpanel-issues
Fix terminal portals covering browser panes on workspace switch
2026-02-20 02:10:23 -08:00
Lawrence Chen
b17249fa30 Fix test command: allowAll socket mode + correct socket path
Tests run via SSH and aren't cmux descendants, so cmuxOnly mode
rejects the connection. Also fix socket path from /tmp/cmux.sock
to /tmp/cmux-debug.sock for debug builds.
2026-02-20 02:07:28 -08:00
austinpower1258
b739e918c9 works 2026-02-19 23:52:09 -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
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
eb86606841
Fix --help/-h on subcommands being silently ignored (#119) (#128)
Previously, --help/-h was only checked at the top level before command
dispatch. Running e.g. `cmux new-workspace --help` would execute the
command instead of printing help.

Add per-subcommand help text for all commands that take arguments/flags.
The help check runs before socket connect so it works even when cmux is
not running. Commands without dedicated help (ping, help, list-windows,
etc.) fall through to normal behavior.
2026-02-19 22:29:28 -08:00
Lawrence Chen
010403fee2
CLI: add --command flag to new-workspace (#121)
* CLI: add --command flag to new-workspace

Allows running an initial command in the new workspace's terminal:
  cmux new-workspace --command "cd /path && claude"

After creating the workspace, waits 500ms for the shell to initialize,
then sends the command text via surface.send_text.

Closes #120

* CLI: error on unknown flags for new-workspace

Typos like `--comand` were silently ignored. Now reports the
unknown flag and lists known flags.

* CLI: skip --command send when workspace creation fails

If new_workspace returns an error instead of "OK <uuid>",
don't attempt to send the command (which would hit the wrong workspace).
2026-02-19 22:13:33 -08:00