Skip to content

Add proto messages for remote DiffStateModel#10428

Merged
MaggieShan merged 3 commits into
masterfrom
maggs/diffstatemodel-protos
May 11, 2026
Merged

Add proto messages for remote DiffStateModel#10428
MaggieShan merged 3 commits into
masterfrom
maggs/diffstatemodel-protos

Conversation

@MaggieShan
Copy link
Copy Markdown
Contributor

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

Testing

No-op

Agent Mode

  • 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

@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@MaggieShan MaggieShan force-pushed the maggs/diffstatemodel-protos branch 2 times, most recently from d25da75 to 4bf4c75 Compare May 8, 2026 04:05
@MaggieShan MaggieShan marked this pull request as ready for review May 8, 2026 04:06
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@MaggieShan

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 send GetDiffState or DiscardFiles.
  • 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

Comment thread app/src/remote_server/server_model.rs
Comment thread specs/APP-4351/TECH.md Outdated
Base automatically changed from maggs/create-diffstatemodel-wrapper to master May 8, 2026 04:14
@MaggieShan MaggieShan force-pushed the maggs/diffstatemodel-protos branch 3 times, most recently from a0dbcbd to 13d5401 Compare May 8, 2026 04:45
@MaggieShan MaggieShan requested a review from kevinyang372 May 8, 2026 04:45
Copy link
Copy Markdown
Member

@kevinyang372 kevinyang372 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking!

Comment thread specs/APP-4351/TECH.md Outdated
Comment thread specs/APP-4351/TECH.md Outdated

pub struct GlobalDiffStateModel {
states: HashMap<ServerDiffStateKey, ModelHandle<LocalDiffStateModel>>,
per_connection_keys: HashMap<ConnectionId, HashSet<ServerDiffStateKey>>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the per_connection_keys used for? If it's for garbage collection, it's shape is better with HashMap<ServerDiffStateKey, HashSet> yeah?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack realized I haven't updated the tech spec since implementing - I believe the GlobalDiffStateModel should store maps both ways where:

  • connection -> keys is used to remove a connection's subscriptions on connection drop
  • key -> connections is used to fan out repo events to its subscribers

Comment thread specs/APP-4351/TECH.md Outdated
Comment thread crates/remote_server/proto/remote_server.proto Outdated
@MaggieShan MaggieShan force-pushed the maggs/diffstatemodel-protos branch from d72a06a to faad40b Compare May 8, 2026 21:32
@MaggieShan MaggieShan force-pushed the maggs/diffstatemodel-protos branch from faad40b to 527e04a Compare May 11, 2026 13:33
@MaggieShan MaggieShan force-pushed the maggs/diffstatemodel-protos branch from 527e04a to 672bfdb Compare May 11, 2026 14:15
@MaggieShan MaggieShan merged commit 98fa392 into master May 11, 2026
39 of 41 checks passed
@MaggieShan MaggieShan deleted the maggs/diffstatemodel-protos branch May 11, 2026 15:24
cephalonaut pushed a commit that referenced this pull request May 12, 2026
## 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
MaggieShan added a commit that referenced this pull request May 12, 2026
## 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
cephalonaut pushed a commit that referenced this pull request May 12, 2026
## 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
cephalonaut pushed a commit that referenced this pull request May 12, 2026
## 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
dagmfactory pushed a commit that referenced this pull request May 12, 2026
## 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
stupidloud pushed a commit to stupidloud/warp-cn that referenced this pull request May 21, 2026
## 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
lawsmd pushed a commit to lawsmd/cortex that referenced this pull request May 22, 2026
## 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
lawsmd pushed a commit to lawsmd/cortex that referenced this pull request May 22, 2026
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants