Repository navigation
Fix laggy terminal sync during sidebar drags #1598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,537
−41
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
6dd0e68
Fix sidebar drag terminal resize lag
lawrencecchen dc46e4e
Add display resolution churn regression
lawrencecchen 2c2e156
Prelaunch display churn helper in e2e workflow
lawrencecchen 092026e
Use manifest handoff for display churn UI test
lawrencecchen 612408a
Fix e2e display churn harness startup
lawrencecchen 216a4c5
Resolve display churn UI test socket path
lawrencecchen 49c4aed
Use marker-based socket discovery in display UI test
lawrencecchen 968292e
Add failing sidebar drag portal regression tests
lawrencecchen 5d06d70
Fix sidebar drag terminal portal resize lag
lawrencecchen 6051c3d
Add failing scoped resize regression tests
lawrencecchen 876b6dd
Fix terminal portal resize scheduling lag
lawrencecchen 26d1a16
Add failing zsh resize prompt regression test
lawrencecchen 2cf087e
Fix zsh resize prompt duplication
lawrencecchen 8dc2f32
Fix Sequoia sidebar resize regression
lawrencecchen b364416
Guard display-resolution CI runner
lawrencecchen ef1e598
Run display-resolution CI on WarpBuild
lawrencecchen 62eda8d
Allow backgrounded display regression app launch
lawrencecchen c0c62cc
Launch display regression app directly
lawrencecchen 95c0b2c
Launch display regression app via NSWorkspace
lawrencecchen 255edf3
Load display regression launch env from manifest
lawrencecchen f1a6d0e
Write display regression manifest in runner temp dir
lawrencecchen 1819091
Write display regression manifest in shared tmp
lawrencecchen 0af68b2
Write display regression manifest in repo scratch dir
lawrencecchen 98588e0
Launch display regression app with explicit env
lawrencecchen a8734cd
Avoid xcodebuild broken pipe in compat CI
lawrencecchen 9f27e50
Launch display regression via XCUIApplication
lawrencecchen 35af973
Harden display regression socket readiness
lawrencecchen 08b5cf3
Trust display socket diagnostics path
lawrencecchen d2db98b
Replace display socket probe with render diagnostics
lawrencecchen f25628c
Write display churn start marker atomically
lawrencecchen cf9d03f
Move display churn harness out of /tmp
lawrencecchen 895124f
Merge origin/main into task-cyber-resize-lag
lawrencecchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -385,3 +385,137 @@ jobs: | |||||||
| CMUX_LAG_MAX_CHURN_P95_MS=35 \ | ||||||||
| CMUX_LAG_KEY_EVENTS=180 \ | ||||||||
| python3 tests/test_workspace_churn_up_arrow_lag.py | ||||||||
|
|
||||||||
| ui-display-resolution-regression: | ||||||||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||||||||
| runs-on: warp-macos-15-arm64-6x | ||||||||
| timeout-minutes: 25 | ||||||||
| steps: | ||||||||
| - name: Checkout | ||||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||||
| with: | ||||||||
| submodules: recursive | ||||||||
|
|
||||||||
| - name: Select Xcode | ||||||||
| run: | | ||||||||
| set -euo pipefail | ||||||||
| if [ -d "/Applications/Xcode.app/Contents/Developer" ]; then | ||||||||
| XCODE_DIR="/Applications/Xcode.app/Contents/Developer" | ||||||||
| else | ||||||||
| XCODE_APP="$(ls -d /Applications/Xcode*.app 2>/dev/null | sort | tail -n 1 || true)" | ||||||||
| if [ -n "$XCODE_APP" ]; then | ||||||||
| XCODE_DIR="$XCODE_APP/Contents/Developer" | ||||||||
| else | ||||||||
| echo "No Xcode.app found under /Applications" >&2 | ||||||||
| exit 1 | ||||||||
| fi | ||||||||
| fi | ||||||||
| echo "DEVELOPER_DIR=$XCODE_DIR" >> "$GITHUB_ENV" | ||||||||
| export DEVELOPER_DIR="$XCODE_DIR" | ||||||||
| xcodebuild -version | ||||||||
| xcrun --sdk macosx --show-sdk-path | ||||||||
|
|
||||||||
| - name: Download pre-built GhosttyKit.xcframework | ||||||||
| run: ./scripts/download-prebuilt-ghosttykit.sh | ||||||||
|
|
||||||||
| - name: Install zig | ||||||||
| run: | | ||||||||
| ZIG_REQUIRED="0.15.2" | ||||||||
| if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then | ||||||||
| echo "zig ${ZIG_REQUIRED} already installed" | ||||||||
| else | ||||||||
| echo "Installing zig ${ZIG_REQUIRED} from tarball" | ||||||||
| curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz | ||||||||
| tar xf /tmp/zig.tar.xz -C /tmp | ||||||||
| sudo mkdir -p /usr/local/bin /usr/local/lib | ||||||||
| sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig | ||||||||
| sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Replace the Zig lib directory before copying; otherwise an existing install can produce nested Prompt for AI agents
Suggested change
|
||||||||
| export PATH="/usr/local/bin:$PATH" | ||||||||
| zig version | ||||||||
| fi | ||||||||
|
|
||||||||
| - name: Cache Swift packages | ||||||||
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | ||||||||
| with: | ||||||||
| path: .ci-source-packages | ||||||||
| key: spm-ui-display-resolution-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} | ||||||||
| restore-keys: spm-ui-display-resolution- | ||||||||
|
|
||||||||
| - name: Resolve Swift packages | ||||||||
| run: | | ||||||||
| set -euo pipefail | ||||||||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||||||||
| mkdir -p "$SOURCE_PACKAGES_DIR" | ||||||||
|
|
||||||||
| for attempt in 1 2 3; do | ||||||||
| if xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||||||||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||||||||
| -resolvePackageDependencies; then | ||||||||
| exit 0 | ||||||||
| fi | ||||||||
| if [ "$attempt" -eq 3 ]; then | ||||||||
| echo "Failed to resolve Swift packages after 3 attempts" >&2 | ||||||||
| exit 1 | ||||||||
| fi | ||||||||
| echo "Package resolution failed on attempt $attempt, retrying..." | ||||||||
| sleep $((attempt * 5)) | ||||||||
| done | ||||||||
|
|
||||||||
| - name: Run display resolution churn UI regression | ||||||||
| run: | | ||||||||
| set -euo pipefail | ||||||||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||||||||
| HARNESS_DIR="${RUNNER_TEMP}/cmux-display-churn-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" | ||||||||
| mkdir -p "$HARNESS_DIR" | ||||||||
| PREFIX="${HARNESS_DIR}/cmux-display-churn" | ||||||||
| READY_PATH="${PREFIX}.ready" | ||||||||
| DISPLAY_ID_PATH="${PREFIX}.id" | ||||||||
| START_PATH="${PREFIX}.start" | ||||||||
| DONE_PATH="${PREFIX}.done" | ||||||||
| LOG_PATH="${PREFIX}.log" | ||||||||
| MANIFEST_PATH="${HARNESS_DIR}/cmux-ui-test-display-harness.json" | ||||||||
|
|
||||||||
| rm -f "$READY_PATH" "$DISPLAY_ID_PATH" "$START_PATH" "$DONE_PATH" "$LOG_PATH" "$MANIFEST_PATH" | ||||||||
|
|
||||||||
| clang -framework Foundation -framework CoreGraphics \ | ||||||||
| -o /tmp/create-virtual-display scripts/create-virtual-display.m | ||||||||
|
|
||||||||
| /tmp/create-virtual-display \ | ||||||||
| --modes 1920x1080,1728x1117,1600x900,1440x810 \ | ||||||||
| --ready-path "$READY_PATH" \ | ||||||||
| --display-id-path "$DISPLAY_ID_PATH" \ | ||||||||
| --start-path "$START_PATH" \ | ||||||||
| --done-path "$DONE_PATH" \ | ||||||||
| --iterations 40 \ | ||||||||
| --interval-ms 40 \ | ||||||||
| >"$LOG_PATH" 2>&1 & | ||||||||
| VDISPLAY_PID=$! | ||||||||
| trap 'kill "$VDISPLAY_PID" >/dev/null 2>&1 || true; rm -f "$MANIFEST_PATH"' EXIT | ||||||||
|
|
||||||||
| for _ in {1..120}; do | ||||||||
| [ -f "$READY_PATH" ] && break | ||||||||
| sleep 0.25 | ||||||||
| done | ||||||||
| [ -f "$READY_PATH" ] || { | ||||||||
| echo "Display harness failed to start" >&2 | ||||||||
| cat "$LOG_PATH" >&2 || true | ||||||||
| exit 1 | ||||||||
| } | ||||||||
|
|
||||||||
| cat >"$MANIFEST_PATH" <<EOF | ||||||||
| {"readyPath":"$READY_PATH","displayIDPath":"$DISPLAY_ID_PATH","startPath":"$START_PATH","donePath":"$DONE_PATH","logPath":"$LOG_PATH"} | ||||||||
| EOF | ||||||||
| echo "Display harness manifest: $MANIFEST_PATH" | ||||||||
| cat "$MANIFEST_PATH" | ||||||||
|
|
||||||||
| CMUX_UI_TEST_DISPLAY_READY_PATH="$READY_PATH" \ | ||||||||
| CMUX_UI_TEST_DISPLAY_ID_PATH="$DISPLAY_ID_PATH" \ | ||||||||
| CMUX_UI_TEST_DISPLAY_START_PATH="$START_PATH" \ | ||||||||
| CMUX_UI_TEST_DISPLAY_DONE_PATH="$DONE_PATH" \ | ||||||||
| CMUX_UI_TEST_DISPLAY_LOG_PATH="$LOG_PATH" \ | ||||||||
| xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||||||||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||||||||
| -disableAutomaticPackageResolution \ | ||||||||
| -destination "platform=macOS" \ | ||||||||
| -only-testing:cmuxUITests/DisplayResolutionRegressionUITests \ | ||||||||
| test | ||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Use an exact Zig version comparison; the current regex prefix check can incorrectly accept non-required versions.
Prompt for AI agents