Add proto messages for remote DiffStateModel#10428
Conversation
d25da75 to
4bf4c75
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds the remote DiffStateModel protocol schema and a tech spec, plus temporary server dispatch arms for the new client messages.
Concerns
- The new request/response messages are currently dropped in
ServerModel, which will leave clients waiting until request timeout if they sendGetDiffStateorDiscardFiles. - The tech spec's field-number summary is out of sync with the proto additions for the discard RPC.
Verdict
Found: 0 critical, 1 important, 1 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
a0dbcbd to
13d5401
Compare
|
|
||
| pub struct GlobalDiffStateModel { | ||
| states: HashMap<ServerDiffStateKey, ModelHandle<LocalDiffStateModel>>, | ||
| per_connection_keys: HashMap<ConnectionId, HashSet<ServerDiffStateKey>>, |
There was a problem hiding this comment.
What is the per_connection_keys used for? If it's for garbage collection, it's shape is better with HashMap<ServerDiffStateKey, HashSet> yeah?
There was a problem hiding this comment.
Ack realized I haven't updated the tech spec since implementing - I believe the GlobalDiffStateModel should store maps both ways where:
connection -> keysis used to remove a connection's subscriptions on connection dropkey -> connectionsis used to fan out repo events to its subscribers
d72a06a to
faad40b
Compare
faad40b to
527e04a
Compare
527e04a to
672bfdb
Compare
## Description * Adds tech spec for how to support `DiffStateModel` and git states over the remote server / on a remote environment * Adds relevant proto messages ## Linked Issue [APP-4354](https://linear.app/warpdotdev/issue/APP-4354/proto-messages-for-the-diffstatemodel) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode Relevant plan: https://staging.warp.dev/drive/notebook/Remote-DiffStateModel-Proto-Messages-Server-side-Global-Model-and-Client-Wrapper-wqMeKuOHZxWPnTNZiQqbAf
## Description * Built on #10428 * Adds the server-side changes to support `DiffStateModel` and git states on remote environments * Adds type conversions * Adds a `GlobalDiffStateModel` to track each `LocalDiffStateModel` per `repo_path`, `diff_mode` * Adds subscription to repositories to send server messages * Adds handlers for client messages ## Linked Issue [APP-4355](https://linear.app/warpdotdev/issue/APP-4355/hook-up-diffstatemodel-to-remote-server) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
## Description * Adds tech spec for how to support `DiffStateModel` and git states over the remote server / on a remote environment * Adds relevant proto messages ## Linked Issue [APP-4354](https://linear.app/warpdotdev/issue/APP-4354/proto-messages-for-the-diffstatemodel) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode Relevant plan: https://staging.warp.dev/drive/notebook/Remote-DiffStateModel-Proto-Messages-Server-side-Global-Model-and-Client-Wrapper-wqMeKuOHZxWPnTNZiQqbAf
## Description * Built on #10428 * Adds the server-side changes to support `DiffStateModel` and git states on remote environments * Adds type conversions * Adds a `GlobalDiffStateModel` to track each `LocalDiffStateModel` per `repo_path`, `diff_mode` * Adds subscription to repositories to send server messages * Adds handlers for client messages ## Linked Issue [APP-4355](https://linear.app/warpdotdev/issue/APP-4355/hook-up-diffstatemodel-to-remote-server) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
## Description * Built on #10428 * Adds the server-side changes to support `DiffStateModel` and git states on remote environments * Adds type conversions * Adds a `GlobalDiffStateModel` to track each `LocalDiffStateModel` per `repo_path`, `diff_mode` * Adds subscription to repositories to send server messages * Adds handlers for client messages ## Linked Issue [APP-4355](https://linear.app/warpdotdev/issue/APP-4355/hook-up-diffstatemodel-to-remote-server) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
## Description * Built on warpdotdev/warp#10428 * Adds the server-side changes to support `DiffStateModel` and git states on remote environments * Adds type conversions * Adds a `GlobalDiffStateModel` to track each `LocalDiffStateModel` per `repo_path`, `diff_mode` * Adds subscription to repositories to send server messages * Adds handlers for client messages ## Linked Issue [APP-4355](https://linear.app/warpdotdev/issue/APP-4355/hook-up-diffstatemodel-to-remote-server) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
## Description * Adds tech spec for how to support `DiffStateModel` and git states over the remote server / on a remote environment * Adds relevant proto messages ## Linked Issue [APP-4354](https://linear.app/warpdotdev/issue/APP-4354/proto-messages-for-the-diffstatemodel) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode Relevant plan: https://staging.warp.dev/drive/notebook/Remote-DiffStateModel-Proto-Messages-Server-side-Global-Model-and-Client-Wrapper-wqMeKuOHZxWPnTNZiQqbAf
## Description * Built on warpdotdev#10428 * Adds the server-side changes to support `DiffStateModel` and git states on remote environments * Adds type conversions * Adds a `GlobalDiffStateModel` to track each `LocalDiffStateModel` per `repo_path`, `diff_mode` * Adds subscription to repositories to send server messages * Adds handlers for client messages ## Linked Issue [APP-4355](https://linear.app/warpdotdev/issue/APP-4355/hook-up-diffstatemodel-to-remote-server) ## Testing No-op ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
Description
DiffStateModeland git states over the remote server / on a remote environmentLinked Issue
APP-4354
Testing
No-op
Agent Mode
Relevant plan: https://staging.warp.dev/drive/notebook/Remote-DiffStateModel-Proto-Messages-Server-side-Global-Model-and-Client-Wrapper-wqMeKuOHZxWPnTNZiQqbAf