Skip to content

Simplify DiffStateModel to have one repo#10283

Merged
MaggieShan merged 3 commits intomasterfrom
maggs/simplify-diff-state-model
May 6, 2026
Merged

Simplify DiffStateModel to have one repo#10283
MaggieShan merged 3 commits intomasterfrom
maggs/simplify-diff-state-model

Conversation

@MaggieShan
Copy link
Copy Markdown
Contributor

@MaggieShan MaggieShan commented May 6, 2026

Description

Part of the work needed to support the code review pane and git states on remote environments includes simplifying the contract between the DiffStateModel and CodeReviewView

  • This updates the assumption such that a DiffStateModel is responsible/associated with only one repo
  • Removes redundant "change repo" logic

Linked Issue

APP-4353

Testing

Verified existing behaviour for code review view locally

  • Tested multiple repos in the same tab
  • Tested multiple repos in different tabs
  • Tested switching branches

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 6, 2026
@MaggieShan MaggieShan marked this pull request as ready for review May 6, 2026 18:44
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 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 simplifies DiffStateModel so each instance is bound to a single repository and moves repository watcher setup into construction.

Concerns

  • WorkingDirectoriesModel::get_or_create_diff_state_model now drops otherwise valid repo paths when DetectedRepositories has not already materialized a watched repository, while callers just return on None; this regresses the previous fallback detection behavior.

Verdict

Found: 0 critical, 1 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/pane_group/working_directories.rs Outdated
@MaggieShan MaggieShan requested a review from kevinyang372 May 6, 2026 19:37
Comment thread app/src/code_review/diff_state.rs Outdated
Comment thread app/src/pane_group/working_directories.rs Outdated
@MaggieShan MaggieShan merged commit b00d068 into master May 6, 2026
30 checks passed
@MaggieShan MaggieShan deleted the maggs/simplify-diff-state-model branch May 6, 2026 21:10
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