Commit graph

117 commits

Author SHA1 Message Date
Austin Wang
867c93e4fa
Keep cmux browser Find shortcuts authoritative (#2356)
* Route browser Find shortcuts through web content first

* Keep cmux browser Find shortcuts authoritative

* Add browser Find inspector regression test

* Fix browser Find routing follow-ups
2026-03-30 03:16:10 -07:00
Lawrence Chen
95914243c3
Fix UI regression test self capture 2026-03-25 17:51:15 -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
99ca3c9b9a
Fix sidebar update pill cached popover flow (#2142)
* test: cover cached update pill first-click flow

* fix: use cached sidebar update popover
2026-03-25 04:21:03 -07:00
Austin Wang
ffb660dee8
Fix first click on detected update pill (#2117) 2026-03-25 00:51:34 -07:00
Austin Wang
56602066a1
Revert Sparkle manual update dialog flow from #1908 (#2090)
* Restore inline sidebar update checks and embed appcast changelog

* Revert Sparkle manual update dialog flow
2026-03-24 20:44:54 -07:00
austinpower1258
b5fb304af0 Handle headless CI runners in browser find focus UI test
On WarpBuild runners without a GUI session, XCUIApplication.launch()
blocks ~60s then fails with "Failed to activate application (current
state: Running Background)". Wrap launch() in XCTExpectFailure so the
test can continue — keyboard and element APIs work via accessibility
even when the app is in .runningBackground.

Increase test execution time allowance from 120s to 180s to account
for the 60s activation timeout on headless runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 04:46:18 -07:00
austinpower1258
81aaa8e2d0 Fix UI test harness validation: make startPath optional
The CI display helper now uses --start-delay-ms instead of --start-path
because the XCTest sandbox prevents writing to /tmp/. The harness manifest
no longer includes startPath, but the test guard still required it, causing
"Incomplete external display harness configuration" errors.

Make startPath optional in both the manifest and environment variable
harness loading paths, and gate the start signal write on displayStartPath
being non-empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 04:26:30 -07:00
austinpower1258
82a9ccf218 Fix sandbox file write issue: use start-delay-ms for display helper
The sandboxed XCTest runner can't write the start signal file to /tmp/.
Added --start-delay-ms to create-virtual-display.m as alternative to
--start-path. CI uses 10s delay so the test captures baseline render
stats before churn begins. Test skips start signal write when
pre-launched.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 04:16:57 -07:00
austinpower1258
0c4415ceba Pre-launch app from CI shell to escape XCTest sandbox
The XCTest runner is sandboxed, causing Process-spawned apps to
inherit sandbox restrictions. The CI step now:
1. Builds for testing first (separate step)
2. Launches display helper and app from the shell (non-sandboxed)
3. Waits for app diagnostics and render stats
4. Writes manifests for the test to find the pre-launched state
5. Runs test-without-building

The test detects the pre-launch manifest and skips its own app launch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 04:05:46 -07:00
austinpower1258
6233f1b2f0 Use Process with sandbox-aware temp paths for UI test app launch
The Process-spawned app inherits the test runner's sandbox. Previous
attempts failed because diagnostics used hardcoded /tmp/ which the
sandboxed app can't write to. Now using FileManager.temporaryDirectory
for all temp paths (resolves to the sandbox container's tmp), and
inheriting the full test runner environment so the child shares the
same sandbox context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 03:43:26 -07:00
austinpower1258
79aae4fe83 Use NSWorkspace with activates=false to launch app in UI test
Root cause: Process inherits the XCTest runner's sandbox, preventing
the app from writing diagnostics to /tmp/. NSWorkspace.openApplication
goes through LaunchServices, which launches the app in its own process
context outside the sandbox. Using activates=false avoids the 60s
foreground activation timeout that killed the previous NSWorkspace
attempt on headless CI runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 03:34:56 -07:00
austinpower1258
eee5862ca7 Add verbose diagnostics to display resolution UI test launch failure
Include the app's stdout/stderr log contents and full env dump in the
error message so we can see what happens on CI when the app runs but
doesn't write diagnostics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 03:23:25 -07:00
austinpower1258
e4ef74c8b2 Fix env contamination in Process-based UI test app launch
The test runner's environment contains XCTest variables
(DYLD_INSERT_LIBRARIES, XCInjectBundle, etc.) that cause the app to
hang when inherited by a Process-launched binary. Pass only system
essentials + our CMUX_UI_TEST_* vars, matching how the smoke test
launches the app with a clean environment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 03:14:29 -07:00
austinpower1258
88751b2d12 Launch app binary directly via Process in display resolution UI test
The smoke test (smoke-test-ci.sh) passes on the same WarpBuild runners
because it launches the binary directly. XCUIApplication.launch() and
NSWorkspace.openApplication both require foreground activation which
fails on headless CI runners since ~04:00 UTC 2026-03-23. Running the
binary directly via Process works without WindowServer activation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 02:59:49 -07:00
austinpower1258
ae064802c6 Use NSWorkspace to launch app in display resolution UI test
XCUIApplication.launch() hard-fails with a 60-second timeout when
it can't foreground the app on headless CI runners. This test never
uses XCUIApplication for interaction (no taps/keys) — it only reads
a diagnostics file.

Replace with NSWorkspace.openApplication which launches through
Launch Services, passes env vars via OpenConfiguration, and returns
immediately without blocking on activation failure.

Also add CI retry loop since runner environment is flaky.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 02:48:31 -07:00
austinpower1258
fc858fcfa4 Revert UI test foreground activation changes back to 56a4d258
Reverts cbb21872, 54ec524a, 10fd323b, 75375ab7, 82a16aa7 — all
attempts to fix display resolution UI test foreground activation
on CI that introduced regressions. Restores the state from the
last fully green CI run (56a4d258).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 02:38:06 -07:00
austinpower1258
82a16aa746 Replace XCUIApplication with NSWorkspace for display regression test
XCUIApplication.launch() blocks for 60 seconds trying to foreground
the app on headless CI runners, then hard-fails the test (not
recoverable with continueAfterFailure). This test doesn't need
XCUIApplication — it never taps buttons or types keys, it only reads
a diagnostics file.

Switch to NSWorkspace.openApplication which:
- Launches through Launch Services (proper macOS app lifecycle)
- Passes environment vars via OpenConfiguration
- Returns immediately with NSRunningApplication handle
- Doesn't block or hard-fail on activation issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 02:29:45 -07:00
austinpower1258
75375ab7af Fix display resolution UI test foreground activation on CI
XCUIApplication.launch() fails to activate the app on headless CI
runners, reporting "Failed to activate application (current state:
Running Background)". With continueAfterFailure=false, this kills the
test before ensureForegroundAfterLaunch can retry.

Fix by temporarily setting continueAfterFailure=true around launch(),
then retrying activation via app.activate(). Also add a retry loop in
the CI workflow since foreground activation is inherently flaky on
headless runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 02:19:12 -07:00
austinpower1258
10fd323bb0 Fix display regression UI test launch gating 2026-03-23 02:05:07 -07:00
austinpower1258
54ec524a63 Fix display regression launch on CI runner 2026-03-23 01:54:29 -07:00
Austin Wang
661a4e8c7f
Merge pull request #1908 from manaflow-ai/issue-1906-update-dialog-double-press
Fix Sparkle update dialog requiring two presses
2026-03-22 13:19:01 -07:00
austinpower1258
44b4374f2a fix: harden Sparkle manual update dialog flow 2026-03-21 15:19:31 -07:00
austinpower1258
f0dcdf90e9 test: cover first-click Sparkle dialog regression 2026-03-20 23:06:44 -07:00
Lawrence Chen
a592ed126a
Add failing regression test for browser find focus (#1891)
* test: add browser find focus regression

* ci: run browser find focus regression on prs

* ci: merge pr ui regressions into one job

* fix: focus browser find after navigation

* test: rename ui regressions workflow guard

* Fix browser find focus after address bar navigation

* Fix test-e2e workflow manifest script

* Address PR review feedback

* Stabilize browser focus regression on CI

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-20 22:12:26 -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
b4b345d4ad
Add command palette minimal mode toggle UI test 2026-03-18 04:13:01 -07:00
Lawrence Chen
1e908b2b75
Merge origin/main into feat-hidden-titlebar-minimalism-reset 2026-03-18 04:05:43 -07:00
Lawrence Chen
d63f852719
Stabilize command palette ordering UI test 2026-03-18 03:34:36 -07:00
Lawrence Chen
fbe209cb33
Read the prebuilt display helper path from the harness manifest 2026-03-18 03:30:32 -07:00
Lawrence Chen
7fb1f50966
Launch display helper from inside the UI test sandbox 2026-03-18 03:22:04 -07:00
Lawrence Chen
2c81192299
Prefer command palette title matches over keywords 2026-03-18 03:13:37 -07:00
Lawrence Chen
b1e2d1cb19
Pass display harness manifest path into UI test 2026-03-18 01:40:04 -07:00
Lawrence Chen
798c1fbc42
Fix laggy terminal sync during sidebar drags (#1598)
* Fix sidebar drag terminal resize lag

* Add display resolution churn regression

* Prelaunch display churn helper in e2e workflow

* Use manifest handoff for display churn UI test

* Fix e2e display churn harness startup

* Resolve display churn UI test socket path

* Use marker-based socket discovery in display UI test

* Add failing sidebar drag portal regression tests

* Fix sidebar drag terminal portal resize lag

* Add failing scoped resize regression tests

* Fix terminal portal resize scheduling lag

* Add failing zsh resize prompt regression test

* Fix zsh resize prompt duplication

* Fix Sequoia sidebar resize regression

* Guard display-resolution CI runner

* Run display-resolution CI on WarpBuild

* Allow backgrounded display regression app launch

* Launch display regression app directly

* Launch display regression app via NSWorkspace

* Load display regression launch env from manifest

* Write display regression manifest in runner temp dir

* Write display regression manifest in shared tmp

* Write display regression manifest in repo scratch dir

* Launch display regression app with explicit env

* Avoid xcodebuild broken pipe in compat CI

* Launch display regression via XCUIApplication

* Harden display regression socket readiness

* Trust display socket diagnostics path

* Replace display socket probe with render diagnostics

* Write display churn start marker atomically

* Move display churn harness out of /tmp

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-18 01:28:11 -07:00
Lawrence Chen
e505782a31
Merge remote-tracking branch 'origin/main' into feat-hidden-titlebar-minimalism-reset 2026-03-17 20:06:43 -07:00
Lawrence Chen
3bca43d6b1
fix(command-palette): address follow-up review comments
PR: https://github.com/manaflow-ai/cmux/pull/1644
2026-03-17 18:59:13 -07:00
Lawrence Chen
90e573b68f
Merge origin/main into feat-hidden-titlebar-minimalism-reset 2026-03-17 17:37:28 -07:00
Lawrence Chen
018510d4ef Add failing command palette blink regression test 2026-03-17 17:15:33 -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
Lawrence Chen
d369778f7f
Scroll settings hint to import controls 2026-03-17 04:48:21 -07:00
Lawrence Chen
9807cb087b
Stabilize browser import hint UI tests 2026-03-17 03:14:23 -07:00
Lawrence Chen
b9de0f0446
Add browser import hint debug variants 2026-03-17 03:01:50 -07:00
Lawrence Chen
f97716939a
Add browser import UI test launch hook 2026-03-17 02:29:39 -07:00
Lawrence Chen
7bb7564726
Stabilize browser import menu test flow 2026-03-17 02:18:58 -07:00
Lawrence Chen
3c549b4cb8
Fix browser import UI test harness 2026-03-17 02:06:50 -07:00
Lawrence Chen
ffcd3fdfaa
Tighten browser import sheet UI 2026-03-17 01:51:57 -07:00
Lawrence Chen
aac8a41ba2
Fix browser import follow-up review comments 2026-03-17 00:50:02 -07:00
Lawrence Chen
b0d994c99f
Fix UI test helper closure captures 2026-03-17 00:14:28 -07:00