Skip to content

fix(pr): prevent links opening projects on the wrong host - #678

Merged
Zeus-Deus merged 1 commit into
mainfrom
t3/quick-codeways-bugfix
Nov 13, 2026
Merged

Zeus-Deus merged 1 commit into
mainfrom
t3/quick-codeways-bugfix

Conversation

@Zeus-Deus

Copy link
Copy Markdown
Owner

Pull-request links could open the wrong local project when repositories on different servers shared the same owner/repo name. The router compared repository names and PR numbers without checking the host.

Match the URL host for direct PR matches and both repository fallback paths, while preserving supported www aliases. Regression tests cover collisions between public and self-hosted repositories and the browser fallback.

Verification: npm run check passes; npm run test -- src/lib/pr-url.test.ts passes all 21 tests. Four regression tests failed before the fix. The branch is based on the latest main.

Implemented by GPT-6.1 Sol via the Codex harness.

@mario-reviewer mario-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 5041628ff88037880fec374431085d181dc52f07.

No blocking findings. Host matching is applied to the exact PR lookup and both repository fallback paths. The normalization is consistent with the parser's supported www aliases. The added tests cover cross-host collisions, workspace fallback, alias matching, and browser fallback.

Validation: static review of the full diff and exact-head routing, repository-slug, and overview context. No repository code was built, installed, or executed.

CI: changes passed; Ubuntu and Windows web-checks are in progress; iroh-wasm and Rust checks were skipped. Pending CI is not a code finding.

Verdict: APPROVE

🤖 Automated review by Mario (AI). Findings may be wrong; a human makes the final call.

@Zeus-Deus
Zeus-Deus merged commit 853bc16 into main Nov 13, 2026
6 checks passed
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