Repository navigation
Fix desktop terminal viewport and transactional pane focus - #99
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reproduce the topology-independent cold attach where the mobile visualViewport height rule zeroed the desktop terminal, and require a grid above the observed nine-row failure.
|
Warning Review limit reached
Next review available in: 38 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughTerminal navigation now supports correlated ChangesTerminal navigation and reconciliation
Local Claude chat
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
services/control-plane/src/routes/terminal.ts (1)
453-469: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winReturn a navigation failure when agent dispatch fails.
The pending request is recorded, but this
sendToAgentresult is ignored. If the agent disconnects here, nonavigation_resultreaches the browser and the dashboard can remain input-fenced. Check the return value, remove and record the pending request asfailure, then send the correlated failure payload to the UI.🤖 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 `@services/control-plane/src/routes/terminal.ts` around lines 453 - 469, Handle the result of pubsub.sendToAgent in the terminal navigation dispatch: when sending fails, remove the correlated entry from pendingNavigationRequests, record it as a failure, and send the matching navigation_result failure payload to the UI using the existing request correlation and response path. Preserve the current successful dispatch behavior and idle-timeout reset.
🤖 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/dashboard/src/hooks/useTerminalConnection.ts`:
- Around line 296-303: Wrap the entire case 'attached' body in braces so the
lexical declarations terminalSnapshot, selectedDescriptor, selectedPaneId, and
attachmentPaneChanged are scoped to that case and no longer trigger
noSwitchDeclarations.
- Around line 344-357: Update the reconciliation error handling in the catch
block alongside beginViewerReconciliation and reconcilingViewerRef so the local
path resets reconcilingViewerRef.current and setReconcilingViewer(false) when
persistentReconciliation is false. Preserve finishViewerReconciliation for the
persistent path, while ensuring every reconciliation failure releases the
input-blocking state used by sendInput.
In `@project_status.md`:
- Line 20: Specify the language identifier for the fenced code block in
project_status.md by changing the bare fence to use text, preserving the block’s
existing content.
In `@tasks/2026-07-22-android-terminal-daily-driver-acceptance-checklist.md`:
- Line 3: Update the checklist’s Status declaration from approved to in progress
while required criteria, including HUMAN-1, remain unchecked and the final
report indicates pending completion. Only restore approved after all mandatory
checkboxes are checked and supported by recorded evidence.
In `@tasks/2026-07-22-android-terminal-daily-driver-plan.md`:
- Around line 170-174: Update the “Current reviewed local candidate baseline”
entry in the recovery record to use the integrated candidate commit
59daa0e40f77405d5a8dee290dad73488a6ef29e, or explicitly label
d3416a9d1934ddf49b5e97fd0e61c707a1c466d5 as historical. Ensure the rollout and
rollback provenance is unambiguous.
- Around line 103-106: Gate production rollout behind explicit authorization: in
tasks/2026-07-22-android-terminal-daily-driver-plan.md lines 103-106, change the
production deployment policy so approval is required and direct-to-production is
not the default; in tasks/2026-07-22-android-terminal-daily-driver-status.md
lines 34-39, replace the immediate rollout sequence with an authorization gate,
recording deployment and health receipts only after approval.
In `@tasks/2026-07-22-android-terminal-daily-driver-status.md`:
- Around line 14-18: Update the W2 row’s “Blocked on” entry to remove the
completed W1 reviewer pass prerequisite and reflect the remaining gate of W1
production rollout and live laptop acceptance; if that gate is already complete,
transition W2 out of “held” accordingly.
---
Outside diff comments:
In `@services/control-plane/src/routes/terminal.ts`:
- Around line 453-469: Handle the result of pubsub.sendToAgent in the terminal
navigation dispatch: when sending fails, remove the correlated entry from
pendingNavigationRequests, record it as a failure, and send the matching
navigation_result failure payload to the UI using the existing request
correlation and response path. Preserve the current successful dispatch behavior
and idle-timeout reset.
🪄 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
Run ID: d94869f5-99b9-41d8-85c3-6122e87c7c51
📒 Files selected for processing (67)
agents/agentd/cmd/agentd/main.goagents/agentd/cmd/agentd/main_terminal_test.goagents/agentd/internal/protocol/messages.goagents/agentd/internal/protocol/terminal.goagents/agentd/internal/tmux/pty_bridge_test.goagents/agentd/internal/tmux/terminal.goagents/agentd/internal/tmux/viewer_pty.goagents/agentd/internal/ws/protocol_fixtures_test.goapps/dashboard/src/components/TerminalView.tsxapps/dashboard/src/components/session/SessionWorkbench.tsxapps/dashboard/src/components/terminal/PersistentTerminalHost.tsxapps/dashboard/src/components/terminal/TerminalHistoryOverlay.test.tsapps/dashboard/src/components/terminal/TerminalHistoryOverlay.tsxapps/dashboard/src/components/terminal/TerminalSurface.tsxapps/dashboard/src/components/terminal/terminalHostStore.test.tsapps/dashboard/src/components/terminal/terminalHostStore.tsapps/dashboard/src/components/terminal/terminalNavigationRequests.test.tsapps/dashboard/src/components/terminal/terminalNavigationRequests.tsapps/dashboard/src/components/terminal/types.tsapps/dashboard/src/components/tmux/PromptComposer.tsxapps/dashboard/src/components/tmux/TmuxActionSheet.tsxapps/dashboard/src/components/tmux/TmuxMobileShell.tsxapps/dashboard/src/components/tmux/TmuxPaneControls.tsxapps/dashboard/src/components/tmux/TmuxPaneSwitcher.tsxapps/dashboard/src/components/tmux/TmuxQuickSwitchStrip.tsxapps/dashboard/src/components/tmux/TmuxTerminalWorkspace.tsxapps/dashboard/src/components/tmux/TmuxWindowStrip.tsxapps/dashboard/src/components/tmux/paneSwitcher.test.tsapps/dashboard/src/components/tmux/paneSwitcher.tsapps/dashboard/src/hooks/useTerminalConnection.tsapps/dashboard/src/hooks/useTmuxRosterData.tsapps/dashboard/src/stores/settings.tspackages/ac-schema/src/message.tspackages/ac-schema/src/terminal.tspackages/ac-schema/tests/protocol-fixtures.test.tspackages/ac-schema/tests/terminal.test.tsproject_status.mdservices/control-plane/src/metrics.test.tsservices/control-plane/src/metrics.tsservices/control-plane/src/routes/terminal.tsservices/control-plane/src/ws/agent.tsservices/control-plane/tests/terminalRoute.test.tstasks/2026-07-22-android-terminal-daily-driver-acceptance-checklist.mdtasks/2026-07-22-android-terminal-daily-driver-escalation-report.mdtasks/2026-07-22-android-terminal-daily-driver-final-report.mdtasks/2026-07-22-android-terminal-daily-driver-handoffs/README.mdtasks/2026-07-22-android-terminal-daily-driver-handoffs/w1-shared-terminal-r2-review.mdtasks/2026-07-22-android-terminal-daily-driver-handoffs/w1-shared-terminal-r2.mdtasks/2026-07-22-android-terminal-daily-driver-handoffs/w1-shared-terminal-review.mdtasks/2026-07-22-android-terminal-daily-driver-handoffs/w1-shared-terminal.mdtasks/2026-07-22-android-terminal-daily-driver-log.mdtasks/2026-07-22-android-terminal-daily-driver-metrics.jsonltasks/2026-07-22-android-terminal-daily-driver-plan.mdtasks/2026-07-22-android-terminal-daily-driver-status.mdtasks/2026-07-22-android-w1-shared-terminal-brief.mdtasks/2026-07-22-android-w1-shared-terminal-r2-brief.mdtasks/2026-07-22-android-w1-shared-terminal-r2-review-brief.mdtasks/2026-07-22-android-w1-shared-terminal-review-brief.mdtasks/frontend-ux-log.mdtasks/lessons.mdtests/fixtures/protocol/terminal-focus-pane.jsontests/fixtures/protocol/terminal-navigation-result.jsontests/fixtures/protocol/terminal-viewer-state.jsontests/journeys/command-center.journey.spec.tstests/journeys/controlPlaneMock.tstests/journeys/fw6-focus.journey.spec.tstests/journeys/fw6-precision.journey.spec.ts
Outcome
Verification
Production rollout will be followed by SOURCE_COMMIT, health, two-agent reconnect, and live laptop checks.
Summary by CodeRabbit
New Features
Bug Fixes