add active session switching and consistent terminal selector sheets - #21
Conversation
Deploying getremux with
|
| Latest commit: |
8440c85
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5a228d17.getremux.pages.dev |
| Branch Preview URL: | https://feature-active-session-switc.getremux.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds active-session switching and disconnection flows, preserves setup cancellation destinations, introduces shared terminal runtime indicators, and refactors terminal selection sheets around shared styling, content-based sizing, and unified pane-count APIs. ChangesActive-session switching and setup state
Terminal navigation and presentation
Selection-sheet geometry and styling
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
RemuxApp/Sources/App/RemuxRootModel.swift (1)
281-295: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCredential/server repair setup doesn't return to the originating terminal on cancel.
beginServerRepair/beginCredentialRepair(and the underlyingbeginEditServer) never pass acancelDestination, so they always default to.library. These flows are commonly entered from an active terminal (RootView'sonUpdateCredentials/onEditServer), similar tobeginNewWorkspace, which now correctly returns to the originating terminal viaSetupCancelDestination.terminal(_:). For consistency with the new cancellation-destination feature, consider threading acancelDestinationthrough these repair entry points as well.♻️ Sketch of the change
-func beginServerRepair(for workspaceID: SavedWorkspace.ID) async { +func beginServerRepair( + for workspaceID: SavedWorkspace.ID, + cancelDestination: SetupCancelDestination = .library +) async { guard let workspace = library.workspace(id: workspaceID) else { return } - await beginEditServer(serverID: workspace.serverID, reconnectWorkspaceID: workspaceID) + await beginEditServer( + serverID: workspace.serverID, + reconnectWorkspaceID: workspaceID, + cancelDestination: cancelDestination + ) }Also applies to: 297-325
🤖 Prompt for 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. In `@RemuxApp/Sources/App/RemuxRootModel.swift` around lines 281 - 295, Thread a SetupCancelDestination through beginServerRepair and beginCredentialRepair into beginEditServer, using the originating terminal destination when these flows are launched from RootView’s onUpdateCredentials/onEditServer. Preserve the existing library fallback for callers without a terminal context, matching beginNewWorkspace’s cancellation behavior.RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift (1)
527-543: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated tile chrome between window and pane selection tiles.
GhosttyWindowSelectionTileandGhosttyPaneSelectionTileboth apply the identical background/border/checkmark-overlay block againstTerminalSelectionSheetPalette; extracting a sharedViewModifier(e.g..terminalSelectionTileChrome(isSelected:chromeStyle:)) would keep future palette/selection-indicator tweaks in one place.
RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift#L527-L543: replace this block with a shared tile-chrome modifier applied to the tile's content.RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift#L633-L649: apply the same shared modifier here instead of repeating the block.🤖 Prompt for 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. In `@RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift` around lines 527 - 543, Extract the duplicated TerminalSelectionSheetPalette background, border, and selected checkmark overlay from GhosttyWindowSelectionTile and GhosttyPaneSelectionTile into a shared ViewModifier, such as terminalSelectionTileChrome(isSelected:chromeStyle:). Replace the repeated blocks at RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift lines 527-543 and 633-649 with that modifier applied to each tile’s content, preserving the existing selection styling and checkmark behavior at both sites.
🤖 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 `@RemuxApp/Sources/Ghostty/PanePreviewLayout.swift`:
- Around line 30-54: Update gridIdealHeight so single-row grids return
fullHeight before applying the scrolling height calculation. Preserve the
existing budget and multi-row peek behavior for grids that require scrolling.
---
Nitpick comments:
In `@RemuxApp/Sources/App/RemuxRootModel.swift`:
- Around line 281-295: Thread a SetupCancelDestination through beginServerRepair
and beginCredentialRepair into beginEditServer, using the originating terminal
destination when these flows are launched from RootView’s
onUpdateCredentials/onEditServer. Preserve the existing library fallback for
callers without a terminal context, matching beginNewWorkspace’s cancellation
behavior.
In `@RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift`:
- Around line 527-543: Extract the duplicated TerminalSelectionSheetPalette
background, border, and selected checkmark overlay from
GhosttyWindowSelectionTile and GhosttyPaneSelectionTile into a shared
ViewModifier, such as terminalSelectionTileChrome(isSelected:chromeStyle:).
Replace the repeated blocks at
RemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swift lines 527-543 and
633-649 with that modifier applied to each tile’s content, preserving the
existing selection styling and checkmark behavior at both sites.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 37c32c03-d0e7-4e1a-b28a-2839ce618994
📒 Files selected for processing (23)
Remux.xcodeproj/project.pbxprojRemuxApp/Sources/App/ActiveSessionSwitcherView.swiftRemuxApp/Sources/App/ConnectionPresentation.swiftRemuxApp/Sources/App/RemuxActiveSessionCollection.swiftRemuxApp/Sources/App/RemuxRootModel.swiftRemuxApp/Sources/App/RootView.swiftRemuxApp/Sources/App/TerminalRuntimeStateIndicator.swiftRemuxApp/Sources/Ghostty/GhosttyKeyboardChrome.swiftRemuxApp/Sources/Ghostty/GhosttyKeyboardVisibilityProjection.swiftRemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swiftRemuxApp/Sources/Ghostty/GhosttySurfaceSelectionSheet.swiftRemuxApp/Sources/Ghostty/GhosttyTerminalPresentationProjector.swiftRemuxApp/Sources/Ghostty/GhosttyTerminalScreenModeling.swiftRemuxApp/Sources/Ghostty/PanePreviewLayout.swiftRemuxApp/Sources/Ghostty/TerminalSelectionSheetStyle.swiftRemuxApp/Sources/Tmux/TmuxTerminalScreenAdapter.swiftRemuxAppTests/ActiveSessionSwitcherProjectionTests.swiftRemuxAppTests/GhosttyPhoneChromeLayoutTests.swiftRemuxAppTests/GhosttyTerminalPresentationProjectorTests.swiftRemuxAppTests/PanePreviewLayoutTests.swiftRemuxAppTests/RemuxRootModelTests.swiftRemuxAppTests/TmuxTerminalScreenAdapterTests.swiftRemuxAppUITests/RemuxAppUITests.swift
💤 Files with no reviewable changes (2)
- RemuxAppTests/GhosttyTerminalPresentationProjectorTests.swift
- RemuxAppTests/TmuxTerminalScreenAdapterTests.swift
Deploying remux with
|
| Latest commit: |
8440c85
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ab368f35.remux-agx.pages.dev |
| Branch Preview URL: | https://feature-active-session-switc.remux-agx.pages.dev |
Summary
Adds an active tmux session switcher to the terminal and aligns the Sessions, Windows, and Panes sheets with a consistent iOS design.
What changed
Validation
ActiveSessionSwitcherProjectionTestsPanePreviewLayoutTestsGhosttyPhoneChromeLayoutTestsRemuxRootModelTestsScreenshots
Summary by CodeRabbit