Skip to content

Revert "Fix terminal text bleed during live window resize" - #11887

Merged
austinywang merged 1 commit into
mainfrom
revert-11530-issue-11398-resize-text-bleed
Sep 3, 2026
Merged

austinywang merged 1 commit into
mainfrom
revert-11530-issue-11398-resize-text-bleed

Conversation

@austinywang

@austinywang austinywang commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #11530


Summary by cubic

Reverts the fix for terminal text bleed during live window resize (#11530), restoring the previous behavior where surface size updates follow each live-resize tick.

The reverted change introduced a portal-owned deferral phase that held renderer and PTY size writes until the final resize pass, along with view-level clipping invariants and a set of ordering tests. Removing it simplifies live-resize geometry handling but means the text bleed issue that motivated the fix may return.

  • Removes deferred surface size updates, committed renderer size tracking, and the portal live-resize phase state machine.
  • Restores native inLiveResize fallback for standalone and portal-hosted surfaces.
  • Deletes tests covering live-resize deferral ordering and clipping boundaries.

Written for commit ebc4457. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Terminal surfaces now synchronize their size directly with the current window and scroll-view geometry.
    • Resizing updates remain consistent during live window resizing, scrollbar changes, tab drags, and portal layout transitions.
    • Renderer sizing is refreshed more reliably when the graphics layer becomes available.
  • Tests

    • Updated coverage validates drawable-size synchronization and retry behavior across geometry and rendering transitions.

@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Ready Ready Preview Sep 4, 2026 1:55am UTC
cmux41 Ready Ready Preview Sep 4, 2026 1:55am UTC

@austinywang
austinywang merged commit 7fa300e into main Sep 3, 2026
6 of 11 checks passed
@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 37a28514-ecd6-40c8-9b5b-820f3e744c42

📥 Commits

Reviewing files that changed from the base of the PR and between bace77c and ebc4457.

📒 Files selected for processing (7)
  • Packages/macOS/CmuxTerminal/Sources/CmuxTerminal/Surface/TerminalSurface+Sizing.swift
  • Packages/macOS/CmuxTerminal/Sources/CmuxTerminal/Surface/TerminalSurface.swift
  • Sources/GhosttyTerminalView.swift
  • Sources/TerminalWindowPortal.swift
  • cmuxTests/GhosttyDrawableSizeRetryTests.swift
  • cmuxTests/TerminalWindowPortalLayoutPassRefreshTests.swift
  • cmuxTests/TerminalWindowPortalLifecycleHiddenRefreshTests.swift

📝 Walkthrough

Walkthrough

The change removes portal-owned live-resize renderer phases and terminal surface size deferral. Geometry synchronization now uses current target sizes and native window state. Refresh scheduling is simplified, and tests are updated for drawable-size retry behavior.

Changes

Live Resize Synchronization

Layer / File(s) Summary
Remove terminal surface size deferral
Packages/macOS/CmuxTerminal/Sources/CmuxTerminal/Surface/*
Removes the public deferral method, internal flag, and deferred guard from terminal surface sizing.
Synchronize hosted geometry directly
Sources/GhosttyTerminalView.swift, cmuxTests/GhosttyDrawableSizeRetryTests.swift
Uses the current scroll-view target size for surface geometry, synchronizes core geometry during updates, removes committed renderer-size state, and expands drawable retry coverage.
Use native live-resize state
Sources/TerminalWindowPortal.swift, cmuxTests/TerminalWindowPortalLayoutPassRefreshTests.swift, cmuxTests/TerminalWindowPortalLifecycleHiddenRefreshTests.swift
Removes portal live-resize phases and resize-held refresh queues. Synchronization and refresh gates now use native window state. Obsolete live-resize regression coverage is removed.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AppKitWindow
  participant TerminalWindowPortal
  participant GhosttyTerminalView
  participant TerminalSurface
  AppKitWindow->>TerminalWindowPortal: Send resize notification
  TerminalWindowPortal->>GhosttyTerminalView: Synchronize hosted geometry
  GhosttyTerminalView->>TerminalSurface: Synchronize surface size
  TerminalSurface->>TerminalSurface: Update size and assigned grid
Loading

Suggested reviewers: azooz2003-bit, ejc3, lawrencecchen

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-11530-issue-11398-resize-text-bleed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 4, 2026
3812562 refactor(tui): centralize terminal input classification (manaflow-ai#11855)
7d0385f Axiom: failure rate and latency per third-party endpoint (Freestyle, Stack Auth, Stripe, ...) (manaflow-ai#11779)
ed5e826 refactor(tui): share frontend focus target mapping (manaflow-ai#11861)
7fa300e Revert "Fix terminal text bleed during live window resize (manaflow-ai#11530)" (manaflow-ai#11887)
bace77c perf(cmux-tui): avoid front-shifting layout nodes (manaflow-ai#11860)
9f8a74f cmux-tui: simplify PTY error mapping (manaflow-ai#11864)
2748329 refactor(cmux-tui): share stack row allocation (manaflow-ai#11867)
e7223a5 coderouter: PostHog traces + exceptions keyed by the cmux user, request ids, health endpoint, Slack alerts, upstream header timeout (manaflow-ai#11798)
aerickson pushed a commit to aerickson/cmux that referenced this pull request Sep 13, 2026

This branch was successfully deployed

2 active deployments
Preview – cmux166 — ebc4457e Deployed Sep 4, 2026 by vercel[bot]
Preview – cmux41 — ebc4457e Deployed Sep 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant