Universal Tools Sidebar#378
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
More reviews will be available in 14 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (18)
✨ 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 |
|
@copilot review but do not make fixes |
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
There was a problem hiding this comment.
PR Review
Scope: 23 file(s), +707 / −164
Verdict: Minor issues
This PR makes the Work tools sidebar usable before a chat session exists (draft draftTargetId routing), expands PTY context insertion to more agent CLIs, improves plan markdown rendering, and adjusts Codex policy sync on resume. The main residual risks are shared-resource contention on the iOS simulator and a lane-label mismatch when Auto-create is selected.
🐛 Functionality
[Medium] iOS simulator input is no longer blocked when another chat owns the session
File: apps/desktop/src/renderer/components/chat/ChatIosSimulatorPanel.tsx:L1162-L1164
Issue: controlsOwnedElsewhere now only reflects controlsDisabled, not ownedByOtherChat. The ownership banner still renders, but keyboard/tap handlers no longer early-return for non-owning chats, so live input and inspect selections can mutate the shared simulator while context is routed to a different chat/draft.
Repro: Start chat A and connect it to the iOS simulator. Open chat B, open the Work sidebar iOS tab, focus the live surface, and press a key or inspect-tap — typeText / selectPoint still run (see updated ChatIosSimulatorPanel tests).
Fix: Either restore hard blocking for ownedByOtherChat on interact/inspect paths, or gate iosSimulator.* IPC calls on the active chatSessionId in the main process so only the owning session can drive the device while still allowing read-only viewing for others.
🎨 UI/UX
[Low] Auto-create lane label disagrees with Work sidebar lane context
File: apps/desktop/src/renderer/components/chat/AgentChatPane.tsx:L6563-L6567
Issue: Choosing "Auto-create lane" keeps that label in the composer lane picker but immediately calls onLaneChange(primaryDraftLane.id), so Git/Files/iOS/browser tools bind to Primary's worktree while the user may believe tools target the not-yet-created lane.
Fix: Show an explicit helper under the picker (e.g. "Tools use Primary until the lane is created") or drive onLaneChange from the lane that will actually be created once auto-create resolves, if that path is known pre-send.
Notes
- Draft-scoped sidebar insertion (
draftContextTargetId,matchesThisDraftinAgentChatPane.tsx) and theTerminalsPagedraftcontextTargetwiring look coherent; tests cover wrong-target rejection and PTY/chat/draft dispatch paths. - Codex
shouldPreserveRequestedCodexPolicyon resume is intentional for picker authority; thread/start still applies runtime policy when norequestedCodexPolicyis passed. - Lane-mismatch warnings without disabling insertion are deliberate (controls vs. context target); users should read the amber banner before inserting cross-lane context.
- Plan markdown uses existing
ChatMarkdown/MarkdownBlockpipelines; no new unsanitized HTML surface spotted in this diff.
Sent by Cursor Automation: BUGBOT in Versic
|
@copilot review but do not make fixes |


Summary
Describe the change.
What Changed
Key files and behaviors.
Validation
How you tested.
Risks
Anything to watch.
Greptile Summary
This PR implements the "Universal Tools Sidebar," allowing the Work sidebar's tool panels (iOS Simulator, App Control, Built-in Browser) to insert context directly into a draft
AgentChatPaneeven before a chat session exists. A new"draft"variant is added toWorkSidebarContextTarget, and adraftContextTargetIdstring (format:work:draft:<laneId>:<draftKind>) is threaded fromTerminalsPagethroughWorkViewArea→WorkStartSurface→AgentChatPaneso the sidebar can dispatch matching window events to the correct composer.AgentChatPane:dispatchAgentChatEventnow emits eithersessionId(chat) ordraftTargetId/laneId/draftKind(draft) details;matchesThisDraftguards onforceDraftanddraftContextTargetIdto prevent stale or cross-lane delivery.CodexPlanCardgains anArray.isArrayguard onevent.steps, inline markdown display for step-free complete plans;ChatProposedPlanCardrenders the full plan body withChatMarkdown;agentChatService.tsaddsshouldPreserveRequestedCodexPolicy.Confidence Score: 5/5
Safe to merge — the draft routing is well-guarded and thoroughly tested.
The draft context target flows cleanly from TerminalsPage through the prop chain into the AgentChatPane event listeners; matchesThisDraft correctly gates on both forceDraft and an exact draftContextTargetId match, preventing cross-lane or cross-pane delivery. All simulator mutation callbacks still check ownedByOtherChat. Tests cover the new routing path, auto-create lane hint, and policy-preservation logic.
No files require special attention.
Important Files Changed
Reviews (2): Last reviewed commit: "ship: iteration 1 — address review findi..." | Re-trigger Greptile