Commit graph

185 commits

Author SHA1 Message Date
Lawrence Chen
4376e6e19a
Support image drag-and-drop into SSH terminals (#1838)
* Add remote image drag-and-drop uploads

* test: cover ssh image paste planning

* fix: upload images pasted into ssh terminals

* fix: share zsh history in cmux ssh relay shells

* fix: add cancellable ssh image transfer indicator

* fix: harden async ssh image transfer callbacks

* fix: address ssh image upload review feedback

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-20 18:31:19 -07:00
Lawrence Chen
183c5601be
Make remote sidebar directory canonicalization preserve live paths 2026-03-19 01:23:53 -07:00
Lawrence Chen
0010e10bf5
Stabilize sidebar directory ordering when split focus changes (#1798)
* Add sidebar directory ordering regression test

* Stabilize sidebar directory ordering

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-19 01:05:12 -07:00
Austin Wang
55cb5c6763
Fix sidebar workspace PR status display and false positives (#1636)
* test(sidebar): add failing PR checks regressions

* fix(sidebar): show workspace PR status

* refactor(sidebar): restore PR icon style

* refactor(sidebar): simplify PR check labels

* test(sidebar): cover focused workspace PR selection

* fix(sidebar): scope workspace PRs to current branch

* test(sidebar): cover stale PR after branch change

* fix(sidebar): clear stale PRs on branch changes

* test(sidebar): cover workspace PR false positives

* fix(sidebar): stop false-positive workspace PR badges

* test(cmuxTests): remove duplicate sidebar PR regressions
2026-03-17 22:57:12 -07:00
Austin Wang
bdd95902f2
Restore last-surface close preference toggle (#1679)
* test: cover last-surface close preference regression

* fix: restore last-surface close preference
2026-03-17 22:36:32 -07:00
Austin Wang
a42e6663c4
Fix layout follow-up spin loop (#1633) 2026-03-17 17:17:24 -07:00
Lawrence Chen
f5d610e3ea
Merge remote-tracking branch 'origin/main' into task-browser-import-followups
# Conflicts:
#	Sources/Workspace.swift
2026-03-17 16:49:16 -07:00
leon leung
66f8f8b022
fix(Workspace): fix EXC_BAD_ACCESS caused by over-releasing ghostty font (#1496)
The ghostty_surface_quicklook_font function returns an unretained pointer to a font object. Using takeRetainedValue() transferred non-existent ownership to ARC, leading to an over-release and an eventual EXC_BAD_ACCESS (SIGSEGV) crash when creating new surfaces (like cmd+t or cmd+d) on certain systems such as Intel Macs.

Replaced takeRetainedValue() with takeUnretainedValue() to correctly manage memory.

Co-authored-by: LeonLeung <leonleung.tech@gmail.com>
2026-03-17 15:16:12 -07:00
Lawrence Chen
d8a968c623
Address SSH follow-up PR review comments 2026-03-17 03:01:02 -07:00
Lawrence Chen
dfcbaa3220
Fix SSH remote CLI and loopback proxy follow-ups 2026-03-17 01:58:50 -07:00
Lawrence Chen
aac8a41ba2
Fix browser import follow-up review comments 2026-03-17 00:50:02 -07:00
Lawrence Chen
832426af56
Stabilize SSH remote flow after merging main 2026-03-16 23:57:48 -07:00
Lawrence Chen
fdde470dcf
fix: address browser profile review follow-ups 2026-03-16 23:50:43 -07:00
Lawrence Chen
03dc055138
Merge remote-tracking branch 'origin/main' into pr-ssh-stack-main
# Conflicts:
#	CLI/cmux.swift
#	Sources/Panels/BrowserPanel.swift
#	Sources/TabManager.swift
#	Sources/Workspace.swift
#	cmuxTests/GhosttyConfigTests.swift
2026-03-16 23:16:12 -07:00
Lawrence Chen
746fb8e5ec
Merge pull request #318 from manaflow-ai/issue-122-import-browser-cookies-history-settings
Browser: import data from detected installed browsers
2026-03-16 22:42:40 -07:00
Lawrence Chen
92cb42262c
feat: add browser profile mapping import flow 2026-03-16 21:22:39 -07:00
Lawrence Chen
3fbfd74aa1 Fix socket focus and startup env regressions 2026-03-13 21:55:48 -07:00
Lawrence Chen
ca4f4b7c69 Fix browser move and zsh bootstrap regressions 2026-03-13 21:04:48 -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
Lawrence Chen
902ee03019 Fix SSH transport dedupe and loopback review issues 2026-03-13 20:23:44 -07:00
Lawrence Chen
5e7458b920 Fix SSH workspace priming and restore state 2026-03-13 20:01:26 -07:00
Lawrence Chen
2eae782739 Merge remote-tracking branch 'origin/main' into pr-ssh-stack-main
# Conflicts:
#	.github/workflows/ci.yml
#	CLI/cmux.swift
#	Sources/GhosttyTerminalView.swift
#	Sources/SocketControlSettings.swift
#	Sources/TabManager.swift
#	Sources/TerminalController.swift
#	Sources/Workspace.swift
#	ghostty
#	scripts/reload.sh
2026-03-13 17:56:38 -07:00
Lawrence Chen
cd04bb8932
Merge origin/main into feat-cmux-themes-command 2026-03-13 17:22:12 -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
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
Lawrence Chen
85e6a5aae4 Fix ssh stack review regressions 2026-03-13 07:29:22 -07:00
Lawrence Chen
5f074f810e
Fix session restore replay for transient terminal states 2026-03-13 07:20:18 -07:00
Lawrence Chen
b0bfabdb6a Optimize remote daemon builds and TCP latency 2026-03-13 04:34:58 -07:00
Lawrence Chen
21246c7657 Merge origin/main into pr-ssh-stack-main 2026-03-13 04:30:06 -07:00
Lawrence Chen
601e5a92e4 Merge origin/main into pr-ssh-stack-main 2026-03-13 04:18:07 -07:00
Lawrence Chen
9eefc80e32 Share last-surface close handling across close actions 2026-03-13 04:16:59 -07:00
Lawrence Chen
2e6856ff2f Fix ssh stack review regressions 2026-03-13 04:14:52 -07:00
Lawrence Chen
fe7ef33fea
Keep workspaces open when closing the last surface (#1315)
* Add last-surface close regression tests

* Keep workspaces open when closing last surface

* Add Cmd+W last-surface close setting

* Share Cmd+W surface-close path
2026-03-13 03:58:07 -07:00
Lawrence Chen
19b59cae37 Reapply "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying"
This reverts commit f7cbbad434.
2026-03-12 15:54:26 -07:00
Lawrence Chen
f7cbbad434 Revert "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying"
This reverts commit 78e4bd32ba, reversing
changes made to cf75da8f8a.
2026-03-12 14:45:58 -07:00
Lawrence Chen
8985f865e2 Drain timed out remote daemon semaphores 2026-03-12 06:08:27 -07:00
Lawrence Chen
d7d80ff5af Allow concurrent remote daemon RPC calls 2026-03-12 06:01:45 -07:00
Lawrence Chen
4a12dca8a7 Add remote daemon RPC concurrency regression 2026-03-12 05:59:45 -07:00
Lawrence Chen
d98a749737 Make remote daemon test helpers nonisolated 2026-03-12 05:30:39 -07:00
Lawrence Chen
d7353d3aa1 Expose remote daemon test helpers on Workspace 2026-03-12 05:18:01 -07:00
Lawrence Chen
8a9e28e129 Secure remote daemon distribution and relay auth 2026-03-12 05:04:44 -07:00
Lawrence Chen
de47345538 Address ssh review feedback and CI blockers 2026-03-11 23:03:53 -07:00
Lawrence Chen
1b4f396a48 Merge remote-tracking branch 'origin/main' into issue-151-ssh-remote-port-proxying
# Conflicts:
#	Sources/Panels/BrowserPanel.swift
2026-03-11 22:52:47 -07:00
austinpower1258
8aafb68935 Fix browser pane drag/drop follow-ups 2026-03-11 19:16:17 -07:00
austinpower1258
81618bf3cf Fix stale browser pane content after drag splits 2026-03-11 18:46:33 -07:00
austinpower1258
5233874425 ok 2026-03-11 18:32:23 -07:00