feat(pane_group): migrate working_directories to LocalOrRemotePath (5c-2a) - #68
Merged
Conversation
…c-2a) Mirrors Warp upstream, adapted to the fork: keys the whole working_directories layer by LocalOrRemotePath so a repository on an SSH host can carry a remote-backed DiffStateModel distinct from a same-path local repo. - All per-pane-group + global maps migrate PathBuf -> LocalOrRemotePath: pane_groups, repository_roots, directory_to_terminal, comment_models, code_review_views, focused_repo (diff_state_models already migrated in #67). - WorkingDirectoriesEvent payloads (RepositoriesChanged / FocusedRepoChanged / WorkingDirectory.path) carry LocalOrRemotePath; consumers (left_panel, right_panel, workspace/view) updated. - right_panel's code-review panel (CodeReviewState.available_repos / selected_repo_path / focused_repo_path + ~20 methods: set/update/close/ ensure/create/find_review_terminal/route_review_comments/…) threads LocalOrRemotePath, extracting .to_local_path() at the local-only boundaries (CodeReviewView::new/on_open, terminal-session matching) and .display_name() for the dropdown. Behavior-preserving: the detection pipeline (refresh_working_directories_for_pane_group) still resolves only local roots via DetectedRepositories and wraps them in LocalOrRemotePath::Local, so every key produced today is Local — functionally identical. This makes the layer remote-ready; producing Remote keys is 5c-2b (generalize DetectedRepositories::get_root_for_path to LocalOrRemotePath + remote registration) and 5c-2c (feed remote CWDs from the terminal/session + remote-server RepoMetadata sync), per Warp's register_remote_repo path. Also fixes the non-local_fs stub signatures (incl. the stale #67 get_or_create_diff_state_model) to match. Verified: warp lib 3912/0/33; working_directories 2/0; code_review 76/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gDYSHa4oDvQbfungWwG1h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors Warp upstream, adapted to the fork: keys the whole
working_directorieslayer byLocalOrRemotePathso a repository on an SSH host can carry a remote-backedDiffStateModeldistinct from a same-path local repo.What changed
PathBuf→LocalOrRemotePath:pane_groups,repository_roots,directory_to_terminal,comment_models,code_review_views,focused_repo(diff_state_modelswas feat(pane_group): key diff_state_models by LocalOrRemotePath + remote dispatch (5c slice) #67).WorkingDirectoriesEventpayloads (RepositoriesChanged/FocusedRepoChanged/WorkingDirectory.path) carryLocalOrRemotePath; consumers (left_panel,right_panel,workspace/view) updated.CodeReviewState.{available_repos,selected_repo_path,focused_repo_path}+ ~20 methods) threadsLocalOrRemotePath, extracting.to_local_path()at the local-only boundaries (CodeReviewView::new/on_open, terminal-session matching) and.display_name()for the dropdown.local_fsstub signatures (incl. the stale feat(pane_group): key diff_state_models by LocalOrRemotePath + remote dispatch (5c slice) #67get_or_create_diff_state_model).Behavior-preserving: the detection pipeline still resolves only local roots via
DetectedRepositoriesand wraps them inLocalOrRemotePath::Local, so every key produced today isLocal— functionally identical. This makes the layer remote-ready.Remaining for the feature (per Warp's
register_remote_repopath)DetectedRepositories::get_root_for_pathtoLocalOrRemotePath+ remote registration (therepo_metadatacrate).RepoMetadatasync soRemotekeys are produced (→new_remoteconstructs the remote model, already wired in feat(pane_group): key diff_state_models by LocalOrRemotePath + remote dispatch (5c slice) #67).Verification
warplib 3912 / 0 / 33working_directories2/0,code_review76/0🤖 Generated with Claude Code