Repository navigation
cmux-tui: TUI dead-band dimming for foreign-sized surfaces; move CmuxLite out of tree - #8305
Conversation
…sized surfaces When a surface's effective grid is smaller than the pane, the TUI now clips content to the live area, dims the unusable right/bottom bands (theme-aware grey + DIM), draws the boundary with box-drawing glyphs on the first dead column/row, and places the sized-by hint at the boundary corner. Hint copy is locale-selected (EN/JA) via the same env-based mechanism as the pairing overlay, resolved once. Matches the cmux-lite client treatment.
…ux-lite) The demo app now lives in the private manaflow-ai/cmux-lite repo (its pre-move history stays reachable here). Adds a bilingual frontends/README pointer and drops the now-dead swift-frontend Xcode-lockfile exception from check-package-resolved-policy.py.
📝 WalkthroughWalkthroughThe change adds localized foreign-viewport rendering to cmux-tui, including theme colors, dead-area clearing, boundary hints, and tests. It also removes the in-tree Swift CmuxLite frontend, updates frontend documentation, and narrows accepted SwiftPM lockfile paths. ChangesForeign viewport rendering
Swift frontend retirement and policy updates
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Pane as draw_content
participant Grid as draw_render_frame
participant Theme as ChromeTheme
participant Backend as TestBackend
Pane->>Grid: pass render frame and ChromeTheme
Grid->>Theme: read foreign viewport colors
Grid->>Grid: draw live cells and clear dead regions
Grid->>Backend: write boundary bands and localized hint
Backend-->>Grid: expose rendered rows for assertions
Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 errors, 1 warning)
✅ Passed checks (22 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: 2
🤖 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 `@cmux-tui/crates/cmux-tui/src/ui/terminal_grid.rs`:
- Around line 75-84: Remove the dead-cell reset loops near the start of the
terminal-grid rendering flow, then update draw_foreign_viewport to iterate and
style only the right and bottom dead rectangles directly. Ensure live cells are
not rescanned for dead-region cleanup, preserving the existing rendering
behavior while avoiding repeated max_rows × max_cols traversal.
- Around line 28-53: Replace the hardcoded locale dispatch in
foreign_viewport_copy and foreign_viewport_copy_for_locale with the existing
localization API and catalog entries for every supported locale, preserving the
required ForeignViewportCopy fields and separator behavior. Update draw_grid and
related callers to use the localized copy without assuming English, and adjust
tests to inject explicit catalog locales and assert the corresponding
translations.
🪄 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
Run ID: 76e15f70-cf6e-4b97-b962-f8911d7bd9f3
⛔ Files ignored due to path filters (1)
cmux-tui/frontends/swift/CmuxLite/CmuxLite.xcodeproj/project.xcworkspace/contents.xcworkspacedatais excluded by!**/*.xcworkspace/contents.xcworkspacedata
📒 Files selected for processing (128)
cmux-tui/crates/cmux-tui/src/config.rscmux-tui/crates/cmux-tui/src/ui/pane.rscmux-tui/crates/cmux-tui/src/ui/sidebar.rscmux-tui/crates/cmux-tui/src/ui/terminal_grid.rscmux-tui/frontends/README.ja.mdcmux-tui/frontends/README.mdcmux-tui/frontends/swift/CmuxLite/.gitignorecmux-tui/frontends/swift/CmuxLite/CmuxLite.xcodeproj/project.pbxprojcmux-tui/frontends/swift/CmuxLite/CmuxLite.xcodeproj/xcshareddata/xcschemes/CmuxLite.xcschemecmux-tui/frontends/swift/CmuxLite/Package.swiftcmux-tui/frontends/swift/CmuxLite/README.ja.mdcmux-tui/frontends/swift/CmuxLite/README.mdcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxGhosttyConfigurationResolver.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxHoverButton.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxLiteApp.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxLiteWindowController.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPalette.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPaneViewController.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPendingRatio.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderColor.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderFontMetrics.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxSplitDividerView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxSplitView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxStateDump.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTabButton.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTerminalGridContainerView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTerminalHostViewController.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxWindowMutation.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxWorkspaceRowView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/NSEvent+CmuxShortcutInput.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/NSEvent+CmuxTerminalKeyEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/Resources/Localizable.xcstringscmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxAttachEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxCommandRequest.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxConnectionConfiguration.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxConnectionEndpoint.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxEmptyResponse.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendSession.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendStartup.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxGhosttyViewConfiguration.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxGhosttyViewConfigurationParser.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxIdentifyResponse.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxInboundHeader.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLayout.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLayoutRect.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLocalSelection.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPane.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneAttachment.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneDirection.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneGeometry.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneLayoutView+Actions.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneLayoutView.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneSnapshot.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolClient.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolError.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRatioNudge.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxReadScrollbackResponse.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderAttributes.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderCursor.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderCursorStyle.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderDeltaEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderModel.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderRow.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderRun.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderStateEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderStyle.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderUnderline.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResizeAction.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResizePolicy.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResponseEnvelope.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScreen.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScreenSnapshot.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackDirection.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackReconciliation.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackRequest.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackWindow.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutAction.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutInput.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutKey.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutModifiers.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutTable.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitDirection.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitRatio.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitTarget.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurface.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurfaceResponse.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurfaceSize.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTabSnapshot.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalGridGeometry.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalKeyAction.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalKeyEvent.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalMeasurement.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTransport.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspace.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspaceSnapshot.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspaceTree.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/ConfiguredCmuxProtocolClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/FallbackCmuxProtocolClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/FallbackWebSocketTransport.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/NetworkCmuxProtocolClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/NetworkWebSocketTransport.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/Resources/Localizable.xcstringscmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/URLSessionCmuxProtocolClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/URLSessionWebSocketTransport.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/UnixSocketTransport.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/CmuxLiteSmoke.swiftcmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/Resources/Localizable.xcstringscmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/SmokeRunner.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxAttachEventTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxConnectionConfigurationTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxFrontendSessionTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxGhosttyViewConfigurationTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxPaneLayoutLogicTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxRenderModelTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxRenderStyleTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxResizePolicyTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxScrollbackWindowTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxShortcutTableTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxTerminalGridGeometryTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxTerminalKeyEventTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxWorkspaceTreeTests.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/ScriptedClientFactory.swiftcmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/ScriptedTransport.swiftcmux-tui/frontends/swift/CmuxLite/project.ymlscripts/check-package-resolved-policy.py
💤 Files with no reviewable changes (122)
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/Resources/Localizable.xcstrings
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxEmptyResponse.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxShortcutTableTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/Resources/Localizable.xcstrings
- cmux-tui/frontends/swift/CmuxLite/Package.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxResizePolicyTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutModifiers.swift
- cmux-tui/frontends/swift/CmuxLite/project.yml
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitDirection.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/URLSessionCmuxProtocolClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/FallbackCmuxProtocolClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxTerminalGridGeometryTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneAttachment.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackRequest.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutInput.swift
- cmux-tui/frontends/swift/CmuxLite/README.ja.md
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/ConfiguredCmuxProtocolClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxAttachEventTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendStartup.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/Resources/Localizable.xcstrings
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspaceSnapshot.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/NetworkCmuxProtocolClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutAction.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPalette.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderRow.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTabSnapshot.swift
- cmux-tui/frontends/swift/CmuxLite/CmuxLite.xcodeproj/xcshareddata/xcschemes/CmuxLite.xcscheme
- cmux-tui/frontends/swift/CmuxLite/README.md
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResizePolicy.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderAttributes.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderFontMetrics.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderStyle.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspace.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScreen.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutKey.swift
- cmux-tui/frontends/swift/CmuxLite/.gitignore
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderModel.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackReconciliation.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxRenderModelTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/NSEvent+CmuxTerminalKeyEvent.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/UnixSocketTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitTarget.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalKeyAction.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneLayoutView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxAttachEvent.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderDeltaEvent.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxGhosttyViewConfiguration.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxGhosttyViewConfigurationParser.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxRenderStyleTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderStateEvent.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScreenSnapshot.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPendingRatio.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurfaceSize.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxSplitDividerView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderCursorStyle.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderUnderline.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/ScriptedClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLayoutRect.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneDirection.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolClientFactory.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTabButton.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalMeasurement.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxPaneLayoutLogicTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxConnectionEndpoint.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/URLSessionWebSocketTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackWindow.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResizeAction.swift
- cmux-tui/frontends/swift/CmuxLite/CmuxLite.xcodeproj/project.pbxproj
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxCommandRequest.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurface.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxFrontendSessionTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxHoverButton.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderCursor.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxWorkspaceTreeTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/CmuxLiteSmoke.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxWindowMutation.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLayout.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/NetworkWebSocketTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxLocalSelection.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolClient.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteSmoke/SmokeRunner.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSurfaceResponse.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxScrollbackDirection.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxGhosttyViewConfigurationTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxPaneViewController.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalGridGeometry.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxReadScrollbackResponse.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxInboundHeader.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTerminalHostViewController.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxSplitRatio.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxIdentifyResponse.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRatioNudge.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxTerminalGridContainerView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/FallbackWebSocketTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxSplitView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxTerminalKeyEvent.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxProtocolError.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneSnapshot.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPane.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxShortcutTable.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxWorkspaceTree.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/NSEvent+CmuxShortcutInput.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxRenderColor.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxResponseEnvelope.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxTerminalKeyEventTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneGeometry.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxStateDump.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxScrollbackWindowTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxRenderRun.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/ScriptedTransport.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxWorkspaceRowView.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxConnectionConfiguration.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxLiteApp.swift
- cmux-tui/frontends/swift/CmuxLite/Tests/CmuxLiteCoreTests/CmuxConnectionConfigurationTests.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendEvent.swift
- scripts/check-package-resolved-policy.py
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxFrontendSession.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxLiteWindowController.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteCore/CmuxPaneLayoutView+Actions.swift
- cmux-tui/frontends/swift/CmuxLite/Sources/CmuxLiteApp/CmuxGhosttyConfigurationResolver.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. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d95ac484fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@greptile-apps review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Greptile SummaryThis PR delivers two independent changes: TUI dead-band dimming for foreign-sized surfaces (when a PTY's effective grid is smaller than its pane, the dead right/bottom area is now dimmed with theme-aware colors, a
Confidence Score: 5/5The change is safe to merge. The dead-band rendering path is additive and degrades gracefully; the fail-closed mouse-input guard protects PTY surfaces without breaking non-PTY or matching-viewport surfaces. Both the rendering and the input-bounding paths are thoroughly tested. The No files require special attention. The most complex logic ( Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant UI as draw_all (pane.rs)
participant TG as terminal_grid.rs
participant App as App.rendered_terminal_bounds
participant Input as handle_mouse (app.rs)
UI->>App: retain(surfaces still in pane_areas)
UI->>TG: draw_render_frame(rect, render, chrome, catalog)
TG->>TG: rendered_viewport_rect → live Rect
TG->>App: insert(surface_id, live)
Note over TG: draw live cells, then draw_foreign_viewport<br/>(dead bands + boundary + hint)
Input->>App: "terminal_input_rect(area) → Option<Rect>"
alt bounds present
App-->>Input: Some(live)
Input->>Input: reject if (x,y) outside live
Input->>Input: forward PTY mouse at live-relative coords
else bounds absent (fail closed)
App-->>Input: None
Input-->>Input: NotOwned / Draw / None
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant UI as draw_all (pane.rs)
participant TG as terminal_grid.rs
participant App as App.rendered_terminal_bounds
participant Input as handle_mouse (app.rs)
UI->>App: retain(surfaces still in pane_areas)
UI->>TG: draw_render_frame(rect, render, chrome, catalog)
TG->>TG: rendered_viewport_rect → live Rect
TG->>App: insert(surface_id, live)
Note over TG: draw live cells, then draw_foreign_viewport<br/>(dead bands + boundary + hint)
Input->>App: "terminal_input_rect(area) → Option<Rect>"
alt bounds present
App-->>Input: Some(live)
Input->>Input: reject if (x,y) outside live
Input->>Input: forward PTY mouse at live-relative coords
else bounds absent (fail closed)
App-->>Input: None
Input-->>Input: NotOwned / Draw / None
end
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
Two pieces, one per commit:
TUI foreign-viewport treatment (https://github.com/manaflow-ai/cmux/issues — user request from the cmux-lite arc: "for TUI mode as well we should draw visible area, or just grey out the non usable area"): when a surface's effective grid is smaller than the pane, the TUI clips content to the live area, dims the dead right/bottom bands (theme-aware + DIM), draws the boundary with
│ ─ ┘, and puts the sized-by hint at the boundary corner. Hint copy is EN/JA locale-selected via the pairing overlay's mechanism, resolved once per process. Tests:foreign_viewport_dims_bands_draws_boundaries_and_places_hint_at_corner,foreign_viewport_dead_space_adapts_to_light_and_dark_chrome,matching_viewport_draws_no_dead_space_boundary_or_hint, plus locale-copy tests.CmuxLite removal: the Swift demo app moved to the private https://github.com/manaflow-ai/cmux-lite (122 files removed; history stays reachable here pre-move). Bilingual
cmux-tui/frontends/READMEpointer added; dead swift-frontend lockfile exception removed fromscripts/check-package-resolved-policy.py.Also verified live (no change needed): render-mode clients that claim via
resize-surfaceare attributed inlist-clients(sizes=N:CxR);nullfor clients that never claim is intentional.Note: local Rust 1.94 clippy flags a pre-existing
collapsible_ifatcmux-tui-core/src/mux.rs:638on unchanged code; CI's toolchain is the gate.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds TUI dead-band dimming with a clear live-area boundary and a localized, allocation-free size hint when a surface grid is smaller than its pane. Centralizes localization and moves the
cmux-liteSwift demo to a separate repo; fixes a rendering artifact and hardens input handling for foreign-sized viewports.New Features
ChromeThemefields:foreign_viewport_bg,foreign_viewport_boundary_fg,foreign_viewport_hint_fg.draw_render_framenow takeschromeand a shared localization catalog; pane/sidebar callers updated.Bug Fixes
Written for commit a5ea9b1. Summary will update on new commits.
Summary by CodeRabbit