Skip to content

Update Ghostty upstream - #3216

Merged
lawrencecchen merged 2 commits into
mainfrom
feat-ghostty-latest-upstream
Apr 28, 2026
Merged

lawrencecchen merged 2 commits into
mainfrom
feat-ghostty-latest-upstream

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Testing

  • CMUX_GHOSTTYKIT_NO_PREBUILT=1 ./scripts/ensure-ghosttykit.sh
  • ./scripts/reload.sh --tag gtyup
  • Verified the uploaded GhosttyKit release asset hash matches scripts/ghosttykit-checksums.txt.

Summary by cubic

Updates the ghostty submodule to the latest upstream-synced fork and pins the matching GhosttyKit release. Fixes xcframework packaging and validates archives in CI to avoid macOS metadata files.

  • Dependencies
    • Bumped ghostty submodule while keeping cmux-specific patches.
    • Published the new GhosttyKit xcframework, added its checksum to scripts/ghosttykit-checksums.txt, and fixed CI packaging with COPYFILE_DISABLE=1 plus archive validation.
    • Updated docs/ghostty-fork.md with the current fork state, upstream merge notes, packaging notes, and the new in-memory config load C API.

Written for commit 2380601. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Documentation

    • Refreshed fork-tracking and upstream-merge verification notes with current build info and packaging/checksum guidance
    • Added docs for loading Ghostty configuration from an in-memory string (no separate config file required)
    • Expanded macOS background rendering and related configuration guidance
  • Chores

    • Updated tracked submodule reference to current revision
    • Updated published build artifact checksums and added packaging validation; packaging now avoids macOS AppleDouble entries

@vercel

vercel Bot commented Apr 28, 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 Apr 28, 2026 9:39am
cmux-staging Building Building Preview, Comment Apr 28, 2026 9:39am

@coderabbitai

coderabbitai Bot commented Apr 28, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fee1f887-d5bd-44e1-829b-ab56aed2d5df

📥 Commits

Reviewing files that changed from the base of the PR and between 27a5fe9 and 2380601.

📒 Files selected for processing (2)
  • .github/workflows/build-ghosttykit.yml
  • docs/ghostty-fork.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/ghostty-fork.md

📝 Walkthrough

Walkthrough

This PR updates the ghostty submodule pin to d3117e03e (Apr 28, 2026), refreshes docs/ghostty-fork.md (multi-commit list, new C API section, merge/packaging notes), adds a GhosttyKit SHA→sha256 entry in scripts/ghosttykit-checksums.txt, and tweaks the GhosttyKit packaging workflow to disable copyfile metadata and validate the archive.

Changes

Cohort / File(s) Summary
Documentation & Fork Tracking
docs/ghostty-fork.md
Refreshes fork head/date to Apr 28, 2026; expands the "Current fork changes" list (macos-background-from-layer commits and fixes); adds Section 9 documenting a new C API for loading Ghostty config from an in-memory string; updates merge/conflict verification and xcframework packaging/checksum workflow notes.
Submodule Pin & Checksums
ghostty, scripts/ghosttykit-checksums.txt
Updates ghostty submodule pointer to commit d3117e03e... and appends the matching GhosttyKit SHA→sha256 mapping (d3117e03... → dd33542f...) in the checksums file.
CI Packaging Workflow
.github/workflows/build-ghosttykit.yml, scripts/validate-xcframework-archive.py
Sets COPYFILE_DISABLE=1 during packaging and adds a post-packaging validation step that runs the xcframework archive validator against the generated tarball.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

aardvark, codex

Poem

🐰 I hopped to a new pin on a springtime breeze,
Docs grew a chapter while checksums found ease,
A C API burrowed in memory’s soft ground,
Packaging tidy, archives checked and sound —
My whiskers twitch: commits all nicely bound! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update Ghostty upstream' clearly and concisely summarizes the main change—updating the ghostty submodule to a new upstream version.
Description check ✅ Passed The PR description covers all required template sections: Summary explains what changed and why; Testing documents how changes were verified; Checklist items are included but not all marked as complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-ghostty-latest-upstream

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 Apr 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR bumps the ghostty submodule to d3117e03, merging upstream 65901966 into the previous cmux pin 465a9a62, and records the matching GhosttyKit prebuilt checksum. The documentation in docs/ghostty-fork.md is updated with a new section 9 (Config load string C API) and an April 28, 2026 merge log entry.

Confidence Score: 4/5

Safe to merge with one minor policy deviation worth confirming.

Only a P2 finding: the submodule commit lives on a topic branch rather than fork main as required by CLAUDE.md's submodule safety rule. The release tag mitigates the orphan risk, but the policy check is still technically unmet. No logic, security, or data-integrity issues were found.

ghostty (submodule pointer) and docs/ghostty-fork.md — confirm that d3117e0 is reachable from manaflow/main or that the release tag is treated as the permanent anchor per team convention.

Important Files Changed

