Skip to content

fix(remote): guard stash for remote repositories; check branches via ListBranches - #690

Merged
Ziinc merged 1 commit into
claude/prd-gaps-remote-path-guards-5from
claude/prd-gaps-remote-path-guards-11
Oct 1, 2026
Merged

Ziinc merged 1 commit into
claude/prd-gaps-remote-path-guards-5from
claude/prd-gaps-remote-path-guards-11

Conversation

@Ziinc

@Ziinc Ziinc commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #688. Removes 8 entries from KNOWN_UNGUARDED.

Wrapper Before, for a remote path After
stashWorkspaceChanges, stashCommit, listStashes, deleteStash, applyStash, getStashDiff, exportStashGitPatch ran jj against a local path equal to the remote path assertLocalOperation, which rejects with unsupported: Stashing is not available…
checkBranchExists (new-workspace dialog, useWorkspaceDialogEffects) jj_check_branch_exists on the remote path locally transportCheckBranchExists → typed ListBranches; remote_exists is always false for now
UI: the "Stash all" button (FileSidebar passes no onStashAll) and the command palette's "Stash" entry are hidden for a remote repository. The per-commit "Stash" menu item is still shown and fails with an error toast. Hiding it needs a prop change in CommitDiffViewer, which I left for the sibling remote-mutations work that adds a typed stash route.

Checks

…ListBranches

- Every stash wrapper is asserted local. Stashes are gist commits in this
  machine's jj store, so they have no remote equivalent yet. The "Stash
  all" button and the command palette's stash entry are hidden for a remote
  repository.
- checkBranchExists routes a remote repository through the typed
  ListBranches read instead of running jj_check_branch_exists on the remote
  path locally. Remote-tracking refs are not reported yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MbYSPHBRmDYwPJpHG33Y4t
@Ziinc
Ziinc force-pushed the claude/prd-gaps-remote-path-guards-11 branch from 8cb9e93 to 1e17581 Compare September 30, 2026 09:27
Base automatically changed from claude/prd-gaps-remote-path-guards-10 to claude/prd-gaps-remote-path-guards-5 October 1, 2026 07:44
@Ziinc
Ziinc merged commit 1e17581 into claude/prd-gaps-remote-path-guards-5 Oct 1, 2026
15 checks passed
@Ziinc
Ziinc deleted the claude/prd-gaps-remote-path-guards-11 branch October 1, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants