Commit graph

276 commits

Author SHA1 Message Date
Lawrence Chen
a91e92c7cf Always show close button on active tab
Amp-Thread-ID: https://ampcode.com/threads/T-019c6f32-10c2-70ce-b446-5c25c2ae8cbf
Co-authored-by: Amp <amp@ampcode.com>
2026-02-17 21:33:11 -08:00
Lawrence Chen
bf3d22fa8a
Fix flaky WebKit escape focus tests on slow environments (#57)
Two fixes for escape-focus flakiness on VMs:

1. App-side: recordGotoSplitUITestWebViewFocus now retries with increasing
   delays (0.05, 0.1, 0.25, 0.5s) for the exit-address-bar case, giving
   WebKit more time to accept first responder.

2. Test-side: both testEscapeLeavesOmnibarAndFocusesWebView and
   refocusWebView helper send a second Escape if the first only clears
   suggestions/editing state (Chrome-like two-stage escape behavior).
2026-02-17 21:12:28 -08:00
Lawrence Chen
f0e4ccdc1d
Show sidebar/notification/new-tab controls in fullscreen without hovering titlebar (#55)
In fullscreen mode, the NSTitlebarAccessoryViewController buttons are hidden
with the system titlebar. This adds SwiftUI-based fullscreen controls that
appear in the sidebar area (when visible) or inline in the custom titlebar
(when sidebar is hidden), reusing the existing TitlebarControlsView component.

- Track fullscreen state via window notifications and toggle controls visibility
- Hide original titlebar accessory (isHidden + alphaValue=0) in fullscreen
- Route notification popover anchoring through fullscreen controls view model
  so both button clicks and keyboard shortcuts (Cmd+Shift+I) position correctly
- Add debug titlebar spacing slider for fine-tuning leading inset
2026-02-17 20:24:01 -08:00
Lawrence Chen
4220c3808f
Fix sidebar metadata commands failing in multi-window setups (#54)
resolveTabForReport only searched the active window's tab manager, so
report_ports, report_git_branch, report_pwd, set_status etc. returned
"Tab not found" when the shell's --tab UUID belonged to a different
window. Fall back to AppDelegate.tabManagerFor(tabId:) to search all
window contexts.
2026-02-17 19:33:20 -08:00
Lawrence Chen
be74e73b20 Update TODO with bugs, refactoring items, and UI improvements 2026-02-17 18:45:38 -08:00
Lawrence Chen
55437871d7 Bump version to 0.39.0 2026-02-17 18:43:23 -08:00
Lawrence Chen
6d6efb6b60 Reversion all 1.x.x to 0.x.x for pre-launch versioning 2026-02-17 18:31:05 -08:00
Lawrence Chen
7f8b639ae3
Open cmd+clicked terminal links in cmux browser panel (#53)
* Open cmd+clicked terminal links in cmux browser panel instead of system browser

Handle GHOSTTY_ACTION_OPEN_URL in the Ghostty action callback to intercept
link opens. Uses preferredBrowserTargetPane to reuse an existing right-side
pane, falling back to a new horizontal split.

* Use tab-specific manager for OPEN_URL action

Use tabManagerFor(tabId:) instead of the active-window tabManager so the
lookup succeeds when the surface belongs to a different window context.
2026-02-17 18:24:36 -08:00
Lawrence Chen
14ce05db5f Add release artifacts to gitignore 2026-02-17 17:32:00 -08:00
Lawrence Chen
ee5902de0e Bump version to 1.38.1 2026-02-17 17:14:36 -08:00
austinpower1258
0df1988126 Release v1.38.0 2026-02-17 16:36:15 -08:00
Austin Wang
0cca513eac
Browser searchbar bugs (#51)
* Add "+" menu button to horizontal tab bar for new terminal/browser tabs

Adds a "+" button to the tab bar (next to split buttons) that shows a
dropdown menu with "New Terminal ⌘T" and "New Browser ⌘⇧L" options.

- Uses native NSButton + NSMenu so the icon matches the split buttons
- Menu appears below the button
- Routes tab creation through new didRequestNewTab delegate method

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* works

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:26:42 -08:00
Austin Wang
23db0a3fa2
maximize-sidebar (#50) 2026-02-17 16:11:00 -08:00
Lawrence Chen
4bf968fd68
Bump version to 1.37.0 (#49) 2026-02-17 15:17:18 -08:00
Austin Wang
addb99ed50
Add "+" menu button to horizontal tab bar for new terminal/browser tabs (#48)
Adds a "+" button to the tab bar (next to split buttons) that shows a
dropdown menu with "New Terminal ⌘T" and "New Browser ⌘⇧L" options.

- Uses native NSButton + NSMenu so the icon matches the split buttons
- Menu appears below the button
- Routes tab creation through new didRequestNewTab delegate method

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:59:24 -08:00
Lawrence Chen
c2fdd48290
Release v1.36.0 (#47)
* Fix multi-workspace drag/drop, WebView click focus, and add regression tests

- Wire bonsplit isInteractive to workspace active state so inactive
  workspace NSViews are hidden from AppKit event routing
- Add CmuxWebView.mouseDown notification for browser panel focus
  tracking (AppKit delivers clicks to WKWebView, not SwiftUI overlays)
- Add multi-workspace focus regression test covering isHidden fix,
  rapid workspace switching, and browser panel focus routing

* Bump version to 1.36.0
2026-02-17 04:04:29 -08:00
Lawrence Chen
2678606a20
Fix omnibar tracking timeout using background queue (#46)
The 3-second safety net that posts a synthetic mouseUp to break out of
NSTextView's stuck tracking loop was dispatched on the main queue. Since
super.mouseDown blocks the main thread in the tracking loop, the timeout
could never fire. Use a background queue instead (NSApp.postEvent is
thread-safe). Use DispatchWorkItem.isCancelled for atomic cancellation.
2026-02-17 03:35:49 -08:00
Lawrence Chen
100575a63e Release v1.35.0 (#45) 2026-02-17 03:21:49 -08:00
Lawrence Chen
484b66c8ac
Fix terminal keys swallowed after opening browser (#45)
* Fix terminal keys (arrows, Ctrl+N/P) swallowed after opening browser

After a browser panel is shown, SwiftUI's internal focus system activates
and its _NSHostingView starts consuming arrow keys and other non-Command
key events via performKeyEquivalent, preventing them from reaching the
terminal's keyDown handler.

Fix: In the NSWindow performKeyEquivalent swizzle, when GhosttyNSView is
the first responder and the event has no Command modifier, route directly
to the terminal's performKeyEquivalent — bypassing SwiftUI's view hierarchy
walk entirely.

Also clear stale browserAddressBarFocusedPanelId when a terminal surface
has focus, preventing Cmd+N from being eaten by omnibar selection logic
after focus transitions away from a browser.

Adds DEBUG-only keyboard event ring buffer (KeyDebugLog) that dumps to
/tmp/cmux-key-debug.log for diagnosing future key routing issues.

* Fix split focus and Cmd+Shift+N swallowed after opening browser

Split focus: capture the source terminal's hostedView before bonsplit
mutates focusedPaneId, so focusPanel moves focus FROM the old pane
instead of from the new pane to itself. Also retry ensureFocus when the
new terminal's view has no window yet (matching the existing retry
pattern for isVisibleInUI).

Cmd+Shift+N: after WKWebView has been in the responder chain, SwiftUI's
internal focus system can intercept Command-key events in the content
view hierarchy (returning true) without firing the CommandGroup action
closure. Fix by dispatching Command-key events directly to NSApp.mainMenu
when the terminal is first responder, bypassing the broken SwiftUI path.
Also add Cmd+Shift+N to handleCustomShortcut so it's customizable and
doesn't depend on SwiftUI menu dispatch at all.

* Unified debug event log: merge key/mouse/focus into /tmp/cmux-debug.log

- Delete KeyDebugLog, MouseDebugLog, klog(), mlog() from AppDelegate
- Replace all klog/mlog calls with dlog() (provided by bonsplit)
- Remove debugLogCallback wiring from Workspace
- Add focus change logging: focus.panel, focus.firstResponder,
  split.created, focus.moveFocus
- Add import Bonsplit where needed for dlog access
- Fix stale drag state on cancelled tab drags (bonsplit submodule)

* Fix split focus stolen by re-entrant becomeFirstResponder during reparenting

During programmatic splits (Cmd+D / Cmd+Shift+D), SwiftUI reparents the old
terminal view, which fires becomeFirstResponder → onFocus → focusPanel for the
OLD panel, stealing focus from the newly created pane.

Add programmaticFocusTargetPanelId guard to suppress re-entrant focusPanel
calls for non-target panels during split creation.

Also document the unified debug event log in CLAUDE.md.

* Clear stale title/favicon when browser navigation fails

When a page fails to load (e.g. connection refused), the tab was still
showing the previous page's title and favicon. Now didFailProvisionalNavigation
resets pageTitle to the failed URL and clears faviconPNGData.

* Fix Cmd+N swallowed by browser omnibar and improve split focus suppression

- Only Ctrl+N/P trigger omnibar navigation, not Cmd+N/P (Cmd+N should
  always create new workspace regardless of address bar focus)
- Move split focus suppression from workspace-level guard to source:
  suppress becomeFirstResponder side-effects (onFocus + ghostty_surface_set_focus)
  directly on the old GhosttyNSView during reparenting, preventing both
  model-level and libghostty-level focus divergence
- Remove programmaticFocusTargetPanelId from Workspace.focusPanel

* Fix omnibar hang, WebView white flash, drag-over-browser, and idle CPU spin

- Omnibar: first click selects all without entering NSTextView tracking loop;
  subsequent clicks have 3s synthetic mouseUp safety net to prevent hang
- WebView: set underPageBackgroundColor to match window so new browsers don't
  flash white before content loads
- Drag/drop: register custom UTType (com.splittabbar.tabtransfer) in Info.plist
  so WKWebView doesn't intercept tab drags; override registerForDraggedTypes
  on CmuxWebView as belt-and-suspenders
- CPU: fix infinite makeFirstResponder loop in controlTextDidEndEditing by
  checking both the text field and its field editor (the actual first responder)
2026-02-17 03:21:08 -08:00
Austin Wang
0a2ef499b5
Release v1.34.0 (#43)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:39:34 -08:00
Austin Wang
16e8329af5
Merge pull request #42 from manaflow-ai/cmux/browser-improve
Fixes issue with browser on non-running localhost urls
2026-02-16 16:28:51 -08:00
austinpower1258
bd54d06213 fixes browser issue with localhost 2026-02-16 16:21:31 -08:00
Lawrence Chen
f78cdcf425 Merge branch 'main' of https://github.com/manaflow-ai/cmux 2026-02-16 03:30:25 -08:00
Lawrence Chen
c876a7689e
Release v1.33.0 (#41)
* Fix menubar lag in production builds caused by hardened runtime

Hardened runtime's library validation was verifying every dylib on load,
causing noticeable UI lag. Add entitlements file with
disable-library-validation to fix while keeping notarization support.

* Bump version to 1.33.0
2026-02-16 03:30:17 -08:00
Lawrence Chen
a2457f1d5e Fix menubar lag in production builds caused by hardened runtime
Hardened runtime's library validation was verifying every dylib on load,
causing noticeable UI lag. Add entitlements file with
disable-library-validation to fix while keeping notarization support.
2026-02-16 03:26:33 -08:00
Lawrence Chen
c0f7a07a7b Fix sidebar tabs getting extra left padding when update pill is visible
Move GeometryReader from wrapping the entire VStack to wrapping only the
ScrollView so proxy.size.height reflects available height (minus pill),
preventing unnecessary scrollability that triggered macOS horizontal insets.

Also clamp update pill text width with maxWidth instead of fixed width so
it truncates gracefully at narrow sidebar widths and grows when wider, add
horizontal padding, left-align truncated text, and add debug menu item for
testing with long nightly version strings.
2026-02-16 03:20:51 -08:00
Lawrence Chen
b3945bdc7f Fix memory leak: retain cycle in bonsplit middle-click monitor 2026-02-16 03:05:40 -08:00
Lawrence Chen
9067089e61
Bump version to 1.32.0 (#40) 2026-02-16 02:49:10 -08:00
Lawrence Chen
3fa72a0b0b Add sidebar metadata (git branch, ports, logs, progress), fix localhost URL resolution, simplify analytics
- Sidebar now shows git branch, listening ports, log entries, progress bars, and status pills with expand/collapse
- Fix localhost/127.0.0.1 URL parsing by checking before generic URL(string:) which misinterprets the scheme
- Remove custom Keychain distinct ID in favor of PostHog SDK's built-in anonymous ID
- browser open now defaults to caller's workspace via CMUX_WORKSPACE_ID env var
- Improve CLI help text for environment variables
2026-02-16 02:46:39 -08:00
Lawrence Chen
b41331b43d
Release v1.31.0 (#39)
* Bump version to 1.31.0

* remove sidebar-hidden pill test (pill is now sidebar-only)
2026-02-15 21:56:41 -08:00
Lawrence Chen
8f399d1a82 add Claude hook session mapping test 2026-02-15 21:50:06 -08:00
Lawrence Chen
4312f917f0 update docs-site keyboard shortcuts and browser docs 2026-02-15 21:50:00 -08:00
Lawrence Chen
1963762df8 update keyboard shortcuts in README and translations 2026-02-15 21:49:54 -08:00
Lawrence Chen
08cbabf955 add arrow nav and zoom shortcut tests, fix omnibar UI test flakiness 2026-02-15 21:49:49 -08:00
Lawrence Chen
957178d03e tag PostHog events with platform: cmuxterm 2026-02-15 21:49:44 -08:00
Lawrence Chen
b351277063 add arrow key omnibar navigation, browser zoom shortcuts, and history flush on quit 2026-02-15 21:49:38 -08:00
Lawrence Chen
4af05b63d6 remap browser shortcut to Cmd+Shift+L, flash to Cmd+Shift+H 2026-02-15 21:49:33 -08:00
Lawrence Chen
ac4b49d7a4 move update pill to sidebar only, add Install Update menu item 2026-02-15 21:17:33 -08:00
Lawrence Chen
de6cfededa Fix inline completion showing "news." instead of "news.ycombinator.com"
Reject URLs whose host lacks a TLD (no internal dot) from autocompletion
candidates, history recording, and clean up existing bogus entries on load.
2026-02-15 21:13:31 -08:00
Lawrence Chen
7d290a1c24 add regression test: UpdatePill must not be gated behind #if DEBUG 2026-02-15 20:40:40 -08:00
Lawrence Chen
80cf9f7d21
Bump version to 1.30.0 (#38) 2026-02-15 20:03:36 -08:00
Lawrence Chen
430e86909f show update pill in sidebar for Release builds 2026-02-15 19:59:55 -08:00
Lawrence Chen
2080a8ea5c
Release v1.29.0 (#37)
* Bump version to 1.29.0

* Include uncommitted TabManager changes needed for build
2026-02-15 18:41:13 -08:00
Lawrence Chen
ad4409c55e Cmd+[/] browser back/forward, cmd+click open in new tab, right-click open in new tab
- Change Cmd+[/] from workspace history navigation to browser back/forward
  (only when focused surface is a browser, no-op on terminal)
- Add WKUIDelegate with createWebViewWith to handle target=_blank links
- Add decidePolicyFor check for targetFrame==nil and cmd+click modifier
  to open links in new browser surface in the same pane
- Override willOpenMenu in CmuxWebView to rename "Open Link in New Window"
  to "Open Link in New Tab"
- Add E2E test for browser back/forward via socket and Cmd+[/] shortcuts
2026-02-15 18:35:58 -08:00
Lawrence Chen
777d6b048e Replace CLAUDE_CONFIG_DIR with claude wrapper + richer notifications
Instead of creating a merged config directory and injecting
CLAUDE_CONFIG_DIR on every terminal spawn, place a thin wrapper
script at Resources/bin/claude that intercepts claude invocations
to inject --session-id and --settings flags. This eliminates
blocking I/O on terminal creation and removes config management
complexity.

- Add Resources/bin/claude wrapper script with hook injection
- Add shell integration PATH fix (re-prepend after .zshrc/.bashrc)
- Add transcript reading for richer stop notifications
- Add set_status/clear_status to notifications socket allowlist
- Add Settings toggle to disable Claude Code integration
- Update docs to reflect automatic integration approach
- Unset CLAUDECODE env var to avoid nested session detection
2026-02-15 18:33:36 -08:00
Lawrence Chen
f789306a97 enable update pill in Release builds 2026-02-15 18:08:32 -08:00
Lawrence Chen
5e62a9eca7 Fix nightly: delete existing CMUXCommit plist key before adding 2026-02-15 17:14:35 -08:00
Lawrence Chen
a01e7483d6 Improve nightly version numbers
- Marketing version: append -nightly.YYYYMMDD (e.g. 1.28.2-nightly.20260215)
- Build number: monotonic YYYYMMDDNN integer for clean Sparkle comparisons
- Embed commit SHA via CMUXCommit plist key (already shown in About panel)
2026-02-15 17:10:10 -08:00
Lawrence Chen
2c205893fb Change reload configuration shortcut to Cmd+Shift+, 2026-02-15 17:04:45 -08:00
Lawrence Chen
fb2236cb3d Translate disclaimer lines to each target language 2026-02-14 21:55:38 -08:00