Skip to content

Fix macOS compile break from #11224 (GhosttySurfaceScrollView has no terminalSurface) - #11316

Merged
azooz2003-bit merged 1 commit into
mainfrom
fix-scrollview-terminalsurface
Sep 1, 2026
Merged

azooz2003-bit merged 1 commit into
mainfrom
fix-scrollview-terminalsurface

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Current main fails the macOS Debug compile: #11224 added a portal-ownership guard in dismantleNSView that reads hostedView.terminalSurface, but hostedView is the GhosttySurfaceScrollView pane container, which has no such member (the surface hangs off its GhosttyNSView). The PR lane has no macOS compile gate, so it merged red; every tagged fleet build from main now fails with value of type 'GhosttySurfaceScrollView' has no member 'terminalSurface'.

One-line fix: read hostedView.surfaceView.terminalSurface, matching every other terminalSurface access in the class.

Dictionary:

  • PR lane: the checks that run on cmux pull requests; they do not include a macOS compile, so a Mac-only compile error can merge.
  • tagged fleet build: a cmux DEV <tag> Debug build produced on the shared Mac fleet by reload-cloud.sh.

🤖 Generated with Claude Code


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

Fixes the macOS Debug compile break on main so tagged fleet builds succeed again. The portal-ownership guard in dismantleNSView now reads hostedView.surfaceView.terminalSurface instead of hostedView.terminalSurface, since the hosted view is the GhosttySurfaceScrollView container without that member.

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

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved terminal view cleanup to reliably access the attached terminal surface.
    • Removed reliance on a direct terminal-surface reference from the scroll view.

PR #11224 added a wasBoundToDismantledHost guard that reads
hostedView.terminalSurface, but hostedView is the GhosttySurfaceScrollView
pane container, which has no terminalSurface member; the surface hangs off
its GhosttyNSView. The PR lane has no macOS compile gate, so this landed
red and every tagged Mac build from main now fails at
GhosttyTerminalView.swift. Route the read through surfaceView, matching
every other terminalSurface access in the class.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cmux166 Building Building Preview Sep 1, 2026 3:13am UTC
cmux41 Building Building Preview Sep 1, 2026 3:13am UTC

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: e7b59b9e-27f4-47f5-b2ea-2fbd38dfa881

📥 Commits

Reviewing files that changed from the base of the PR and between 857b5af and cf0cf90.

📒 Files selected for processing (1)
  • Sources/GhosttyTerminalView.swift

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The dismantling path in GhosttyTerminalView now accesses the terminal surface through surfaceView, matching the updated GhosttySurfaceScrollView API.

Changes

Terminal surface access

Layer / File(s) Summary
Dismantle surface resolution
Sources/GhosttyTerminalView.swift
dismantleNSView now reads the terminal surface through hostedView.surfaceView.terminalSurface.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to cf0cf

