Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: 66daed06fdf6f8d94484dad03e8623cb1ae487cf
- Latest commit, not reviewed: de641fb84b0442ce63949b8e0bbcb87450f5313b
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds contribution-status contracts, server storage and streaming, Pi session routing, and web and mobile displays. It also adds a typed web side-panel registry and moves panel rendering into host-scoped components.
Changes: Contribution Status
Layer / File(s) Summary Status contracts and subscription RPC
packages/contracts/src/contributionStatus.ts,packages/contracts/src/environment.ts,packages/contracts/src/rpc.ts,packages/contracts/src/index.ts,packages/client-runtime/src/rpc/client.tsDefines status schemas, source and item limits, the server capability, and the streaming subscription RPC contract. Status store and server stream
apps/server/src/contributions/*,apps/server/src/auth/RpcAuthorization.ts,apps/server/src/environment/ServerEnvironment.ts,apps/server/src/provider/ProviderOrchestrationAdapterInfrastructure.ts,apps/server/src/server.ts,apps/server/src/ws.ts,apps/server/src/observability/RpcInstrumentation.tsAdds the scoped status store, normalization and admission limits, snapshot subscriptions, authorization, and shared server-layer wiring. Tests cover store behavior and RPC snapshots, updates, interruption, and authorization. Pi status routing and lifecycle
apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/PiAdapterV2.test.tsRoutes Pi extension status updates to the store and binds, clears, or restores statuses as sessions switch, close, or roll back. Tests cover lifecycle ordering and rollback outcomes. Client subscriptions and status views
packages/client-runtime/src/state/contributionStatus*,packages/client-runtime/package.json,apps/web/src/state/contributionStatus.ts,apps/web/src/components/chat/ThreadContributionStatus*,apps/web/src/components/chat/ChatHeader.tsx,apps/mobile/src/state/contribution-status.ts,apps/mobile/src/features/threads/thread-contribution-status-presentation*,apps/mobile/src/features/threads/ThreadContributionStatusStrip.tsx,apps/mobile/src/features/threads/ThreadDetailScreen.tsx,apps/mobile/src/features/threads/ThreadFeed.tsx,apps/mobile/src/lib/layout*,docs/user/providers-pi.mdAdds capability-gated client subscriptions and status displays in web and mobile. Mobile feed geometry accounts for the strip; tests cover mapping, display, subscriptions, and layout behavior. Registered Side Panels
Layer / File(s) Summary Panel registry and host contract
apps/web/src/panels/panelRegistry*,apps/web/src/panels/panelHost.ts,apps/web/src/panels/bundledPanels*Defines typed lazy panel registrations, metadata, host context, and the bundled panel set. Tests cover lazy loading, component identity, and panel prop typing. Panel launchers and ChatView wiring
apps/web/src/components/ChatView.tsx,apps/web/src/components/RightPanelTabs*,apps/web/src/routes/_chat.pull-requests.tsxReplaces inline panel branches with registered panels, supplies host context, and builds launcher actions and surface metadata from panel definitions. Registered panel implementations
apps/web/src/panels/{preview,diff,device,pullRequest}/*,apps/web/src/components/diffs/*,apps/web/src/components/pullRequest/*Moves preview, diff, device, and pull-request panels to host-scoped implementations and updates their loading-state components. Tests cover panel loading, host-thread actions, device operation scope, and preview picker behavior. File panel scoped actions
apps/web/src/panels/files/*,apps/web/src/components/files/FileBrowserPanel.tsx,apps/web/src/browser/openFileInPreview.tsScopes file selection, composer insertion, and preview opening to the active panel visit. Tests cover thread changes, stale callbacks, and late browser results. Terminal panel and persistent drawer
apps/web/src/panels/terminal/*,apps/web/src/components/ChatView.tsxMoves persistent terminal drawer logic out of ChatViewand adds a registered terminal panel that derives launch data from host, thread, project, and session state. Tests cover host changes and terminal attachment.Estimated code review effort: 5 (Critical) | ~90 minutes
Change: Feature
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant PiAdapterV2 3 participant ContributionStatusStore 4 participant subscribeContributionStatus 5 participant ContributionStatusEnvironmentAtoms 6 participant ThreadContributionStatus 7 PiAdapterV2->>ContributionStatusStore: Set or clear session status 8 ContributionStatusStore->>subscribeContributionStatus: Stream snapshot replacements 9 subscribeContributionStatus->>ContributionStatusEnvironmentAtoms: Deliver status snapshots 10 ContributionStatusEnvironmentAtoms->>ThreadContributionStatus: Select entries for an environment and thread Suggested reviewers:
juliusmarminge
Merge Risk: External image Low · previous review 66dae
Thread annotation sends are now limited to the thread that started them. One small issue remains: closing a terminal can produce an unhandled error if the close request or the fallback exit write fails. This is a low-impact follow-up, not a broad blocker.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
66daeThe new status channel is read-authorized, bounded, and rendered as advisory plain text. Panel actions retain existing send controls and gain explicit thread binding. No material security regression was established, but status clearing during authorization or connection loss remains insufficiently demonstrated.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
- observed — A caller with orchestration-read scope receives statuses for populated threads throughout one server environment, not just the open thread. Stored visible content is capped at 128 items across 64 visible threads, with eight items per source. Exposure includes status text, optional tooltips, thread IDs, and provider-source identity.
Trust Boundaries and Controls
- observed — The new subscription passes through authenticated WebSocket setup and connection-scope RPC middleware. It requires orchestration-read scope; the inspected RPC test verifies rejection of a caller holding only relay-read scope.
- observed — Panel annotations use the existing ChatView onSend path, retaining operation-scope and send-readiness gates. The new sender checks the captured environment/thread key against the latest committed sender, rejecting stale panel actions after a thread change.
Resilience and Maintainability Implications
- observed — The store serializes mutations and snapshots under a mutex. Slot generations invalidate replaced producers, repeated binding preserves an owned slot, stale clears cannot remove replacement data, and source-scope finalization releases only the still-owned slot.
- inferred — Immediate removal of already-received status data during authorization failure or session absence remains unproven. The status selector reads a generic subscription result, session absence emits no replacement frame, and the inspected reconnect test clears data only after a new snapshot. This does not establish delivery to an unauthorized caller.
Hardening Proposals
- proposed — Define an explicit status-cache invalidation policy for authorization loss and account/session replacement, including the interval before any replacement snapshot arrives. This would make the privacy and freshness guarantee independent of generic stream-atom behavior.
Important
Pre-merge checks failed
Please resolve all errors before merging. Addressing warnings is optional.
Failed Failed checks: 1 error · 1 warning
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Approvability | Error | The PR adds a contribution-status subsystem across packages and apps, including a new contract in packages/contracts/src/contributionStatus.ts, server storage in `apps/server/src/contributions/Contr… | This pull request needs a maintainer's review under the subsystem and large-refactor rule. A maintainer should review the contribution-status changes and the web panel refactor before CodeRabbit approves it. |
| Description check | Warning | The description covers the problem, implementation, verification results, UI evidence, limitations, and agent details. However, the required scope approval is missing. It explicitly states that no mai… | Add a link to explicit maintainer approval of the direction and scope, including the approval comment. If this qualifies for an approval exemption, explain the exemption and why the change is a focused, established-capability configuration.… |
Passed Passed checks: 3 passed
Check name Status Explanation 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. Title check Passed The title clearly and concisely describes the primary change: displaying Pi extension statuses below the mobile thread header.
Full details: Approvability
Explanation
The PR adds a contribution-status subsystem across packages and apps, including a new contract in
packages/contracts/src/contributionStatus.ts, server storage inapps/server/src/contributions/ContributionStatusStore.ts, client state inpackages/client-runtime/src/state/contributionStatus.ts, and mobile UI inapps/mobile/src/features/threads/ThreadContributionStatusStrip.tsx. It also includes a broad web panel refactor;apps/web/src/components/ChatView.tsxhas 898 changed lines in the reviewed diff. This matches the rule: “Adds a subsystem or user workflow, or is a large refactor across apps or packages.”Resolution
This pull request needs a maintainer's review under the subsystem and large-refactor rule. A maintainer should review the contribution-status changes and the web panel refactor before CodeRabbit approves it.
Full details: Description check
Explanation
The description covers the problem, implementation, verification results, UI evidence, limitations, and agent details. However, the required scope approval is missing. It explicitly states that no maintainer has agreed to the proposed direction, and the linked issue and discussion do not provide explicit maintainer approval.
Resolution
Add a link to explicit maintainer approval of the direction and scope, including the approval comment. If this qualifies for an approval exemption, explain the exemption and why the change is a focused, established-capability configuration. Rename the “Fix” section to “Change” if required for exact template alignment.
Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
ℹ️ Recent review info
-
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
525659fa-59ae-4087-82a5-87f65c4b1151
📥 Commits
Reviewing files that changed from the base of the PR and between 5ca3080fb3f4384951fb02a41cb3f5d93be395d1 and 66daed06fdf6f8d94484dad03e8623cb1ae487cf.
📒 Files selected for processing (1)
apps/web/src/components/ChatView.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
525659fa-59ae-4087-82a5-87f65c4b1151
📥 Commits
Reviewing files that changed from the base of the PR and between 5ca3080fb3f4384951fb02a41cb3f5d93be395d1 and 66daed06fdf6f8d94484dad03e8623cb1ae487cf.
📒 Files selected for processing (1)
apps/web/src/components/ChatView.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.