Commit graph

35 commits

Author SHA1 Message Date
Austin Wang
7f220dc8e4
Fix sidebar PR badges for restored workspaces (#1570)
* test: cover sidebar PR explicit branch fallback

* fix: restore sidebar PR badges for workspace branches

* test: preserve sidebar PR badge on first prompt

* fix: keep sidebar PR badges through first prompt
2026-03-16 21:09:02 -07:00
BillionClaw
5776cd5d81
fix: remove blocking sleep from preexec hook causing command lag (#1444)
When socket connection mode is not 'off', the shell integration runs
_cmux_stop_pr_poll_loop in the preexec hook before every command.
This function had a blocking 'sleep 0.1' call that caused noticeable
lag on every command execution.

The fix replaces the TERM+sleep+KILL pattern with direct SIGKILL.
The PR poll loop is a lightweight background process that only runs
'gh pr view' periodically - it's safe to kill abruptly without
waiting for graceful termination.

Fixes #1436

Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>
2026-03-15 16:11:07 -07:00
Lawrence Chen
a99ee15672
fix: honor shell state for close confirmation 2026-03-13 15:43:04 -07:00
Lawrence Chen
c69342a276
Fix Pure prompt duplication in Ghostty zsh integration (#1316)
* Add Pure hidden-CR redraw regression

* Fix Pure hidden-CR prompt redraws

* Bundle Ghostty zsh integration in cmux
2026-03-13 02:39:12 -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
b12f70b26c Merge origin/main into issue-151-ssh-remote-port-proxying 2026-03-12 05:09:03 -07:00
Austin Wang
05ad8993b7
Merge pull request #1139 from manaflow-ai/issue-1138-sidebar-pr-badge-detection
Fix sidebar PR badge polling for idle shells
2026-03-11 23:17:06 -07:00
Lawrence Chen
d67090994e Merge branch 'main' into issue-151-ssh-remote-port-proxying 2026-03-11 15:56:47 -07:00
austinpower1258
84edefa945 Fix shell PR poll cleanup regressions 2026-03-10 00:40:57 -07:00
Lawrence Chen
dea60ea71c
Update ghostty to v1.3.0 (#1142)
* Update ghostty to v1.3.0

* Add bell handling and AppleScript support

* Add zsh shell integration handoff test

* Fix Ghostty zsh integration handoff in cmux

* Add terminal keypress notification dismissal test

* Dismiss terminal notifications on keypress

* Address PR review feedback

* Tighten notification dismissal regression test

* Pin GhosttyKit checksum for latest ghostty
2026-03-09 21:32:54 -07:00
Lawrence Chen
bdebc8ecc9 Merge branch 'main' into issue-151-ssh-remote-port-proxying
# Conflicts:
#	CLI/cmux.swift
#	Sources/ContentView.swift
#	Sources/GhosttyTerminalView.swift
#	Sources/Panels/BrowserPanel.swift
#	Sources/Panels/BrowserPanelView.swift
#	Sources/TabManager.swift
#	Sources/TerminalController.swift
#	Sources/Workspace.swift
#	Sources/WorkspaceContentView.swift
#	ghostty
2026-03-09 18:36:59 -07:00
austinpower1258
0ad9775121 Harden sidebar PR polling against stale state 2026-03-09 18:25:47 -07:00
austinpower1258
844d85fe80 Poll sidebar PR status while shells are idle 2026-03-09 18:06:30 -07:00
Austin Wang
b848d60b0d
Merge pull request #925 from jleechanorg/fix-split-cwd-inheritance
Fix split CWD inheritance and bash job notification spam
2026-03-05 20:34:25 -08:00
Austin Wang
6d0c90c8c8
Fix sidebar branch refresh after checkout (issue #666) (#905)
* Fix sidebar branch refresh after checkout

* Fix bash PR probe not refreshing on checkout (PR review feedback)

When HEAD changes (e.g. git checkout), the bash integration now resets
_CMUX_PR_LAST_RUN=0 so the PR probe is forced to re-run immediately.
This matches the zsh integration which already sets _CMUX_PR_FORCE=1
on HEAD change.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:45:04 -08:00
jleechan
4402a5b0ed Fix bash job spam: use disown instead of set +m
set +m only suppresses notifications for jobs started after it runs.
Jobs that complete between prompts still trigger Done output.
Using disown removes jobs from bash job table entirely so bash
never prints completion notifications for them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:03:05 -08:00
jleechan
648f4c00db WORKING: Fix split CWD inheritance and bash job notification spam
- Pass inherited working directory when creating split panes (panelDirectories
  fallback to currentDirectory)
- Suppress bash job-done "[N] Done ..." notifications in shell integration
  by toggling job control (set +m / set -m) around background probes
- Add integration test for split/tab CWD inheritance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:57:01 -08:00
Austin Wang
39a0da2b7e
Fix sidebar branch refresh during agent-driven git checkout (#671) 2026-03-04 19:13:19 -08:00
Austin Wang
34c6250a37
Respect shell-integration=none in zsh wrapper (#816) 2026-03-03 16:22:38 -08:00
Lawrence Chen
9f18ae7f96 fix resize scrollback retention and harden remote ssh cmd+d resize regression 2026-03-01 04:41:11 -08:00
austinpower1258
2fd5d06bac fix(shell): prevent GUI cmux from shadowing CLI on PATH 2026-02-26 14:43:03 -08:00
austinpower1258
213bda5e14 Fix sidebar git branch recovery after sleep/wake (#494) 2026-02-25 15:36:51 -08:00
Lawrence Chen
f28eb00b31 Merge remote-tracking branch 'origin/main' into feature/sidebar-pr-metadata
# Conflicts:
#	Sources/ContentView.swift
#	Sources/Workspace.swift
2026-02-24 20:49:29 -08:00
Vadim Kostin
2d454df50f feat(sidebar): show linked pull request metadata 2026-02-23 10:45:36 +08:00
Lawrence Chen
927b0eb2d1 Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
Lawrence Chen
60e7aeeb16 Fix stale sidebar git branch after split close 2026-02-20 21:47:06 -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
9642bb59fc
Move port scanning from shell to app-side with batching (#100)
* Move port scanning from shell to app-side with batching

Replace per-shell `ps -axo + lsof` scanning with a centralized
PortScanner singleton in the app. Each shell now sends lightweight
`report_tty` (once per session) and `ports_kick` (on preexec/precmd)
socket messages. The app coalesces kicks across all panels and runs a
single `ps -t <ttys> + lsof -p <pids>` covering every active panel.

Also fixes a macOS 26 Tahoe regression where `getsockopt(LOCAL_PEERPID)`
returns ENOTCONN on accepted sockets when the peer disconnects before
the handler thread starts. This was silently breaking ALL socket
commands sent via ncat --send-only. The fix captures the peer PID in
the accept loop immediately after accept(), and falls back to
LOCAL_PEERCRED (uid check) when the PID lookup fails.

* Fix PR review feedback: burst timing and auth comment clarity

- P2: burstDelays were accumulating (0.5+1.5+3+... = ~22.5s) instead of
  firing at absolute offsets from burst start. Now uses burstStart anchor
  so scans fire at 0.5s, 1.5s, 3s, 5s, 7.5s, 10s as intended.

- P1: Clarify LOCAL_PEERCRED fallback rationale — same security boundary
  as socket file permissions (0600), does not widen attack surface.
  Long-lived connections still get full descendant check via LOCAL_PEERPID.
2026-02-19 01:04:47 -08:00
Austin Wang
65ac29d827
Fix zsh git branch refresh race after cwd change (#71)
* Fix zsh git branch refresh race after cwd change

* Clarify intentional duplicate cwd check in git refresh path

* Add Metal Toolchain download step to CI and release workflows

Fixes build failure when compiling Metal shaders for iOS xcframework
targets — the self-hosted runner needs `xcodebuild -downloadComponent
MetalToolchain` installed before `xcrun metal` can run.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:36:27 -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
9817d131f8
Release v1.23.0 (#31)
* Rename cmuxterm to cmux across entire codebase

- Rename GitHub repos: manaflow-ai/cmuxterm -> manaflow-ai/cmux,
  manaflow-ai/homebrew-cmuxterm -> manaflow-ai/homebrew-cmux
- Rename bundle IDs: com.cmuxterm.app -> com.cmux.app
- Rename CLI: CLI/cmuxterm.swift -> CLI/cmux.swift
- Rename homebrew submodule: homebrew-cmuxterm -> homebrew-cmux
- Update all socket paths: /tmp/cmuxterm*.sock -> /tmp/cmux*.sock
- Update all GitHub URLs, DMG names, Sparkle URLs
- Update all source files, scripts, tests, docs, CI workflows

* Bump version to 1.23.0
2026-02-09 15:30:43 -08:00
Lawrence Chen
7d6f33c143
Sidebar status as text + detect git HEAD changes instantly (#30)
* Sidebar status as text + detect git HEAD changes instantly

- Replace sidebar status pills with plain text + show more/less toggle
  for a cleaner, more readable sidebar layout
- Watch .git/HEAD mtime in zsh precmd to detect branch changes from
  aliases (gco), tools (gh pr checkout), etc. without waiting for the
  3s polling interval
- Fix NSImage shared instance mutation in DraggableFolderNSView by
  copying before resizing to prevent layout side-effects
- Fix set_status --tab flag being swallowed by -- stop token via
  new parseOptionsNoStop parser
- Update sidebar test to cover alias-based branch switching

* Append status text to notification body automatically

When creating notifications, include the tab's current status entries
in the notification body so users see context (e.g. git branch, ports)
alongside the notification message.

* Add screenshot to README
2026-02-09 14:18:33 -08:00
Lawrence Chen
e9c5917c66
Fix zsh autosuggestions shared history in cmuxterm (#26)
- Restore real ZDOTDIR early in zsh startup so HISTFILE uses user history\n- Preserve user ZDOTDIR without treating Ghostty injected ZDOTDIR as user\n- Add regression tests and terminfo overlay for bright colors
2026-02-09 02:35:20 -08:00
Lawrence Chen
20c62b3b9a
Fix CI race condition on self-hosted runner (#19)
* Fix zsh ZDOTDIR wrapper + log parsing with -- messages

* Fix CI race condition: serialize self-hosted builds with concurrency group

Two workflows racing on the same self-hosted runner caused DerivedData
corruption (release's rm -rf nuked DerivedData while CI was building).
Add shared concurrency group and scope DerivedData cleanup to project.
2026-02-06 22:32:14 -08:00
Lawrence Chen
7e69751e1b
Sidebar metadata + tagged reload isolation (#16)
* Sidebar primitives + tagged dev isolation

* Allow wider sidebar resize

* Fix tagged socket selection + panel id errors

* Fix progress label quoting + bundle suffix sanitize

* Skip ctrl-enter keybind test when keystrokes blocked

* Fix shell nc hang + prune stale per-surface sidebar metadata
2026-02-06 18:09:56 -08:00