Commit graph

535 commits

Author SHA1 Message Date
Pratik Pakhale
b9c656b90c
feat: cmux.json for custom commands (#2011)
* Pre-launch app for browser UI test on headless CI runners

XCUIApplication.launch() blocks ~60s then fails on headless WarpBuild
runners because foreground activation requires a GUI login session.

Apply the same pre-launch strategy used for the display resolution test:
- CI shell launches the app with env vars before running xcodebuild
- Test detects pre-launched app via manifest, uses activate() instead of
  launch() to avoid killing and relaunching the app
- Falls back to clicking the window for focus via accessibility framework

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

* Revert "Pre-launch app for browser UI test on headless CI runners"

This reverts commit a540e2fd99aaa1395b91a8d50caa797cdd7551b8.

* feat: cmux.json for custom commands

* tests: add cmux  json tests

* fix: pr review feedback: validation, translations, input handling, and palette improvements

  - Fix Danish ("Overfladedef inition") and Norwegian ("rotmapp") translation typos
  - Add empty-string check for baseCwd fallback in command palette handlers
  - Coalesce \r\n into single Return keypress in sendInput
  - Redact command text from timeout log to prevent secret leakage
  - Add decode-time validation: reject hybrid/empty commands, ambiguous layout
    nodes, wrong split children count, and empty pane surfaces
  - Namespace custom command IDs with "cmux.config.command." prefix
  - Forward command description to palette subtitle when available
  - Update tests for new validation rules and ID prefix

* fix: address PR review feedback — per-window config isolation, blank validation, ancestor walk,
  palette sanitization

* fix: fallback to current dir cmux.json watching if no any cmux.json found in full acesor walk

* ci: trigger CI for fork PR

* Add directory trust for cmux.json command confirmation

The confirm dialog now shows the actual command text and has an "Always
trust commands from this folder" checkbox. When checked, future confirm
commands from that directory skip the dialog.

Trust is scoped to the git repo root if the cmux.json is inside a repo,
so trusting once covers all subdirectories. Non-git directories are
trusted by exact path. Global config is always trusted.

Trusted directories are persisted in ~/Library/Application Support/cmux/
trusted-directories.json.

* Add trusted directories section to Settings

Shows all trusted directories with per-directory revoke buttons and a
Clear All option. Placed in a "Custom Commands" section between
Automation and Browser in Settings.

* Replace trusted directories list with editable textarea

One path per line, with a Save button that activates on changes.
Users can add, remove, or edit paths directly.

* Auto-save trusted directories on edit, remove Save button

Matches the behavior of other textarea settings (browser host
whitelist, external URL patterns) which auto-save via @AppStorage.

* Sanitize command text in confirm dialog against BiDi attacks

Strip zero-width and BiDi override characters from the command preview
so the dialog shows exactly what will be executed.

---------

Co-authored-by: austinpower1258 <austinwang115@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-24 22:28:46 -07:00
Hiroki Kajiwara
a395e8c343
fix: prevent Japanese IME confirmation Enter from executing command (#2075)
* fix: prevent Japanese IME confirmation Enter from executing command

Korean IME commits a syllable and executes on a single Enter, but
Japanese/Chinese IME use Enter only to confirm conversion — a second
Enter is needed to execute. Restrict the extra Return forwarding in
shouldSendCommittedIMEConfirmKey to Korean input sources only.

* refactor: use case-insensitive check for Korean input source ID
2026-03-24 22:24:13 -07:00
Austin Wang
22448197de
Fix Ghostty font-family fallback chain regression (#1308)
* test: add font-family fallback regression coverage

* fix: preserve Ghostty font-family fallback chains

* fix: align CJK fallback scan with Ghostty config semantics

* fix: reuse app support config selection for CJK scan
2026-03-24 22:23:27 -07:00
Matthew Z.
818864dd4a
Fix sidebar notification persisting after being read (#1933)
* Fix sidebar notification persisting after being read

latestNotification(forTabId:) fell back to latestByTabId when no
unread notifications existed, causing read notifications to persist
in the sidebar even after the user marked them as read, killed all
processes, or switched branches. The sidebar should only display
unread notifications.

Remove the fallback to latestByTabId so the sidebar notification
text clears once all notifications for a workspace are read.

Fixes #1642

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Update test expectation for unread-only latestNotification semantics

After markRead, latestNotification(forTabId:) now returns nil since
it no longer falls back to read notifications. Update the test
assertion to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: CHE-3 <schumannzheng@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:54:41 -07:00
Austin Wang
7ffa447708
Fix sidebar badges not refreshing on workspace state change (#2046)
* Add regression test for stale sidebar PR refresh

* Refresh sidebar badges when workspace metadata changes

* Resolve gh for app-side PR probes

* Coalesce sidebar redraws during prompt updates
2026-03-24 19:18:18 -07:00
Lawrence Chen
9b3a6ba28b
Merge pull request #2025 from manaflow-ai/issue-1357-ghost-terminal-sidebar-bleed
Fix #1357: hide stale terminal portal after restore churn
2026-03-24 18:32:31 -07:00
Lawrence Chen
8c0aee3155
test: clarify stale portal rebind sync points 2026-03-24 00:04:30 -07:00
austinpower1258
e41f39bd75 test: cover stale terminal portal after restore-like rebind 2026-03-23 19:18:53 -07:00
Lawrence Chen
4f5a3174e6
Clarify workspace insertion regression test 2026-03-23 19:16:39 -07:00
Lawrence Chen
202a699747
Add regression test for workspace insertion 2026-03-23 19:10:33 -07:00
Lawrence Chen
da1bfedb87
Merge pull request #1965 from manaflow-ai/task-scrollbar-fix-mainline
Preserve explicit wheel scrollback against passive follow
2026-03-22 18:51:15 -07:00
Lawrence Chen
7634abe616
Add regression test for wheel scrollback follow bug 2026-03-22 18:11:00 -07:00
Austin Wang
fd279bdcec
Fix splitter hitbox overlap and terminal scrollbar width resync (#1950)
* test: add splitter and scrollbar regressions

* fix: narrow sidebar overlap and resync terminal width

* test: unwrap pending surface width in scrollbar regression

* fix: restore hosted inspector divider drag path
2026-03-22 18:06:11 -07:00
Lawrence Chen
01ffeb3f44
Merge pull request #1898 from manaflow-ai/feat-tmux-notification-attention-state
Improve tmux notification attention routing
2026-03-22 15:36:36 -07:00
austinpower1258
fd1376d2d5 fix: update WorkspaceShortcutMapper tests to match renamed API from #1951
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:04:36 -07:00
Austin Wang
76c1e632f0
Merge pull request #1895 from manaflow-ai/issue-1863-pinned-workspace-close-protect
Confirm before closing pinned workspaces
2026-03-21 12:36:55 -07:00
Lawrence Chen
5cef77e456
Self-heal tmux attention routing for cmux panes 2026-03-21 03:26:11 -07:00
Lawrence Chen
f0fb098d3b
Add tmux stale-surface routing regression tests 2026-03-21 03:04:53 -07:00
Lawrence Chen
af5207db3c
Add tmux surface scope regression tests 2026-03-21 02:46:18 -07:00
Lawrence Chen
c325e2b49d
Add tmux shell environment regression tests 2026-03-21 02:22:00 -07:00
Lawrence Chen
c2065b135d
Fix SSH image transfer cleanup and IPv6 followups (#1907)
* Add SSH image transfer followup regressions

* Fix SSH image transfer ownership and IPv6 followups

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-20 22:04:52 -07:00
Lawrence Chen
43c61f6e63
Fix SSH image transfer followups (#1904)
* Add regressions for SSH image transfer followups

* Fix SSH image transfer followup regressions

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-20 21:32:21 -07:00
Austin Wang
cdf8d367b2
Fix browser back navigation history handoff (#1897)
* Add regression test for browser back history

* Fix browser back history handoff

* Fix browser tab favicon not updating on navigation

Two issues caused stale or missing favicons in browser tabs:

1. KVO race: The isLoading observer read webView.isLoading inside a deferred
   Task instead of capturing the KVO change value at observation time. For fast
   navigations (back-forward cache), isLoading flips true→false before the Task
   runs, so handleWebViewLoadingChanged(true) was never called and the old
   favicon was never cleared.

2. SPA favicon discovery: Sites that inject <link rel="icon"> via JavaScript
   (e.g. React apps) had no favicon link in the DOM when didFinish fired. The
   fallback to /favicon.ico often 404'd, leaving the globe icon permanently.
   Now retries the JS query after 600ms to give client-side scripts time to
   add the tag.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:11:56 -07:00
Austin Wang
5c4fab1296
Fix sidebar PR badge detection for workspace branches (#1896)
* test: cover sidebar PR probe selection

* fix: detect sidebar PR badges across github remotes
2026-03-20 21:10:08 -07:00
austinpower1258
0580de44a5 Confirm before closing pinned workspaces 2026-03-20 20:59:43 -07:00
Lawrence Chen
a0485df59c
Add focus notification dismiss regressions 2026-03-20 20:55:41 -07:00
Lawrence Chen
ec6915bfdc
Stop flashing on pane navigation 2026-03-20 20:42:54 -07:00
Lawrence Chen
a41bc97410
Tune navigation flash accent 2026-03-20 20:36:08 -07:00
Lawrence Chen
d4811650d7
Add tmux attention regression tests 2026-03-20 20:18:33 -07:00
austinpower1258
d219a41dd0 Add pinned workspace close regression tests 2026-03-20 19:27:37 -07:00
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
cc0fc557cf
Share browser context with OAuth popups (#1600)
* Add popup browser context regression tests

* Share browser context with OAuth popups

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-20 03:57:36 -07:00
Lawrence Chen
c44e975855 fix: preserve custom commands for focused notifications 2026-03-20 01:11:10 -07:00
Lawrence Chen
d7db13a140 test: cover focused notification sound feedback 2026-03-20 01:11:10 -07:00
김서현
9844913ea1
fix: skip Korean from CJK font-codepoint-map auto-injection (#1700)
* fix: skip Korean from CJK font-codepoint-map auto-injection

The automatic CJK font-codepoint-map injection (PR #1017) maps Korean
ranges to Apple SD Gothic Neo, which has a different style/weight from
the primary terminal font. This overrides Ghostty's native
CTFontCreateForString fallback, which dynamically selects a
better-matching font for Hangul.

Ghostty itself (ghostty-org/ghostty) has no hardcoded CJK font names
and relies entirely on CTFontCreateForString for fallback. For Korean,
this native fallback produces visually consistent results with the
primary font.

Remove the Korean branch from cjkFontMappings() so Ghostty's native
fallback handles Hangul rendering. Japanese and Chinese mappings are
unaffected.

* test: update CJK font mapping tests for Korean removal

- testCJKFontMappingsReturnsAppleSDGothicNeoWithHangulForKorean
  → renamed to testCJKFontMappingsReturnsNilForKoreanOnly
  → asserts nil since Korean is no longer auto-mapped

- testCJKFontMappingsMultiLanguageMapsScriptSpecificRanges
  → renamed to testCJKFontMappingsMultiLanguageSkipsKorean
  → asserts no Apple SD Gothic Neo mapping exists
  → Japanese mappings remain unchanged

---------

Co-authored-by: dante-ad-shield <danate@ad-shield.io>
2026-03-20 00:14:01 -07:00
Austin Wang
638f74f42e
Fix browser pane file drops hanging on Uploading (#1843)
* Add regression test for browser file drop uploads

* Fix browser pane file drop upload lifecycle
2026-03-19 21:23:11 -07:00
Lawrence Chen
944e43ed21
Merge pull request #1799 from manaflow-ai/task-cmux-ssh-notify-blue-border
Fix cmux ssh notify surface targeting
2026-03-19 18:37:03 -07:00
Lawrence Chen
183c5601be
Make remote sidebar directory canonicalization preserve live paths 2026-03-19 01:23:53 -07:00
Lawrence Chen
b301218405
Honor explicit notification surface targets 2026-03-19 01:21:18 -07:00
Lawrence Chen
9841cb50bf
Add notification surface regression test 2026-03-19 01:17:18 -07:00
Lawrence Chen
55ec827d48
Add remote sidebar directory canonicalization regression test 2026-03-19 01:14:47 -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
Lawrence Chen
7cbac356fc
Add optional single-click focus for inactive panes (#1796)
* Add failing first-click pane focus tests

* Enable optional first-click focus for inactive panes

* Address PR review follow-ups

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-19 01:01:10 -07:00
Lawrence Chen
5cab7c4a7b
Fix CI test timeout: stream output, bump to 30m (#1783)
* Fix CI test timeout: stream xcodebuild output and bump timeout to 30m

The test split PR (#1717) applied output streaming (tee) and timeout bump
only to ci-macos-compat.yml, not ci.yml. The main CI tests job was still
capturing all xcodebuild output in a $() subshell (making logs blank) and
using a 20 minute timeout (too tight after the test file split).

Port the same fixes from ci-macos-compat.yml:
- Stream xcodebuild output via tee so CI logs show progress in real time
- Bump timeout-minutes from 20 to 30
- Update the SPM retry guard test for the new tee pattern

* Fix hanging test: auto-confirm window close in last-surface Cmd+W test

testCmdWClosesWindowWhenClosingLastSurfaceInLastWorkspace hung for 26+
minutes on CI because it sent Cmd+W to close the last surface without
setting debugCloseMainWindowConfirmationHandler. The window close path
shows a modal confirmation dialog that blocks the RunLoop indefinitely
on headless runners.

Set the handler to auto-confirm, matching the pattern used by
testCmdCtrlWClosesWindowAfterConfirmation.

* Skip last-surface close test on CI: PTY teardown blocks on headless runners

The confirmation handler fix wasn't sufficient. The hang is in Ghostty
surface/PTY teardown when closing the last terminal surface, not the
window close confirmation. Shell process termination blocks indefinitely
on headless CI runners without a TTY.

Skip with XCTSkip when CI env var is set. The test still runs locally
and can be covered via E2E on runners with virtual displays.

* Skip hanging test via -skip-testing flag in xcodebuild

The CI env var isn't visible inside xcodebuild's test host process, so
the XCTSkip approach didn't work. Use -skip-testing on the xcodebuild
command line instead.

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-18 22:19:37 -07:00
Austin Wang
e203c51c7a
Show update-available banner automatically on launch (#1651)
* Show update-available banner automatically on launch

Probe for updates immediately on launch via Sparkle's
checkForUpdateInformation() so the sidebar surfaces a passive update
indicator without waiting for the 24h scheduler. When Sparkle detects
an available update in the background, the pill now shows
"Update Available: X.Y.Z" with accent styling while the updater is
idle. Clicking it triggers the full interactive update flow.

Also fixes thread safety in delegate callbacks by dispatching
@Published mutations to the main queue.

Closes #1643

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

* Add periodic background update probe every 15 minutes

The launch-only probe wouldn't catch updates published while the app
is already running. Add a repeating 15-minute timer that calls
checkForUpdateInformation() so the sidebar banner appears within a
reasonable window after a new version is published.

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

* Change background update probe interval to 30 minutes

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

* Change update check interval to 1 hour and migrate existing users

Reduce Sparkle's scheduled check interval from 24h to 1h so update
banners appear sooner. Migrate users stuck on the old 24h default by
bumping the migration key to v2. Align background probe interval with
the Sparkle check interval instead of hardcoding 30 minutes.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 12:30:44 -07:00
Lawrence Chen
63e65a7f5c
Merge pull request #1724 from manaflow-ai/feat-display-harness-manifest-env
Fix display harness manifest handoff in UI test
2026-03-18 06:07:56 -07:00
Lawrence Chen
1e908b2b75
Merge origin/main into feat-hidden-titlebar-minimalism-reset 2026-03-18 04:05:43 -07:00
Lawrence Chen
1311d4aec3
Merge pull request #1740 from manaflow-ai/task-command-palette-check-ordering
Fix command palette ordering for check query
2026-03-18 03:52:10 -07:00
Lawrence Chen
e99bc40285
Fix test target build after split test sync 2026-03-18 03:49:24 -07:00
Lawrence Chen
e569254ef3
Wire split test files into build phase, add test timeout (#1743)
The previous PR (#1717) added 15 test files to the pbxproj PBXBuildFile and
PBXGroup sections but missed adding them to the cmuxTests Sources build phase
(F1000005), so they were never compiled in CI.

Also add executionTimeAllowance = 30s to AppDelegateShortcutRoutingTests to
prevent testCmdWClosesWindowWhenClosingLastSurfaceInLastWorkspace from hanging
indefinitely on CI (the actual root cause of the timeout).

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-18 03:25:31 -07:00