Commit graph

504 commits

Author SHA1 Message Date
Mikhail Andreev
cfe6cf89d8
fix: keyboard shortcuts not working with Russian layout (#2202)
* fix: keyboard shortcuts not working with Russian and other non-Latin layouts

When a non-Latin input source (Russian, etc.) is active, event characters
are non-ASCII. The ANSI keyCode fallback was blocked when the layout-based
translation resolved a character, leaving no safety net. Now the keyCode
fallback is always available for non-Latin layouts, matching the physical
key position — similar to Ghostty's `physical:` keybinding behavior.

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

* test: add unit tests for Russian keyboard layout shortcut matching

Two tests for Cmd+T with non-Latin (Russian) keyboard layout:
1. Layout provider returns "t" (normal ASCII fallback) — verifies
   the layout-based matching path works with Cyrillic event chars.
2. Layout provider returns nil (translation failure) — verifies the
   ANSI keyCode fallback catches the shortcut by physical key position.

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

* fix: scope ANSI keyCode fallback to non-ASCII events, add Russian to comments

Address review feedback:
- Split !hasUsableEventChars into two precise conditions:
  (hasEventChars && !eventCharsAreASCII) for non-Latin layouts, and
  (!hasEventChars && layoutCharacter empty) for synthetic/empty-char events.
  This prevents unintended keyCode fallback on Dvorak/Colemak with empty
  synthetic events.
- Add "Russian" to the non-Latin layout list in the guard comment at line 10626.

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:25:36 -07:00
Austin Wang
fe0443fa2b
Fix Cmd+N nightly crash: avoid local Workspace refs in ARC hotpath (#2204)
* test: reproduce Cmd+N snapshot workspace lifetime race

* fix: retain snapshot workspaces through Cmd+N creation

* fix: repair workspace lifetime regression test

* fix: extract workspace config through self to avoid Xcode 16.x ARC crash

The snapshot approach (c1998e34) navigated workspace → panel → surface
through local variables. Xcode 16.4's -O ARC optimizer aggressively
elides retains on these locals through inlined call chains, causing
use-after-free on every Cmd+N in CI-built nightlies.

Fix: extract preferredWorkingDirectory and inheritedTerminalFontPoints
through self (always retained) BEFORE capturing locals. The snapshot
is now purely value-typed with no Workspace references held in locals.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 14:28:32 -07:00
Austin Wang
61e6a0e2b9
Fix Release-only Cmd+N workspace snapshot UAF (#2181)
* test: reproduce Cmd+N snapshot workspace lifetime race

* fix: retain snapshot workspaces through Cmd+N creation

* fix: repair workspace lifetime regression test
2026-03-25 19:12:24 -07:00
Lawrence Chen
18531fd78e
Merge pull request #2174 from manaflow-ai/task-pr-2089-followup-comments
Fix command palette follow-up review comments
2026-03-25 18:24:37 -07:00
Austin Wang
b93be12b08
Fix Cmd+N crash from workspace creation config snapshots (#2178)
* Add workspace config sanitization regression test

* Sanitize workspace creation config snapshots

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 18:10:25 -07:00
Lawrence Chen
0a1d8c2289
Skip SSH cleanup after moving the last remote surface (#2123)
* Add regression test for detached remote cleanup

* Skip SSH cleanup after remote surface transfer

* Add SSH lifecycle regression coverage

* Add SSH detach cleanup transfer regressions

* Transfer SSH cleanup ownership with detached remote terminals

* Document intentional SSH workspace focus

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 17:51:56 -07:00
Lawrence Chen
9295a7f676
Add command palette follow-up regressions 2026-03-25 17:40:38 -07:00
Lawrence Chen
8a3ab6b3f0
Fix command palette focus after terminal find (#2089)
* test: cover command palette focus guard

* fix: block terminal find from stealing palette focus

* test: cover text view focus-stealer fallback

* Add regression for hidden DevTools sync republish loop

* Avoid redundant DevTools visibility publishes

* test: cover browser find focus after workspace round-trip

* fix: restore browser find focus after workspace round-trip

* fix: keep browser find caret on workspace return

* Add workspace round-trip split find regressions

* Keep inactive find overlays from stealing focus

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 17:27:54 -07:00
Austin Wang
cbf08459d6
Fix Cmd+N workspace creation snapshot crashes (#2173)
* Add regression tests for Cmd+N workspace snapshot mutations

* Fix Cmd+N workspace creation snapshot races
2026-03-25 16:52:04 -07:00
Austin Wang
9f2adce830
fix: guard inherited terminal config against stale surfaces (#2101)
* test: add stale inherited surface regression

* fix: guard inherited terminal config against stale surfaces

* fix: address stale surface review feedback
2026-03-25 16:49:54 -07:00
Austin Wang
11a841e020
Merge pull request #2133 from manaflow-ai/issue-2131-cmd-n-crash-regression
Fix Cmd+N crash from stale workspace creation snapshots
2026-03-25 02:40:57 -07:00
austinpower1258
ad2c65e0ac Add regression test for Cmd+N snapshot close race 2026-03-25 02:38:10 -07:00
Austin Wang
71a64a1234
Fix titlebar double-click zoom handling (#2130) 2026-03-25 02:15:15 -07:00
Austin Wang
0ea16b12c2
Fix window position restore on relaunch (#2129)
* test: cover accessible window frame restore

* fix: preserve accessible window frame on relaunch
2026-03-25 02:05:13 -07:00
Austin Wang
da70f3fa47
Add regression coverage for Cmd+N workspace creation crash (#2127)
* Add Cmd+N workspace snapshot regression coverage (#2017)

* Add dev flag to stress Cmd+N workspace creation
2026-03-25 01:50:57 -07:00
jorge g
68ff39c444
Fix Ghostty resize_split keybind support (#1899)
* test: add resize_split regression coverage

* fix: implement Ghostty resize_split behavior

* test: cover more resize_split cases

* test: deduplicate split snapshot helper

* Resolve merge conflict: keep both splitNodes and waitForCondition helpers

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 00:26:27 -07:00
Lawrence Chen
a7e5050552
Fix SSH control master cleanup on remote teardown (#2104)
* test: add SSH control master cleanup regressions

* fix: close SSH control master on remote teardown

* test: keep SSH workspace after child exit

* fix: keep SSH workspace after child exit

* fix: keep connecting SSH workspaces after child exit

* test: add SSH child-exit demotion regression

* fix: keep SSH workspace after connected shell exit

* fix: address SSH cleanup review feedback

* test: cover SSH cleanup without explicit controlpath

* fix: clean up SSH control masters without explicit controlpath

* test: cover remote detach cleanup edge cases

* fix: preserve SSH sessions during remote detach

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 00:01:39 -07:00
Austin Wang
321f8c14c8
fix(browser): keep IME Enter on composition path (#2108)
* test: cover browser IME Enter composition routing

* fix(browser): keep IME Enter on composition path
2026-03-24 22:56:55 -07:00
Austin Wang
983ef2537d
Skip sidebar PR lookup on main/master (#2110) 2026-03-24 22:56:40 -07:00
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