Skip to content

Feat/desktop improve scroll performance - #1

Merged
grokify merged 9 commits into
mainfrom
feat/desktop-scroll-perf
Aug 8, 2026
Merged

Feat/desktop improve scroll performance#1
grokify merged 9 commits into
mainfrom
feat/desktop-scroll-perf

Conversation

@grokify

@grokify grokify commented Aug 8, 2026

Copy link
Copy Markdown
Member

Various fixes to improve scrolling performance.

Summary by CodeRabbit

  • New Features

    • Detects terminal wrappers such as Kiro CLI, Fig, and Amazon Q.
    • Displays wrapper badges and warning banners for affected sessions.
    • Provides wrapper-specific remediation commands with clipboard copying.
    • Supports dismissing warnings temporarily or permanently.
    • Session identities remain stable across refreshes.
  • Bug Fixes

    • Improved terminal scrolling by using native scrollback behavior.
    • Session listings remain available when wrapper detection encounters errors.
    • Wrapper detection handles unavailable or malformed terminal information gracefully.

grokify and others added 5 commits August 8, 2026 04:28
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>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@grokify, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 80940d7a-a80a-4f4c-b48b-52ea231a8ebb

📥 Commits

Reviewing files that changed from the base of the PR and between e020ceb and 3af5c5f.

📒 Files selected for processing (1)
  • docs/specs/initiatives/INIT-PLEXUSONEAPP-001/ROADMAP.md
📝 Walkthrough

Walkthrough

The 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.

Changes

Desktop terminal behavior

Layer / File(s) Summary
Stable session identity and dependency pinning
apps/desktop/Package.swift, apps/desktop/Sources/PlexusOneDesktop/Models/Session.swift, apps/desktop/Tests/PlexusOneDesktopTests/SessionManagerTests.swift
tmux session IDs now derive deterministically from session names. Session stores an optional wrapper. SwiftTerm uses a fixed revision. Tests cover stable and distinct IDs.
Terminal wrapper detection and session integration
apps/desktop/Sources/PlexusOneDesktop/Models/TerminalWrapper.swift, apps/desktop/Sources/PlexusOneDesktop/Services/TerminalWrapperDetector.swift, apps/desktop/Sources/PlexusOneDesktop/Services/SessionManager.swift, apps/desktop/Tests/PlexusOneDesktopTests/TerminalWrapperDetectorTests.swift
The app detects Kiro CLI, Figterm, and Amazon Q wrappers from tmux pane processes. Detection attaches the first match per session and returns empty results on failures.
Wrapper warning presentation
apps/desktop/Sources/PlexusOneDesktop/Views/ContentView.swift, apps/desktop/Sources/PlexusOneDesktop/Views/StatusBarView.swift, apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift
The interface displays wrapper badges and dismissible warnings with remediation commands, clipboard copying, accessibility text, and persistent suppression.
Native terminal scrolling and roadmap
apps/desktop/Sources/PlexusOneDesktop/Views/AppTerminalView.swift, apps/desktop/Sources/PlexusOneDesktop/Views/TerminalViewRepresentable.swift, docs/specs/initiatives/INIT-PLEXUSONEAPP-001/ROADMAP.md
Custom mouse-wheel dispatch and local event monitoring were removed. The roadmap records planned scrolling, rendering, and tmux integration work.

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the desktop scroll-handling changes, although the pull request also adds terminal-wrapper detection and warning views.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/desktop-scroll-perf

Comment @coderabbitai help to get the list of available commands.

@grokify grokify changed the title Feat/desktop scroll perf Feat/desktop improve scroll performance Aug 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 031432a and 1b5c3e5.

📒 Files selected for processing (13)
  • apps/desktop/Package.swift
  • apps/desktop/Sources/PlexusOneDesktop/Models/Session.swift
  • apps/desktop/Sources/PlexusOneDesktop/Models/TerminalWrapper.swift
  • apps/desktop/Sources/PlexusOneDesktop/Services/SessionManager.swift
  • apps/desktop/Sources/PlexusOneDesktop/Services/TerminalWrapperDetector.swift
  • apps/desktop/Sources/PlexusOneDesktop/Views/AppTerminalView.swift
  • apps/desktop/Sources/PlexusOneDesktop/Views/ContentView.swift
  • apps/desktop/Sources/PlexusOneDesktop/Views/StatusBarView.swift
  • apps/desktop/Sources/PlexusOneDesktop/Views/TerminalViewRepresentable.swift
  • apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift
  • apps/desktop/Tests/PlexusOneDesktopTests/SessionManagerTests.swift
  • apps/desktop/Tests/PlexusOneDesktopTests/TerminalWrapperDetectorTests.swift
  • docs/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

Comment thread apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift Outdated
Comment thread docs/specs/initiatives/INIT-PLEXUSONEAPP-001/ROADMAP.md Outdated
….swift

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b5c3e5 and 2285126.

📒 Files selected for processing (1)
  • apps/desktop/Sources/PlexusOneDesktop/Views/WrapperWarningView.swift

grokify and others added 3 commits August 8, 2026 04:49
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>
@grokify
grokify merged commit 723fe59 into main Aug 8, 2026
2 checks passed
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