Skip to content

Hook DiffStateModel to remote server#10470

Open
MaggieShan wants to merge 1 commit intomaggs/diffstatemodel-protosfrom
maggs/hook-diffstatemodel-to-server
Open

Hook DiffStateModel to remote server#10470
MaggieShan wants to merge 1 commit intomaggs/diffstatemodel-protosfrom
maggs/hook-diffstatemodel-to-server

Conversation

@MaggieShan
Copy link
Copy Markdown
Contributor

@MaggieShan MaggieShan commented May 8, 2026

Description

  • Built on Add proto messages for remote DiffStateModel #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

Testing

No-op

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@MaggieShan MaggieShan changed the title hook diffstatemodel to remote server Hook DiffStateModel to remote server May 8, 2026
@MaggieShan MaggieShan force-pushed the maggs/hook-diffstatemodel-to-server branch from 6d72bb7 to 56a3a62 Compare May 8, 2026 13:37
@MaggieShan MaggieShan marked this pull request as ready for review May 8, 2026 14:19
@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 server-side diff-state models, proto conversions, subscriptions, and remote-client event forwarding for diff-state snapshots and deltas.

Concerns

  • New GetDiffState requests can be left pending forever when repo detection does not produce a LocalDiffStateModel event.
  • Immediate snapshots for already-loaded models drop content_at_head, so later subscribers do not receive the same renderable diff data as the initial async load.

Security

  • DiscardFiles forwards client-supplied file paths into destructive git restore/clean/stash behavior without validating that every path is repo-relative and contained by the requested repo.

Verdict

Found: 0 critical, 3 important, 0 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/diff_state_proto.rs
Comment thread app/src/remote_server/server_model.rs
Comment thread app/src/remote_server/server_model.rs
@MaggieShan MaggieShan force-pushed the maggs/hook-diffstatemodel-to-server branch 2 times, most recently from d837ed7 to 04a8618 Compare May 8, 2026 16:28
@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/hook-diffstatemodel-to-server branch 2 times, most recently from 9a75372 to 1f57582 Compare May 8, 2026 21:36
@MaggieShan MaggieShan force-pushed the maggs/hook-diffstatemodel-to-server branch from 1f57582 to 7e9e78e Compare May 8, 2026 22:47
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.

1 participant