Repository navigation
Add regression coverage for terminal grow resize flush - #8293
Closed
austinywang wants to merge 2 commits into
Closed
austinywang wants to merge 2 commits into
austinywang wants to merge 2 commits into
Conversation
Contributor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Root cause
The affected nightly could apply an intermediate narrow surface size during a divider drag, then lose/coalesce the final wider anchor notification. At that point
TerminalWindowPortalRegistry.endInteractiveGeometryResizeonly ended the interaction; it did not schedule a final geometry reconciliation. Nothing called the final Ghostty surface/PTY resize, so the TUI remained at the narrow width.The dropped layer was therefore portal interaction end → final surface/PTY resize, not Ghostty grid reflow or scrollback compression.
Merged PR #8240 fixed the shared boundary: the zero crossing of the window-scoped interactive geometry transaction schedules one settled portal synchronization, which applies the exact final renderer and PTY dimensions. That is the architectural invariant this test locks in; no repaint kick, polling, or sleep-based repair is involved.
Regression evidence
The fixture reproduces the report deterministically:
Against affected nightly commit
1c22c5564, the test fails:Because the runtime fix was already merged through #8240 before this issue branch was finalized, a two-commit red/fix sequence in this PR would be artificial. The red run above is from the exact historical runtime; this PR contains one regression-test commit.
Against current main
de74852e5con an AWS M4 Pro running macOS 15.7.4 / Xcode 26.3, the focused app-host test passes:The second selected test initializes the app-host routing fixture required by direct
xctestexecution.Link to #8229
This is the grow-direction manifestation of the same interactive sizing transaction fixed for #8229 by #8240. The #8229 investigation ruled out Ghostty scrollback compression; no Ghostty submodule change is needed here.
Validation
cmux-unitbuild-for-testingsucceededxctest: 2 tests, 0 failuresgit diff --check./scripts/check-pbxproj.sh./scripts/lint-pbxproj-test-wiring.shpython3 scripts/check-workspace-package-groups.py --checkpython3 scripts/check-package-resolved-policy.pyCurrent main no longer contains
.github/swift-file-length-budget.tsvorscripts/swift_file_length_budget.py(removed by #8125); this PR does not recreate or modify them. The touched test file remains 224 lines.No user-facing strings changed, so localization catalogs are unaffected.
Closes #8285