Repository navigation
Fix iOS TestFlight crash paths - #9034
Conversation
📝 WalkthroughWalkthroughThe PR reorganizes workspace group context-menu actions into conditional sections and extracts Ghostty surface callbacks into named bridge functions, with a UIKit test verifying background-thread execution. ChangesWorkspace group menu
Ghostty surface callbacks
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift`:
- Around line 14-33: Move cmuxIOSurfaceIOWriteCallback and
cmuxIOSurfaceRenderPresentedCallback onto GhosttySurfaceBridge as nonisolated
static callback methods, preserving their existing callback behavior and
userdata handling. Update any callback registrations or references to use the
bridge-owned methods, and remove the top-level functions.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c476565e-fe6b-43b6-ab43-03237959579a
📒 Files selected for processing (3)
Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceGroupHeaderRow.swiftPackages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swiftPackages/iOS/CmuxMobileTerminal/Tests/CmuxMobileTerminalTests/GhosttySurfaceCallbackTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Summary
GhosttySurfaceView.makeSurface(app:)into nonisolated top-level functions so off-main libghostty calls do not inheritUIViewmain-actor isolation.Divider()context-menu separators in workspace group headers withSectiongroups to avoid UIKit context-menu layout aborts while measuring visible menu cells.ASC evidence
AGnxHSCbggL4TYIf5AxJkVM, created2026-07-28T04:53:09.494Z, bundledev.cmux.app.internal:EXC_CRASH (SIGABRT)during UIKit/SwiftUI context menu layout, with+[NSLayoutConstraint constraintWithItem:...]under-[UIContextMenuInteraction updateVisibleMenuWithBlock:]on thread 0.ADkFBL8Ch61FNTq2u4uRLHA, created2026-07-26T00:36:17.844Z, bundledev.cmux.app.demo:EXC_BREAKPOINT (SIGTRAP)on thread 8 at_dispatch_assert_queue_fail->_swift_task_checkIsolatedSwift, mapped to theGhosttySurfaceView.makeSurface(app:)callback path andSurface.destroy.Verification
git diff --check origin/main...HEADpassed.xcodebuild -quiet test -workspace ios/cmux.xcworkspace -scheme cmux-ios -destination 'platform=iOS Simulator,id=38B83108-E1AD-44EB-B521-ACCB0C4C90E4' -derivedDataPath /tmp/cmux-ios-test-cr2-rebased '-only-testing:CmuxMobileTerminalTests/GhosttySurfaceCallbackTests/ghosttySurfaceCallbacksRunOffMainThread()'passed. xcresult summary:totalTestCount: 1,passedTests: 1,failedTests: 0.xcodebuild -quiet build -workspace ios/cmux.xcworkspace -scheme cmux-ios -configuration Release -destination 'generic/platform=iOS' -derivedDataPath /tmp/cmux-ios-build-cr2-rebased CODE_SIGNING_ALLOWED=NOexited 0.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fix two iOS crashes in TestFlight: off‑main
libghosttysurface callbacks violating main‑actor isolation, and context‑menu layout aborts in workspace group headers. Stabilizes surface IO and context menus.libghosttyiOS surface C callbacks as nonisolated static C function pointers onGhosttySurfaceBridge(ioWriteCallback,renderPresentedCallback), and registered them fromGhosttySurfaceViewso off‑main calls don’t inheritUIViewmain‑actor isolation.Divider()withSectiongroups inWorkspaceGroupHeaderRowcontext menus to avoid UIKit layout crashes.GhosttySurfaceCallbackTests.ghosttySurfaceCallbacksRunOffMainThread()to verify callbacks safely run off the main thread.Written for commit a751cb7. Summary will update on new commits.
Summary by CodeRabbit