Skip to content

fix(ios): compile release diagnostics symbols - #10065

Merged
azooz2003-bit merged 1 commit into
mainfrom
fix-ios-internal
Aug 13, 2026
Merged

azooz2003-bit merged 1 commit into
mainfrom
fix-ios-internal

Conversation

@azooz2003-bit

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

Copy link
Copy Markdown
Collaborator

The internal TestFlight Release build failed on main because diagnostics call sites moved into Release while their responder helper and diagnostic log property remained DEBUG-only.

Make the shared responder identity mapper, diagnostic log sink, and shell-to-surface injection available in Release. Keep the verbose responder class-name probe DEBUG-only.

Validation: diff check passed; branch rebased onto current main. The local package-only build cannot typecheck iOS dependencies on macOS, and the full simulator graph was interrupted while resolving packages. Hosted checks are the source-of-truth for the Release compiler path.


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 iOS Release build by compiling required diagnostics symbols in Release. Previously, diagnostics call sites were present in Release but the responder mapper, diagnostic log sink, and shell-to-surface injection were DEBUG-only; now these are available in Release, while the verbose responder class-name probe remains DEBUG-only. This enables structured diagnostics in Release without verbose logs.

  • GhosttySurfaceView.diagnosticLog now compiles in Release and remains optional; payloads are bounded and privacy-safe.
  • TerminalInputTextView.responderIdentity(of:) is available in Release; the class-name readback helper stays DEBUG-only.
  • GhosttySurfaceRepresentable injects the diagnostic sink in Release; if the store does not provide one, probes no-op. No runtime behavior change beyond enabling structured diagnostic events.

Written for commit 5799b88. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Diagnostic logging is now available in release builds when configured, improving access to diagnostic probes and feedback-pane logs.
    • Terminal responder identity tracking now works consistently in release builds.
    • Existing no-op behavior remains unchanged when diagnostic logging is not configured.

@coderabbitai

coderabbitai Bot commented Aug 13, 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: Pro Plus

Run ID: fa6878d3-2238-4127-bf41-b37e4425729d

📥 Commits

Reviewing files that changed from the base of the PR and between b71e488 and 5799b88.

📒 Files selected for processing (3)
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/GhosttySurfaceRepresentable.swift
  • Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift
  • Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift
💤 Files with no reviewable changes (1)
  • Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/GhosttySurfaceRepresentable.swift

📝 Walkthrough

Walkthrough

The change makes diagnostic log injection and responder identity mapping available in release builds. Debug-only responder class-name helpers remain restricted to DEBUG builds.

Changes

Release diagnostics

Layer / File(s) Summary
Release diagnostic log wiring
Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift, Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/GhosttySurfaceRepresentable.swift
diagnosticLog is compiled in all builds, and GhosttySurfaceRepresentable assigns the store log without a DEBUG guard.
Release responder identity mapping
Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift
responderIdentity(of:) is available in release builds. Later responder diagnostic helpers remain DEBUG-only.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 5799b

The change enables required release diagnostics support while keeping verbose probing debug-only; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested reviewers: lawrencecchen

🚥 Pre-merge checks | ✅ 25
✅ Passed checks (25 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: compiling iOS diagnostic symbols in Release builds.
Description check ✅ Passed The description explains what changed, why it changed, and the available validation results, although it omits the template checklist and demo video section.
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.
Cmux Swift Actor Isolation ✅ Passed Diff only enables diagnostics in existing UIView/UIViewRepresentable UI paths; DiagnosticLog is pre-existing Sendable with lock/actor-backed state, and no background store access or new isolation d...
Cmux Swift Blocking Runtime ✅ Passed The PR only removes DEBUG guards and moves a responder mapper; the added Swift lines introduce no semaphore, wait, sleep, timer, polling, main-sync, or manual-lock primitive.
Cmux Browser Automation Off-Main ✅ Passed The PR changes only three iOS diagnostics files; no browser socket automation commands, WebKit waits, worker routing, or policy tests are changed.
Cmux Expensive Synchronous Load ✅ Passed The diff only exposes diagnostic logging and responder mapping in Release; it adds no agent-history loader, file parsing, directory scan, or syscall, and DiagnosticLog.record is bounded and non-blo...
Cmux Cache Substitution Correctness ✅ Passed The diff only removes DEBUG guards for diagnostic injection, a bounded log sink, and responder mapping; it replaces no fresh authoritative read with a cache in persistence, history, undo, or snapsh...
Cmux No Hacky Sleeps ✅ Passed The diff changes only three Swift files and adds no sleep, timer, polling, delay, or wall-clock synchronization. This check covers non-Swift runtime changes.
Cmux Algorithmic Complexity ✅ Passed The exact diff only removes DEBUG guards around a property, assignment, and responder mapper; it adds no loops, scans, sorting, filtering, joins, or other algorithmic work.
Cmux Swift Concurrency ✅ Passed The diff only removes DEBUG guards, exposes diagnostic symbols, and updates comments. It adds no Dispatch queues, Combine, completion handlers, or fire-and-forget Tasks.
Cmux Swift @Concurrent ✅ Passed The commit only changes conditional-compilation boundaries and comments; it adds no async or @concurrent code, and Release diagnostics call synchronous nonisolated APIs.
Cmux Swift Package Boundaries ✅ Passed The diff only widens existing diagnostic injection and responder mapping to Release in SwiftPM UIKit/Ghostty glue; it introduces no independent domain logic requiring a new package target.
Cmux Swiftpm Lockfiles ✅ Passed The diff changes only three Swift source files; no Package.swift, Package.resolved, .gitignore, workflow, or Xcode project paths changed, so the lockfile policy is not triggered.
Cmux Swift Logging ✅ Passed The diff only removes DEBUG guards and exposes existing DiagnosticLog events; it adds no print, NSLog, file logging, Logger, or sensitive payloads, and events use bounded integers.
Cmux User-Facing Error Privacy ✅ Passed The diff only enables existing diagnostics symbols and injection; new release events use bounded enums/integers and render generic labels, while responder class names remain DEBUG-only.
Cmux Full Internationalization ✅ Passed The diff only changes DEBUG guards and developer comments for diagnostic plumbing; it adds no user-facing text, catalog keys, locale files, web messages, or untranslated copy.
Cmux Swiftui State Layout ✅ Passed The diff only removes DEBUG guards around UIKit diagnostic plumbing and moves a responder mapper; it adds no ObservableObject, GeometryReader, lazy-row store, or render-time state pattern.
Cmux Architecture Rethink ✅ Passed The diff only removes DEBUG guards for release-safe diagnostics and keeps store injection plus one responder mapper owner; it adds no timing, blocking, state-owner, observer, or lifecycle wiring.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The diff only changes Release availability for diagnostic symbols and adds no auxiliary window, identifier, or close-shortcut code.
Cmux Source Artifacts ✅ Passed The diff changes only three hand-written Swift source files for Release diagnostics. No logs, caches, build output, temp directories, or other source-control artifacts were added.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The diff removes DEBUG guards from release-safe diagnostic wiring and responder mapping; both have production call sites and no test-only/debug-named member or wrapper is introduced.
Cmux No Ambient Global State ✅ Passed The HEAD^→HEAD diff only removes DEBUG guards around an existing type method, an instance property, and injected assignment; it adds no global function, mutable global, namespace, or singleton.
✨ 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-internal

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.

@azooz2003-bit
azooz2003-bit merged commit ccbf7e5 into main Aug 13, 2026
9 of 12 checks passed
@azooz2003-bit
azooz2003-bit deleted the fix-ios-internal branch August 13, 2026 02:30
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