Filename Overview
docs/ghostty-fork.md Updated fork state documentation for the April 28, 2026 upstream merge, adding section 9 (Config load string C API) and merge log entry; submodule commit is on a topic branch rather than fork main per the submodule safety policy.
ghostty Submodule pointer bumped from 465a9a6 to d3117e0, merging upstream 6590196 and preserving prior cmux pin; commit reachable via branch cmux-upstream-20260428 and a release tag, but not verified on fork main.
scripts/ghosttykit-checksums.txt Appended new SHA-256 checksum entry for d3117e0 consistent with the release asset; format (ghostty SHA + SHA-256) matches all existing rows.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[upstream ghostty main\n659019666] -->|merged into| B[manaflow/ghostty\ncmux-upstream-20260428\nd3117e03]
    C[previous cmux pin\n465a9a621] -->|base of merge| B
    B -->|submodule pointer update| D[cmux parent repo\nPR #3216]
    B -->|prebuilt release tag| E[xcframework-d3117e03\nGhosttyKit archive]
    E -->|checksum pinned| F[scripts/ghosttykit-checksums.txt]
Loading

Reviews (1): Last reviewed commit: "Update Ghostty upstream" | Re-trigger Greptile

Comment thread docs/ghostty-fork.md
Comment on lines 12 to +15

## Current fork changes

Fork main has advanced beyond the March 30, 2026 rebase onto upstream `main`
at `3509ccf78` (`v1.3.1-457-g3509ccf78`).
Current cmux pinned fork head: `3b684a085` (`tip-1717-g3b684a085`).
The fork was refreshed from upstream `main` again on April 28, 2026.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Submodule commit not on fork main

CLAUDE.md (Submodule safety) requires pushing the submodule commit to the fork's remote main branch before committing the updated parent pointer, specifically to prevent orphaning. The commit d3117e03e is documented here as being on cmux-upstream-20260428, not on manaflow/main. The presence of the release tag xcframework-d3117e03ea19665bc83a28f7e0428c63937e6140 protects against immediate GC, but the policy check (git merge-base --is-ancestor HEAD origin/main) against the fork's main would still fail — consider merging cmux-upstream-20260428 into manaflow/main or confirming that this branch is already reachable from manaflow/main.

Context Used: CLAUDE.md (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. d3117e0 is now an ancestor of manaflow-ai/ghostty main via manaflow-ai/ghostty#48, and the fork notes now state that.

— Claude Code

@lawrencecchen
lawrencecchen force-pushed the feat-ghostty-latest-upstream branch from be8c6c1 to 27a5fe9 Compare April 28, 2026 08:37

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
docs/ghostty-fork.md (2)

167-173: Minor style: add comma after the year per LanguageTool hint.

Line [167] reads like: “April 28, 2026 upstream merge:”. Consider updating to “April 28, 2026, upstream merge:” (commas set off the year in a month-day-year date).

🛠️ Proposed fix
-  - April 28, 2026 upstream merge:
+  - April 28, 2026, upstream merge:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ghostty-fork.md` around lines 167 - 173, Update the heading string
"April 28, 2026 upstream merge:" to include a comma after the year so it reads
"April 28, 2026, upstream merge:"; locate the exact text "April 28, 2026
upstream merge:" in the document (the date-heading) and insert the comma
immediately after "2026" to follow the suggested style.

130-140: C API section: verify the described API matches include/ghostty.h exports.

Section 9 (“Config load string C API”) claims:

  • commit f7880c473
  • files: include/ghostty.h, src/config/CApi.zig, src/config/Config.zig
  • summary: adds C API for loading Ghostty config from in-memory string

Since docs can drift from header/API naming, it’d be good to verify the exact exported symbol names (function signature / naming) match what’s in the fork.

If you want, I can draft a small doc-check script that greps include/ghostty.h for the newly-added symbol(s) and ensures the doc references the same names.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ghostty-fork.md` around lines 130 - 140, Verify that the documented
"Config load string C API" matches the actual exported symbols in
include/ghostty.h by opening include/ghostty.h and locating the C API
function(s) added for loading config from a string (compare against the Zig
sources src/config/CApi.zig and src/config/Config.zig); if the header uses a
different function name or signature than the docs (e.g., any symbol declared
for config-from-string), update the docs to use the exact exported symbol names
and signatures from include/ghostty.h, or update the header to export the
documented names so they match. Ensure the doc text references the exact C
function names and their signatures as found in include/ghostty.h.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ghostty`:
- Line 1: Push the ghostty commit d3117e03ea to the remote (origin/main) before
changing the cmux submodule pointer so the target commit is reachable; only
after pushing, update the cmux submodule pointer in the repo. Also modify the
tar creation step in .github/workflows/build-ghosttykit.yml (the tar invocation
around the current line ~96) to exclude macOS AppleDouble entries (e.g. exclude
files starting with ._ and the __MACOSX directory) so the archive contains only
GhosttyKit.xcframework/ entries and will pass the strict check in
scripts/validate-xcframework-archive.py (the validator that rejects entries
outside GhosttyKit.xcframework/).
- Line 1: The parent repo now references a ghostty submodule commit
(d3117e03ea19665bc83a28f7e0428c63937e6140) that is not present on the ghostty
fork's origin/main; push that commit to the manaflow-ai/ghostty fork's main
branch (or update the submodule pointer to a commit that is already on
origin/main) before updating the parent pointer, then verify the commit is
reachable from origin/main (e.g., using git merge-base --is-ancestor with the
SHA and origin/main) so CI can fetch the submodule successfully.

---

Nitpick comments:
In `@docs/ghostty-fork.md`:
- Around line 167-173: Update the heading string "April 28, 2026 upstream
merge:" to include a comma after the year so it reads "April 28, 2026, upstream
merge:"; locate the exact text "April 28, 2026 upstream merge:" in the document
(the date-heading) and insert the comma immediately after "2026" to follow the
suggested style.
- Around line 130-140: Verify that the documented "Config load string C API"
matches the actual exported symbols in include/ghostty.h by opening
include/ghostty.h and locating the C API function(s) added for loading config
from a string (compare against the Zig sources src/config/CApi.zig and
src/config/Config.zig); if the header uses a different function name or
signature than the docs (e.g., any symbol declared for config-from-string),
update the docs to use the exact exported symbol names and signatures from
include/ghostty.h, or update the header to export the documented names so they
match. Ensure the doc text references the exact C function names and their
signatures as found in include/ghostty.h.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9b9f37b-66e8-4d77-9422-97d9d4299e96

📥 Commits

Reviewing files that changed from the base of the PR and between 822e4e3 and be8c6c1.

📒 Files selected for processing (3)
  • docs/ghostty-fork.md
  • ghostty
  • scripts/ghosttykit-checksums.txt

Comment thread ghostty

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/ghostty-fork.md (1)

167-174: Add explicit submodule-ancestry verification command to the merge checklist block.

Since this section already describes the April 28 merge verification workflow, include the detached-head/orphan-commit guard command explicitly to make the process self-checking.

Suggested doc patch
 - April 28, 2026 upstream merge:
   - Merged upstream `659019666` into `465a9a621` without textual conflicts.
+  - Verified fork commit ancestry before updating parent pointer:
+    `cd ghostty && git fetch origin main && git merge-base --is-ancestor HEAD origin/main`.
   - Verified with `CMUX_GHOSTTYKIT_NO_PREBUILT=1 ./scripts/ensure-ghosttykit.sh`.

Based on learnings: When modifying a submodule (ghostty, vendor/bonsplit, etc.), always push the submodule commit to its remote main branch BEFORE committing the updated pointer in the parent repo; never commit on a detached HEAD or temporary branch; verify with cd <submodule> && git merge-base --is-ancestor HEAD origin/main to avoid orphaned commits

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ghostty-fork.md` around lines 167 - 174, Update the April 28 merge
verification checklist in docs/ghostty-fork.md to include an explicit
submodule-ancestry verification step: instruct the maintainer to cd into the
submodule (e.g., ghostty or vendor/bonsplit) and run git merge-base
--is-ancestor HEAD origin/main before committing the updated submodule pointer,
and state this must be done after pushing the submodule commit to origin/main to
avoid detached-head/orphan commits; add this single-line check to the bullet
list alongside the existing verification commands (e.g., the entries referencing
scripts/ensure-ghosttykit.sh and ./scripts/reload.sh --tag gtyup).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/ghostty-fork.md`:
- Line 167: Update the date heading text "April 28, 2026 upstream merge:" to
include a comma after the year so it reads "April 28, 2026, upstream merge:";
locate the line containing the exact string "April 28, 2026 upstream merge:" in
docs/ghostty-fork.md and insert the comma immediately after "2026".

---

Nitpick comments:
In `@docs/ghostty-fork.md`:
- Around line 167-174: Update the April 28 merge verification checklist in
docs/ghostty-fork.md to include an explicit submodule-ancestry verification
step: instruct the maintainer to cd into the submodule (e.g., ghostty or
vendor/bonsplit) and run git merge-base --is-ancestor HEAD origin/main before
committing the updated submodule pointer, and state this must be done after
pushing the submodule commit to origin/main to avoid detached-head/orphan
commits; add this single-line check to the bullet list alongside the existing
verification commands (e.g., the entries referencing
scripts/ensure-ghosttykit.sh and ./scripts/reload.sh --tag gtyup).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 230a5b2e-5cc4-4703-983f-4b32484a4b91

📥 Commits

Reviewing files that changed from the base of the PR and between be8c6c1 and 27a5fe9.

📒 Files selected for processing (3)
  • docs/ghostty-fork.md
  • ghostty
  • scripts/ghosttykit-checksums.txt
✅ Files skipped from review due to trivial changes (2)
  • scripts/ghosttykit-checksums.txt
  • ghostty

Comment thread docs/ghostty-fork.md Outdated
lawrencecchen added a commit to manaflow-ai/ghostty that referenced this pull request Apr 28, 2026
@lawrencecchen
lawrencecchen merged commit bedbc9b into main Apr 28, 2026
29 checks passed
@lawrencecchen
lawrencecchen deleted the feat-ghostty-latest-upstream branch April 28, 2026 09:52
@coderabbitai coderabbitai Bot mentioned this pull request May 19, 2026

This branch was successfully deployed

1 active deployment
Preview – cmux — 23806011 Deployed Apr 28, 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