fix: scope agent views to the selected machine - #3784
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes agent view filtering and sorting. It adds a revision-bound endpoint projection protocol. Servers send view changes with snapshots. Clients validate and store projections against endpoint generations and revisions. Aggregate rendering and navigation apply the active endpoint view. Tests cover filtering, sorting, stale projections, capability handling, and projection lifecycle. Suggested reviewers: Priority: ⬇️ Low — Defer the machine-scoped agent view change because it is a compatibility and rendering update spanning endpoint projection, server state, and client navigation. Merge Risk: ⚪ Minimal · up to Agent views now scope workspace and tab matches to the selected machine while preserving independent cross-machine filters. Revision-bound projection handling and fallback behavior are covered, with no concrete merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
Greptile SummaryThis PR applies the selected machine’s validated agent-view policy to the combined agent list while preserving endpoint identity for contextual workspace and tab comparisons.
Confidence Score: 5/5The PR appears safe to merge; no actionable new defects or outstanding previous findings remain. The selected endpoint’s policy is coherently paired with its snapshot, contextual IDs carry endpoint scope, fallback behavior remains compatible, and stable public ordering resolves the previously reported sorting discrepancy.
|
| Filename | Overview |
|---|---|
| src/agent_view_eval.rs | Centralizes filter and sorting evaluation, including endpoint-scoped identifiers for contextual comparisons. |
| src/client/shell/aggregate_navigation.rs | Applies the selected endpoint’s validated view to combined agent rows and uses stable public tab and pane numbers. |
| src/client/shell/endpoints.rs | Tracks capability-negotiated, generation- and revision-bound agent-view projections alongside endpoint snapshots. |
| src/protocol/endpoint.rs | Defines the optional agent-view projection capability, control envelope, and encoding support. |
| src/server/headless/render.rs | Sends coherent snapshot and agent-view projection updates to compatible endpoint clients. |
| src/client/shell/endpoint_sidebar.rs | Renders endpoint-scoped grouped workspaces and dedicated machine-collapse hit targets. |
| src/client/shell/state.rs | Maintains separate local and per-SSH-endpoint worktree-collapse state. |
| src/client/shell/tests/endpoints.rs | Covers cross-machine view scoping, stable ordering, control freshness, endpoint collapsing, and grouped-workspace interactions. |
Sequence Diagram
sequenceDiagram
participant S as Selected server
participant C as Saved-machine client
participant O as Other servers
S->>C: Agent-view projection (boot ID + revision)
S->>C: Matching shell snapshot
O->>C: Other endpoint snapshots
C->>C: Validate and pair projection with snapshot
C->>C: Combine agent facts from all endpoints
C->>C: Evaluate selected view with endpoint-scoped context
C->>C: Render and navigate filtered, sorted agents
Reviews (3): Last reviewed commit: "fix: preserve stable agent view ordering" | Re-trigger Greptile
55a0d6a to
a112e09
Compare
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
a112e09 to
f222592
Compare
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
Issue
A current-workspace agent view shows agents from saved machines whose server-local workspace ID matches the selected workspace.
Problem
Each server evaluated
current_workspace_idbefore the client combined their rows.w1on Local andw1on Remote therefore both matched.How did we fix it?
Herdr now applies the selected machine's validated view to the combined agent facts. Current workspace and tab matches include endpoint identity, while independent clauses such as blocked status still work across machines. Servers send this policy through an optional revision-bound endpoint control, so generation-1 snapshots and older clients remain compatible.
Verification
The regression test failed before because Local/w1 and Remote/w1 both rendered. It now shows only the selected side and switches correctly. Compound filters, defaults, custom sorting, stale controls, malformed controls, old-server fallback, and set/replace/clear pass. Lint, Windows lint, docs, maintenance, integration, marketplace, and scaling checks pass. Full nextest passed 3,282 tests; three unrelated root/live-handoff environment tests still fail locally.
refs #3732