Repository navigation
Preserve iPhone viewport lease across output stream churn - #13548
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe terminal output stream now separates stream cleanup from viewport lease cleanup. Mounted UIKit surfaces keep the viewport lease across stream termination and release it during explicit teardown. The default stream API retains viewport release behavior. ChangesViewport Lease Lifecycle
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant GhosttySurfaceRepresentable
participant CmuxMobileShell
participant StreamTeardown
participant Viewport
GhosttySurfaceRepresentable->>CmuxMobileShell: request output stream with releaseViewportOnTermination false
CmuxMobileShell->>StreamTeardown: retain release flag
StreamTeardown->>CmuxMobileShell: unregister output with releaseViewport false
CmuxMobileShell->>Viewport: preserve viewport lease
GhosttySurfaceRepresentable->>Viewport: release lease during explicit teardown
Merge Risk: ⚪ Minimal · up to The change preserves the viewport lease across transient stream detaches and releases it during presentation teardown; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 |
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. |
|
@greptileai review |
|
@greptile-apps review |
Follow-up to #13498 / #13474.
The focused
TerminalSurfaceMountOwnershipTestsrun exposed one remaining ownership mismatch after #13498:MobileShellComposite.unregisterTerminalOutputstill cleared the viewport whenever the output stream ended. A transient UIKit detach therefore advanced the viewport generation and dropped the cached report even though the presentation still owned the terminal.This patch separates those lifetimes:
The existing mount ownership regression from #13498 now exercises the intended rule directly.
Verification
CmuxMobileShellUITests/TerminalSurfaceMountOwnershipTests— 3/3 tests passed in 15.204s,TEST SUCCEEDED.Summary by cubic
Fixes the iPhone terminal viewport being dropped when the output stream ends during a transient UIKit detach, losing the cached report while the presentation still owns the terminal.
MobileShellComposite.terminalOutputStreamnow accepts areleaseViewportOnTerminationflag; the mounted UI stream passesfalseso stream churn from UIKit detaches no longer clears the viewport.Written for commit ebe3d6f. Summary will update on new commits.
Summary by CodeRabbit