Feat/desktop improve scroll performance - #1
Conversation
Initiative INIT-PLEXUSONEAPP-001, three phases (scroll integration fixes, rendering & measurement, tmux strategy) with stable RMI IDs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Track a specific SwiftTerm revision instead of branch main, so its performance characteristics don't shift under us between builds. Refs: RMI-PLEXUSONEAPP-004 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete the app-wide NSEvent scroll monitor and Coordinator.handleScrollEvent, the custom AppTerminalView.handleMouseWheelEvent, and the TerminalContainerView.scrollWheel forward. SwiftTerm's built-in scrollWheel already handles mouse reporting, alternate-screen conversion, and native scrollback; the previous setup processed every wheel event twice and installed one app-wide monitor per pane. Refs: RMI-PLEXUSONEAPP-001 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parseSessionOutput minted a fresh random UUID for every Session on every 5s refresh, breaking SwiftUI ForEach identity and the session-picker checkmark and forcing needless view rebuilds. Derive a deterministic UUIDv5 from the tmux session name so a session keeps one identity across refreshes. Refs: RMI-PLEXUSONEAPP-003 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Some shell-autocomplete tools (Kiro CLI, Fig, Amazon Q) re-exec the shell inside a PTY shim that can deadlock and freeze a pane for every attached client. Detect these wrappers by matching the pane process command against known markers (e.g. "zsh (kiro-cli-term)") at refresh time, and surface the risk in the UI: - TerminalWrapper: known wrapper families, markers, and remediation. - TerminalWrapperDetector: maps tmux sessions to detected wrappers via list-panes + ps; fails soft to an empty map so listing never breaks. - Session.wrapper flag, populated during SessionManager refresh. - WrapperWarningBadge on session pills/status bar and a dismissible, suppressible WrapperWarningBanner with a copyable fix command. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe desktop app now assigns stable tmux session IDs, detects supported terminal wrappers, displays wrapper warnings, uses native terminal scrolling, pins SwiftTerm to a revision, and documents related roadmap work. ChangesDesktop terminal behavior
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SessionManager
participant TerminalWrapperDetector
participant tmux
participant ps
participant ContentView
SessionManager->>TerminalWrapperDetector: detectWrappers()
TerminalWrapperDetector->>tmux: list panes and process IDs
TerminalWrapperDetector->>ps: query process commands
ps-->>TerminalWrapperDetector: process marker data
TerminalWrapperDetector-->>SessionManager: wrappers grouped by session
SessionManager-->>ContentView: publish sessions with wrappers
ContentView->>ContentView: render warning banner and badges
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 `@apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift`:
- Around line 27-50: Update the remediation section in WrapperWarningView.body
to iterate over every element in wrappers instead of using the primary wrapper
from wrappers.first. Render each TerminalWrapper’s remediation text with its own
“Copy” action calling copyToClipboard, while preserving the existing row styling
and layout.
In `@docs/specs/initiatives/INIT-PLEXUSONEAPP-001/ROADMAP.md`:
- Around line 12-21: Update the Phase 1 status in ROADMAP.md to show 2 of 4
items completed and mark RMI-PLEXUSONEAPP-003 and RMI-PLEXUSONEAPP-004 as
completed, leaving the other roadmap items unchanged.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6403d28d-3429-419a-a872-085aae04e46d
📒 Files selected for processing (13)
apps/desktop/Package.swiftapps/desktop/Sources/PlexusOneDesktop/Models/Session.swiftapps/desktop/Sources/PlexusOneDesktop/Models/TerminalWrapper.swiftapps/desktop/Sources/PlexusOneDesktop/Services/SessionManager.swiftapps/desktop/Sources/PlexusOneDesktop/Services/TerminalWrapperDetector.swiftapps/desktop/Sources/PlexusOneDesktop/Views/AppTerminalView.swiftapps/desktop/Sources/PlexusOneDesktop/Views/ContentView.swiftapps/desktop/Sources/PlexusOneDesktop/Views/StatusBarView.swiftapps/desktop/Sources/PlexusOneDesktop/Views/TerminalViewRepresentable.swiftapps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swiftapps/desktop/Tests/PlexusOneDesktopTests/SessionManagerTests.swiftapps/desktop/Tests/PlexusOneDesktopTests/TerminalWrapperDetectorTests.swiftdocs/specs/initiatives/INIT-PLEXUSONEAPP-001/ROADMAP.md
💤 Files with no reviewable changes (2)
- apps/desktop/Sources/PlexusOneDesktop/Views/AppTerminalView.swift
- apps/desktop/Sources/PlexusOneDesktop/Views/TerminalViewRepresentable.swift
….swift Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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 `@apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift`:
- Around line 49-51: Remove the extra closing brace immediately before Spacer()
in the WrapperWarningView view hierarchy, keeping the outer HStack open through
Spacer() and the action controls so the subsequent modifier chain remains
attached and the file compiles.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a138b9b5-91a8-43ee-9e8f-2cba17fee9d4
📒 Files selected for processing (1)
apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift
The prior commit (2285126) changed WrapperWarningBanner's fix-command list from showing only the first wrapper to a ForEach over all detected wrappers, but left an extra closing brace behind. That unbalanced brace made the SwiftUI ViewBuilder closure terminate early, breaking `body`'s trailing modifiers and every declaration below it in the file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
The coderabbit status sync in b526279 marked RMI-003 and RMI-004 done but missed RMI-001, which commit 6ec3de2 already completed (carries Refs: RMI-PLEXUSONEAPP-001 and matches the item's description exactly). Only RMI-002 remains open in Phase 1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Various fixes to improve scrolling performance.
Summary by CodeRabbit
New Features
Bug Fixes