Skip to content

Fix iOS live terminal blank and flashing frames - #10097

Open
azooz2003-bit wants to merge 12 commits into
mainfrom
fix-ios-live-output-scroll-render
Open

Fix iOS live terminal blank and flashing frames#10097
azooz2003-bit wants to merge 12 commits into
mainfrom
fix-ios-live-output-scroll-render

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • serialize ordinary output, local scroll, and verified replay at the tokened Ghostty presentation callback
  • keep fallback content visible until the matching frame is presented
  • coalesce newest pending work and cover stale callbacks with reducer tests

Verification

  • macOS tagged build lvsync succeeded
  • iOS simulator build and live scroll/output verification pending cloud capacity

Fixes the takeover regression where scrolling during live agent output could reveal a blank cursor-only surface or flash/reorder rows.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Serialize live terminal frame presentation and harden keyboard dock transitions to eliminate blank/flash frames during live output and preserve animation ordering on iOS.

  • Add a tokened TerminalRenderPresentationGate in CmuxMobileTerminal to serialize ordinary, local-scroll, and verified-replay frames. Keep the snapshot fallback visible until the matching tokened frame is presented; cancel failed verified-replay submissions; coalesce renders behind the platform presentation callback.
  • Drain pending native scroll and await local-scroll application before verified-replay reveal; re-fence verified-replay restore/scroll in GhosttySurfaceRepresentable.
  • Fix keyboard notification races: export beginFrame and beginOverlap in CmuxMobileSupport’s MobileKeyboardTransition; introduce a KeyboardNotificationTransitionLifecycle reducer to ignore stale/duplicate legs, converge after reattach, and settle without restarting animations.
  • Replace verified-replay–specific submission path with a unified render submission; resume queued frames after replay suppression; add tests for the presentation gate, keyboard lifecycle, and scroll-drain before reveal.
  • CI: build arm64 simulator artifacts in reload workflow.

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

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ios-live-output-scroll-render

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.

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