Skip to content

fix(desktop): route external PR merges to provider - #4090

Draft
hellostatpods wants to merge 1 commit into
block:mainfrom
hellostatpods:fix/desktop-pr-merge
Draft

fix(desktop): route external PR merges to provider#4090
hellostatpods wants to merge 1 commit into
block:mainfrom
hellostatpods:fix/desktop-pr-merge

Conversation

@hellostatpods

Copy link
Copy Markdown

Summary

  • classify native PR merge capability against the active workspace relay
  • require both target and source clone URLs to be relay-hosted before showing native Merge
  • route external repositories to their advertised web URL instead of invoking the relay-only Rust workflow
  • cover the classifier and GitHub-backed project behavior with unit and E2E tests

Root cause

Desktop preserves external NIP-34 clone URLs, but the review card previously gated Merge only on repository ownership and PR metadata. This allowed GitHub-backed projects to invoke merge_project_pull_request, whose Rust validation intentionally accepts only /git/<owner>/<repo> URLs on the active Buzz relay.

The backend restriction remains unchanged. Broadening it would expose relay-supplied target and source URLs to local Git network operations and would mix Nostr credential handling with external providers.

User impact

Owners of external projects now see an Open on GitHub or Open repository action. Relay-hosted projects retain the existing native Merge workflow.

Validation

  • Desktop unit suite: 3,908 passed
  • Desktop TypeScript typecheck: passed
  • Desktop Biome checks: passed
  • Desktop E2E build: passed
  • PR review E2E spec: 20 passed in system Chrome
  • targeted native merge, conflict, managed-owner, external-provider, and non-owner cases: 5 passed
  • git diff --check: passed
  • repository just ci: Rust workspace fmt/clippy, Desktop checks, Desktop Tauri fmt/clippy, and web checks passed; the unrelated mobile step stopped while Hermit downloaded Flutter because the local machine ran out of disk space

Co-authored-by: hellostatpods <hello@statpods.com>
Signed-off-by: hellostatpods <hello@statpods.com>
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.

1 participant