Skip to content

Enable alternate screen scrollback (#2334) - #4023

Closed
austinywang wants to merge 11 commits into
mainfrom
issue-2334-alt-screen-scrollback
Closed

austinywang wants to merge 11 commits into
mainfrom
issue-2334-alt-screen-scrollback

Conversation

@austinywang

@austinywang austinywang commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • update Ghostty so alternate screens inherit the configured scrollback limit instead of forcing zero
  • add a Ghostty terminal behavior test for alternate-screen scrollback
  • rebase the Ghostty change on top of the current fork pin fe972c095 and publish/pin xcframework-f66517a01ebdefefdbb77841925d132c44bf1e79

Closes #2334

Verification

  • zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=universal -Doptimize=ReleaseFast
  • GHOSTTYKIT_OUTPUT_DIR=/tmp/ghosttykit-f665-verify ./scripts/download-prebuilt-ghosttykit.sh
  • Local tests not run per repo policy; CI should run them.

Note

Low Risk
Documentation and prebuilt archive checksum pins only; terminal behavior change is isolated to alternate-screen scrollback in the fork submodule.

Overview
Documents and ships the merged Ghostty fork pin fd8b1da51, which combines alternate-screen scrollback (5579fa80f / f66517a01) with the current cmux main pin f78189ac1, so TUIs in mode 1049 keep scrollback instead of zero.

docs/ghostty-fork.md updates the pinned head, release tag URL, branch (issue-2334-alt-screen-scrollback), a new §13 for the Terminal.zig scrollback behavior, June 2026 merge notes, and a rebase note to preserve alternate-screen scrollback in src/terminal/Terminal.zig.

scripts/ghosttykit-checksums.txt adds SHA→archive checksum lines for the scrollback and merge commits, including fd8b1da51 for the new prebuilt xcframework-fd8b1da51....

Reviewed by Cursor Bugbot for commit c401ac5. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented May 12, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 6, 2026 11:40am
cmux-staging Building Building Preview, Comment Jun 6, 2026 11:40am

@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@austinywang, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 9 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ffd8141b-4d50-4e20-aa46-cd707d59ea45

📥 Commits

Reviewing files that changed from the base of the PR and between 5302202 and c401ac5.

📒 Files selected for processing (3)
  • docs/ghostty-fork.md
  • ghostty
  • scripts/ghosttykit-checksums.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-2334-alt-screen-scrollback

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 and usage tips.

@greptile-apps

greptile-apps Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR bumps the Ghostty submodule from f78189ac1 to fd8b1da51, a merge of the alternate-screen scrollback patch (f66517a01) onto the current cmux main fork pin. The change makes alternate screens inherit the primary screen's scrollback limit instead of forcing zero, keeping TUI output scrollable while in mode 1049.

  • ghostty submodule: pointer advanced to fd8b1da51618a77a5d2bd353af7694dfcfb84c5d, consistent with docs and checksums.
  • docs/ghostty-fork.md: adds section 13 describing the scrollback change, a per-file conflict note for src/terminal/Terminal.zig, and June 6 merge notes; updates the current-head and xcframework release-tag references throughout.
  • scripts/ghosttykit-checksums.txt: adds four new SHA→SHA-256 rows covering the intermediate commits (f66517a01, 395d13a76, 5579fa80f) and the new fork head (fd8b1da51).

Confidence Score: 5/5

Safe to merge — the submodule SHA, documentation, xcframework release tag, and checksums file are all mutually consistent; the download script will correctly resolve the new pin.

All three changed files agree on the new Ghostty fork head fd8b1da51: the submodule points to the full SHA, the doc references that same SHA in the release-tag URL and reachability section, and ghosttykit-checksums.txt contains the corresponding SHA-256 row that the download script will look up at build time. The per-file conflict note for Terminal.zig requested in prior review is now present. No logic, auth, or data-path changes are introduced.

No files require special attention.

Important Files Changed

Filename Overview
docs/ghostty-fork.md Documentation correctly updated: current fork head, xcframework release tag, section 13 for alternate-screen scrollback, per-file Terminal.zig conflict note, and June 6 merge-conflict notes all match the new submodule SHA.
ghostty Submodule pointer advanced from f78189a to fd8b1da51618a77a5d2bd353af7694dfcfb84c5d; consistent with docs and checksums entry.
scripts/ghosttykit-checksums.txt Adds checksum rows for f66517a01, 395d13a76, 5579fa80f (intermediate SHAs), and the new pin fd8b1da51; the download script will find the pinned SHA-256 for the new submodule HEAD.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ghostty submodule\nfd8b1da51] -->|SHA read by| B[download-prebuilt-ghosttykit.sh]
    B -->|lookup SHA in| C[scripts/ghosttykit-checksums.txt\n+ fd8b1da51 → SHA-256]
    C -->|expected checksum| D{Checksum match?}
    B -->|download from| E[GitHub Releases\nxcframework-fd8b1da51...-crashsubdir-cmux-crash-v1]
    E -->|actual checksum| D
    D -->|✓ match| F[GhosttyKit.xcframework\nalternate-screen scrollback enabled]
    D -->|✗ mismatch| G[Build fails]

    subgraph Fork composition
        H[f78189ac1\ncmux main pin] -->|merge| A
        I[5579fa80f / f66517a01\nalt-screen scrollback] -->|merge| A
    end
Loading

Reviews (10): Last reviewed commit: "Pin GhosttyKit checksum for alt-screen s..." | Re-trigger Greptile

Comment thread docs/ghostty-fork.md Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5cf31e0. Configure here.

Comment thread docs/ghostty-fork.md Outdated
@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026

This branch was successfully deployed

1 active deployment
Preview – cmux — c401ac5e Deployed Jun 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Save alternate screen output to scrollback buffer (like iTerm2)

3 participants