This change corrects the macOS surface lookup used during view teardown and is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: austinywang, lawrencecchen, ejc3

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains what changed and why, but it omits the required Testing section, Demo Video section, review trigger, and checklist. Add the template sections. Document testing and verification, state whether a demo video is applicable, include the review-trigger block, and complete the checklist.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the macOS compile break and its cause.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Cmux Swift Actor Isolation ✅ Passed PASS. The diff is limited to one member-access correction in Sources/GhosttyTerminalView.swift: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The parent and current …
Cmux Swift Blocking Runtime ✅ Passed The parent-to-HEAD diff changes only one property access: hostedView.terminalSurface to hostedView.surfaceView.terminalSurface. The changed line adds no semaphore, blocking wait, sleep, delayed di…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only Sources/GhosttyTerminalView.swift, replacing one terminalSurface access with hostedView.surfaceView.terminalSurface. It does not change browser.* socket com…
Cmux Expensive Synchronous Load ✅ Passed PASS. The commit changes only one property access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The diff adds no agent-histor…
Cmux Cache Substitution Correctness ✅ Passed PASS — The diff changes one member access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. `GhosttySurfaceScrollView.surfaceView…
Cmux No Hacky Sleeps ✅ Passed PASS: The pull request changes only Sources/GhosttyTerminalView.swift and replaces one property access in dismantleNSView. It adds no sleep, timer, polling, fixed delay, or wall-clock wait. The ru…
Cmux Algorithmic Complexity ✅ Passed PASS. The pull request changes one Swift expression in Sources/GhosttyTerminalView.swift (1 insertion, 1 deletion). It changes a property access from hostedView.terminalSurface to `hostedView.su…
Cmux Swift Concurrency ✅ Passed PASS: The pull request changes one Swift expression in GhosttyTerminalView.dismantleNSView, from hostedView.terminalSurface to hostedView.surfaceView.terminalSurface. The exact committed diff ad…
Cmux Swift @Concurrent ✅ Passed PASS. The PR changes one synchronous property access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The diff adds no async, …
Cmux Swift Package Boundaries ✅ Passed PASS. The diff changes one property access in Sources/GhosttyTerminalView.swift inside GhosttyTerminalView.dismantleNSView. GhosttySurfaceScrollView is an AppKit view bridge, and `surfaceView.te…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.)

Full details: Cmux Swift Actor Isolation

Explanation

PASS. The diff is limited to one member-access correction in Sources/GhosttyTerminalView.swift: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The parent and current revisions have identical actor annotations, including @MainActor on Coordinator; the diff adds no model, protocol, Sendable, async, or isolation declaration. The corrected access is in existing AppKit/SwiftUI teardown code. It does not introduce or worsen any failure condition in swift-actor-isolation.md.

Full details: Cmux Swift Blocking Runtime

Explanation

The parent-to-HEAD diff changes only one property access: hostedView.terminalSurface to hostedView.surfaceView.terminalSurface. The changed line adds no semaphore, blocking wait, sleep, delayed dispatch, polling, main-queue sync, or manual lock. The blocking-runtime policy also allows existing blocking code that the PR does not introduce or worsen. GhosttySurfaceScrollView declares surfaceView and existing accesses use surfaceView.terminalSurface.

Full details: Cmux Browser Automation Off-Main

Explanation

PASS: The pull request changes only Sources/GhosttyTerminalView.swift, replacing one terminalSurface access with hostedView.surfaceView.terminalSurface. It does not change browser.* socket commands, socketWorkerMethods, processV2Command, WebKit/AppKit routing, or policy tests. The browser automation check is therefore not applicable.

Full details: Cmux Expensive Synchronous Load

Explanation

PASS. The commit changes only one property access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The diff adds no agent-history loader, file read, JSON parsing, directory scan, syscall loop, or background-loading call. Therefore, it does not introduce or worsen an expensive synchronous load on an interactive path.

Full details: Cmux Cache Substitution Correctness

Explanation

PASS — The diff changes one member access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. GhosttySurfaceScrollView.surfaceView is a live GhosttyNSView, and GhosttyNSView.terminalSurface is its weak attached-surface reference. This change does not replace a fresh authoritative read with a cache, and the code is a portal teardown/UI lifecycle path, not a persistence, history, undo, or snapshot path. Cold-cache and stale-cache handling therefore do not apply.

Full details: Cmux No Hacky Sleeps

Explanation

PASS: The pull request changes only Sources/GhosttyTerminalView.swift and replaces one property access in dismantleNSView. It adds no sleep, timer, polling, fixed delay, or wall-clock wait. The rule explicitly scopes this check to TypeScript, JavaScript, shell, and non-Swift build/runtime scripts, so it does not apply to this Swift-only change.

Full details: Cmux Algorithmic Complexity

Explanation

PASS. The pull request changes one Swift expression in Sources/GhosttyTerminalView.swift (1 insertion, 1 deletion). It changes a property access from hostedView.terminalSurface to hostedView.surfaceView.terminalSurface. The affected function has no collection scan, sort, filter, join, or batch operation. The change does not introduce or worsen algorithmic complexity under .github/review-bot-rules/algorithmic-complexity.md.

Full details: Cmux Swift Concurrency

Explanation

PASS: The pull request changes one Swift expression in GhosttyTerminalView.dismantleNSView, from hostedView.terminalSurface to hostedView.surfaceView.terminalSurface. The exact committed diff adds no Dispatch, Combine, completion-handler, Task, or other async/concurrency pattern. GhosttySurfaceScrollView declares surfaceView and existing accesses use surfaceView.terminalSurface, so this is a compile-fix property path change, not a concurrency change.

Full details: Cmux Swift `@Concurrent`

Explanation

PASS. The PR changes one synchronous property access in GhosttyTerminalView.dismantleNSView: hostedView.terminalSurface becomes hostedView.surfaceView.terminalSurface. The diff adds no async, nonisolated async, or @concurrent function or call site, and it does not change actor isolation or async work. Therefore, it does not trigger any failure condition in swift-concurrent-annotation.md.

Full details: Cmux Swift Package Boundaries

Explanation

PASS. The diff changes one property access in Sources/GhosttyTerminalView.swift inside GhosttyTerminalView.dismantleNSView. GhosttySurfaceScrollView is an AppKit view bridge, and surfaceView.terminalSurface is its existing access path. This is small Ghostty/AppKit integration glue, which the boundary policy explicitly allows. The diff does not introduce or expand independently testable domain logic in the app target.

  • Fix all pre-merge checks with AI
✨ 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-scrollview-terminalsurface

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.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

@azooz2003-bit
azooz2003-bit merged commit ed0c363 into main Sep 1, 2026
10 of 12 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 1, 2026
@azooz2003-bit
azooz2003-bit deleted the fix-scrollview-terminalsurface branch September 1, 2026 05:44

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant