Commit graph

876 commits

Author SHA1 Message Date
Lawrence Chen
95ef1c8ca7
Keep portal sync responsive during live resize 2026-03-16 18:49:40 -07:00
Lawrence Chen
8d1d4722f6
Defer terminal portal sync past layout churn 2026-03-16 15:40:13 -07:00
Lawrence Chen
3b507d361f
fix: require pinned ids in sidebar drop planner (#1505)
Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-15 21:48:51 -07:00
Lawrence Chen
7a9a6a550c
Keep pinned workspaces above the sidebar pin boundary (#1503)
* test: cover pinned workspace reorder boundary

* fix: keep pinned workspaces above drag boundary

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-15 21:31:30 -07:00
Austin Wang
2e4c482c21
Fix Google sign-in infinite loading in browser pane (#1493)
* Add regression test for Google sign-in popup fallback (#1491)

* Fix Google sign-in popup routing regression (#1491)
2026-03-15 18:48:23 -07:00
Austin Wang
bd1788639d
Fix terminal find overlay crash and focus handoff (#1487)
* Add regression tests for terminal find overlay races

* Fix terminal find overlay crash and focus handoff
2026-03-15 18:32:24 -07:00
Manfred Neustifter
6b138f7d9d
feat: support window.open() popup windows (#1150)
* feat: support window.open() popup windows (#742)

Return a live WKWebView from createWebViewWith using WebKit's supplied
configuration, preserving popup browsing-context semantics (window.opener,
postMessage). This fixes OAuth/OIDC flows and any site relying on standard
popup patterns.

- Add BrowserPopupWindowController: NSPanel-based popup with self-retention,
  KVO title/URL, read-only URL label, nested popup depth limit (3),
  insecure-HTTP prompt parity, auth challenge parity, download delegate
- Classifier: scripted requests (window.open) create popups; user-initiated
  actions (Cmd+click, middle-click, context menu) open tabs
- Retarget context menu "Open Link in New Tab" to bypass createWebViewWith,
  wired in both main browser and popup web views
- Cmd+W fast path in AppDelegate for popup windows
- Opener panel owns popup lifecycle; close() tears down all child popups

* fix: Cmd+W closes only the popup, not the parent tab

Add BrowserPopupPanel (NSPanel subclass) that intercepts Cmd+W in
performKeyEquivalent before the swizzled cmux_performKeyEquivalent
can dispatch it to the main menu's "Close Tab" action.

Also refine the popup classifier to reuse browserNavigationShouldOpenInNewTab
for Cmd+click/middle-click detection, add download delegate wiring, and
wire onContextMenuOpenLinkInNewTab for popup web views.

* fix: tighten popup routing and window behavior

* test: cover oversized popup frame clamping

* test: cover plain link-activated popup routing

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-15 17:48:05 -07:00
zlatkoc
23bfc11b19
Add Startpage as a browser search engine option (#1368)
Add Startpage (startpage.com) to the BrowserSearchEngine enum alongside
Google, DuckDuckGo, Bing, and Kagi. Startpage provides an OpenSearch-
compatible suggestions endpoint at /osuggestions, so autosuggestions
work out of the box using the existing OSJSON parser.

Co-authored-by: Zlatko Cajic <git@zlat.co>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 16:18:46 -07:00
Gale
07ec05b0f1
fix: make Cmd+W close About/Licenses windows instead of terminal tabs (#1473)
* fix: make Cmd+W close auxiliary windows

* test: harden auxiliary window close coverage

* style: normalize auxiliary window helper layout
2026-03-15 16:09:22 -07:00
Gaetan Juvin
dd6feed78f
Fix arrow key glyph matching in customizable shortcuts (#1443)
keyCodeForShortcutKey() did not map arrow glyphs (←→↑↓) to their
macOS key codes (123-126). The shortcut recorder correctly stored
arrow keys as glyphs via storedKey(), but matchShortcut() could
not resolve them back to key codes for ANSI fallback matching.

This only affected non-directional shortcut actions (e.g. Next/Previous
Surface) since pane focus shortcuts use a separate matchDirectionalShortcut()
path that already handles arrow keys.
2026-03-15 15:57:39 -07:00
Ragnar Rova
a7cb968a55
Add configurable sidebar tint color with light/dark mode support (#1465)
- Config: sidebar-background supports plain hex (#336699) or
  light/dark syntax (light:#fbf3db,dark:#103c48)
- Config: sidebar-tint-opacity overrides tint opacity
- Settings UI: per-scheme color pickers, opacity slider (0-70%), reset
- SidebarBackdrop resolves light/dark hex based on @Environment colorScheme
- applySidebarAppearanceToUserDefaults guards on rawSidebarBackground presence
  so UI picks survive appearance toggles when no config is set
- Stale light/dark UserDefaults keys cleared when config switches from
  dual-mode to single or sidebar-background is removed
- applyPreset() and Reset Tint clear per-scheme overrides
- Debug snapshot (combinedPayload + copySidebarConfig) includes new keys
- ColorPicker labels use String(localized:) per localization policy
- Opacity slider capped at 0.7 to match debug view vibrancy constraint

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 15:48:57 -07:00
Lawrence Chen
9bb2816e05
Fix main CI regressions (#1458)
Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-15 02:04:33 -07:00
Lawrence Chen
6c644d930d
Allow smaller sidebar widths (#1420)
* Add sidebar minimum width UI regression test

* Allow narrower sidebar resizing

* Set smaller sidebar minimum to 180
2026-03-13 21:40:25 -07:00
Lawrence Chen
623262493b
Fix stale Claude sidebar status: add missing hooks, OSC suppression, PID sweep (#1306)
* Fix stale Claude status in sidebar by adding missing hooks and OSC suppression

The Claude Code integration only used 3 hooks (SessionStart, Stop, Notification),
leaving gaps that caused stale sidebar status. Now uses 6 hooks:

- SessionEnd: clears status when Claude exits (covers Ctrl+C where Stop doesn't fire)
- UserPromptSubmit: clears "Needs input" and sets "Running" on new prompt
- PreToolUse (async): clears "Needs input" when Claude resumes after permission grant

Also:
- Suppress OSC 9/99 desktop notifications for workspaces with active Claude hook
  sessions to prevent duplicates from the raw OSC path
- Store Claude process PID in status entries for stale-session detection
- Add 30-second sweep timer that checks agent PIDs and clears stale entries
  (safety net for SIGKILL/crash where no hook fires)
- Update wrapper test expectations for the new hook set

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

* Don't show "Running" status on Claude launch, only when actually working

SessionStart now registers the PID for tracking and OSC suppression via
set_agent_pid without setting a visible status entry. "Running" only
appears when the user submits a prompt (UserPromptSubmit) or Claude
starts using tools (PreToolUse).

Added set_agent_pid / clear_agent_pid socket commands to decouple PID
tracking from visible status entries. OSC suppression checks agentPIDs
instead of statusEntries so it works during the initial idle period.

* Don't restore status entries across app restarts

Status entries are ephemeral runtime state tied to running processes
(e.g. claude_code "Running"). Restoring them after restart shows stale
status for processes that no longer exist.

* Address PR review comments and remove debug logging

- session-end: only clear status/PID/notifications when Stop didn't fire first
- PID sweep: check errno == ESRCH instead of treating all kill(pid,0) failures as dead
- Validate CMUX_CLAUDE_PID > 0
- Propagate tracked PID in pre-tool-use setClaudeStatus
- OSC suppression: use tabManagerFor(tabId:) for multi-window support
- clearAgentPID: resolve tab UUID before async dispatch
- restoreSessionSnapshot: also clear agentPIDs alongside statusEntries
- Fix AskUserQuestion surfaceId overwrite (wrong workspace notification)
- Fix notification text matching for "Claude Code needs your attention"
- AskUserQuestion: render option labels as bracketed inline text
- Remove artificial text truncation limits
- Remove temporary JSONL debug logging from all handlers

* Use resolveTabIdForSidebarMutation in clearAgentPID
2026-03-13 20:47:42 -07:00
Austin Wang
85ebbb686f
Merge pull request #1417 from manaflow-ai/issue-1414-cmd-palette-arrow-keys
Fix command palette command-mode shortcut and navigation
2026-03-13 20:15:28 -07:00
austinpower1258
c1e264f325 Fix command palette command mode navigation 2026-03-13 20:14:03 -07:00
Lawrence Chen
2a8d4475a3
Throttle repeated socket listener start failures 2026-03-13 19:54:09 -07:00
Austin Wang
80fea629f5
Merge pull request #1413 from manaflow-ai/issue-1409-omnibar-backspace-arrow
Fix omnibar backspace/arrow key loss after prefix deletion
2026-03-13 18:17:54 -07:00
austinpower1258
48ec60946f Replace command palette SwiftUI TextField with native AppKit NSTextField
The SwiftUI TextField lost arrow-key and backspace handlers when the
query prefix (">") was deleted, because the scope transition tore down
the .onKeyPress modifiers. Using an NSViewRepresentable with an AppKit
field editor keeps navigation commands (up/down/enter/escape) on the
native delegate, making them immune to SwiftUI scope changes.

Fixes #1409

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:16:57 -07:00
Lawrence Chen
98f5553335
Fix macOS dictation NSTextInputClient conformance (#1410)
* Add dictation text input regression tests

* Fix dictation text input client conformance

* Fix dictation caret rect anchoring

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-13 18:14:02 -07:00
Lawrence Chen
f90bcbc862
Merge pull request #1382 from manaflow-ai/task-cmd-p-search-all-surfaces
Add Cmd+P all-surface search option
2026-03-13 17:55:10 -07:00
Lawrence Chen
9ee6e0ca6e
Defer palette fingerprint refresh after query transitions 2026-03-13 17:42:43 -07:00
Lawrence Chen
8a0934b801
Fallback stable socket listener to a user-scoped path (#1351)
* Fallback stable socket listener to user socket path

* Move stable socket path out of /tmp

* Keep socket health checks active on fallback paths

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-13 17:37:01 -07:00
Lawrence Chen
5dd93a8ab1
Merge pull request #1401 from manaflow-ai/task-cmd-shift-u-exits-cmd-shift-enter-mode
Exit split zoom when jumping to unread
2026-03-13 17:28:34 -07:00
Lawrence Chen
d0245d5069
Mark palette prefix constant nonisolated 2026-03-13 17:23:36 -07:00
Lawrence Chen
b2986ea6c8
Use observed query for palette refresh 2026-03-13 17:22:14 -07:00
Lawrence Chen
cd04bb8932
Merge origin/main into feat-cmux-themes-command 2026-03-13 17:22:12 -07:00
Lawrence Chen
09a98c911d
Guard notification focus failures 2026-03-13 17:21:40 -07:00
Austin Wang
3891a787f6
Merge pull request #1403 from manaflow-ai/cmux/cwd-regression
Fix split cwd inheritance while shell cwd is stale
2026-03-13 17:09:54 -07:00
austinpower1258
4bb212510e fix(cmux): preserve split cwd while shell cwd is stale 2026-03-13 17:02:48 -07:00
Lawrence Chen
6c9e4d14e5
Reset palette results on scope change 2026-03-13 16:06:40 -07:00
Lawrence Chen
02854441e9
Clear split zoom when jumping to unread 2026-03-13 16:03:07 -07:00
Lawrence Chen
7bd199b625
Address cmux themes PR feedback 2026-03-13 15:48:49 -07:00
Lawrence Chen
a99ee15672
fix: honor shell state for close confirmation 2026-03-13 15:43:04 -07:00
Lawrence Chen
cfa7b1d1a6
test: cover close-tab shell state regression 2026-03-13 15:43:03 -07:00
austinpower1258
7f40e0097b fix(cmux): focus close confirmation actions 2026-03-13 12:53:20 -07:00
austinpower1258
9bfa3b9143 Make Cmd+W close the window when it closes the last terminal
Previously, Cmd+W on the last surface kept the workspace alive with a
replacement shell, unless the user toggled a hidden setting. This was
confusing—users expect Cmd+W to close the window when there's nothing
left.

Now Cmd+W (and the tab-strip X button) always close the workspace when
they close its last surface, and close the window when that was the last
workspace. Internal/programmatic closes (e.g. process exit, panel moves)
still spawn a replacement shell so the workspace stays alive.

Key changes:
- Track explicit user close gestures via markExplicitClose / onTabCloseRequest
- Remove the LastSurfaceCloseShortcutSettings toggle (now always-on)
- Use window.performClose for last-workspace window close
- Update tests to match the new behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:43:24 -07:00
Austin Wang
44c1a36d14
Merge pull request #1391 from manaflow-ai/issue-1390-cmd-t-crash
Fix crash when creating a new workspace
2026-03-13 11:17:46 -07:00
austinpower1258
c1998e347c Fix crash when creating a new workspace via snapshot-based state
Snapshot TabManager's published state (tabs, selectedTabId) at the start
of workspace creation so mutations don't bounce through Combine-backed
accessors mid-creation. Prevents crashes when adding a workspace via
Cmd+N, the new-workspace button, or any other creation path that
triggers re-entrant publishes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:15:03 -07:00
Austin Wang
03e9b81cf2
Merge pull request #1389 from manaflow-ai/issue-1321-vsc-opens-browser
Fix VS Code command palette to open desktop app
2026-03-13 10:45:08 -07:00
austinpower1258
fcd256a193 Fix VS Code command palette open target 2026-03-13 10:37:36 -07:00
Lawrence Chen
e52959a528
Fix crash when adding a workspace into an orphaned window context (#1380)
* Add orphaned window context regression test

* Skip orphaned workspace creation contexts

* Reorder orphaned context notification cleanup

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-13 07:44:44 -07:00
Lawrence Chen
3135b4b13e
Add Cmd+P all-surfaces search option 2026-03-13 07:43:57 -07:00
Lawrence Chen
ee3b027703
Change help menu "Welcome" to "Welcome to cmux!" (#1377)
Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 07:24:51 -07:00
Lawrence Chen
5f074f810e
Fix session restore replay for transient terminal states 2026-03-13 07:20:18 -07:00
Lawrence Chen
4eb7a37972
Add Discord link to help menu (#1366)
Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 06:49:11 -07:00
Lawrence Chen
0ff9d7aa27
Add VoiceOver selected traits to pickers and reorder settings (#1372)
Add accessibilityAddTraits(.isSelected) to Theme and App Icon picker
buttons so VoiceOver announces the active option. Reorder the top of
the App section to: Language, Theme, App Icon.

Addresses review feedback from https://github.com/manaflow-ai/cmux/pull/1367

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 06:46:38 -07:00
Lawrence Chen
c7b54b78d6
Add subtitle to App Icon setting to clarify it's not a theme toggle (#1367)
* Add subtitle to App Icon setting to reduce confusion with theme

Users were confusing the App Icon picker (Automatic/Light/Dark) with
the Theme toggle. Add "Dock and app switcher" subtitle to clarify
this setting only affects the icon appearance, not the app theme.

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

* Replace Theme dropdown with visual appearance picker

Draw window thumbnails showing light/dark previews with traffic light
dots and content bars, matching the macOS System Settings appearance
picker pattern. System mode shows overlapping light+dark thumbnails.

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

* Swap theme picker to Gemini's wallpaper + layered window design

Replace flat single-window thumbnails with richer previews: wallpaper
gradient backgrounds, menu bar with Apple logo, two layered windows
with shadows, and a split-mask for the System option (light on left,
dark on right with center divider), matching the macOS System Settings
appearance picker more closely.

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

* Move Theme and App Icon pickers to right-aligned row layout

Both pickers now use an HStack with the label on the left and
thumbnails on the right, matching the SettingsCardRow pattern.
Thumbnails get layoutPriority(1) so the label text compresses
first on narrow windows. Slightly smaller thumbnails (76x50 for
theme, 48px icons) to fit comfortably at minimum settings width.

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

* Top-align labels in Theme and App Icon picker rows

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

* Increase hitbox on picker buttons and remove focus ring

Add contentShape(Rectangle()) for full-area tap targets, increase
padding (8v/10h), and add focusable(false) to prevent the macOS
keyboard focus outline from showing on the buttons.

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

* Use rounder squircle corners on theme thumbnails

Bump cornerRadius from 10 to 14 on the thumbnail clip shape and
border for a more pronounced squircle look.

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

* Use true superellipse squircle shape for theme thumbnails

Add a Squircle shape that draws a superellipse (n=4) path blended
with an ellipse based on corner radius. Apply it to the theme
thumbnail clip and border instead of RoundedRectangle.

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

* Remove custom Squircle struct, use built-in continuous rounded rect

RoundedRectangle(style: .continuous) is Apple's squircle. The custom
superellipse shape was unnecessary.

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

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 06:42:08 -07:00
Lawrence Chen
09ea29a63a fix: restrict rtfd attachment fallback to images 2026-03-13 05:30:38 -07:00
Lawrence Chen
4a3b9e7c9b fix: support attachment-only rtfd image paste fallback 2026-03-13 05:30:38 -07:00