Skip to content

feat(web): open a GitHub repo's Forge mirror from its GitHub address - #366

Merged
PastaPastaPasta merged 10 commits into
masterfrom
feat/p0-e1-routes
Oct 5, 2026
Merged

PastaPastaPasta merged 10 commits into
masterfrom
feat/p0-e1-routes

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What

  • /github.com/<owner>/<repo> (and /gh/<owner>/<repo>) opens that GitHub repo's Forge mirror. The rest of a GitHub path opens the same page of the mirror: /github.com/dashpay/dash/issues/12 opens the mirror's issue 12, and /tree/develop/src opens that folder. A trailing .git is accepted. The GitHub URL's query and fragment carry over, and a GitHub page Forge has no equivalent for (/actions, /wiki) opens the mirror's home. If Platform is unreachable, the page shows the usual banner with Try again.
  • /dashpay/dash, which names no Forge repo, now opens the mirror instead of "Repo not found". It keeps the page you asked for and its fragment: /dashpay/dash/issues opens the mirror's issues. While the names are read it shows a loading state, not a "not found" flash.
  • How a mirror is found: one read of the repo.name index, then the repos whose owner-written description says (mirror of github.com/<owner>/<repo>). This is the same rule the issue lists already use. Forks, which copy their parent's description, and private repos never count. A single claim opens directly, but only once every repo of that name has been read (the name index pages at 20). Several claims are listed with a warning to check the owner, unless the network's showcase vouches for exactly one of them. /<owner>/<name> redirects only when the owner is no Forge identity: not an id, and not a DPNS name that resolves. So a real Forge user's address is never handed to someone else's mirror claim.
  • No mirror yet: the page says so and offers Mirror owner/name, which opens the mirror wizard with the repo filled in (/mirror/?repo=owner/name), plus a link to GitHub.
  • DiscoveredRepo carries forkOf. The mirror guide documents the alias.

Why

Roadmap E1 / CJ-3: "the obvious URL forge.dashhq.org/dashpay/dash fails today". Swapping github.com for forge.dashhq.org/github.com in any GitHub link should land on the mirror.

How tested

  • tsc, eslint, vitest: new upstream-alias.test.ts, plus shim cases in short-url.test.ts (alias, rest of path, base path, malformed).

  • Playwright against sakura, new github-alias.spec.ts:

    • /github.com/dashpay/dash opens the dash mirror;

    • /dashpay/dash/issues opens its issues;

    • a GitHub repo with no mirror offers the wizard, prefilled.

    • /github.com/dashpay/dash/pulls opens the mirror's pull requests, and /actions opens its home.

    All 4 pass. discovery-urls.spec.ts still passes (8 passed, 1 skipped as before).

Screenshots

/Users/pasta/workspace/dash-forge-qa/evidence/p0/e1/:

  • before: before/gh-alias.png (a 404) and before/dashpay-dash.png ("Repo not found");
  • after: after/gh-alias-dark.png and after/dashpay-dash-dark.png (both on the mirror's home), and after/gh-alias-not-mirrored-{light,390-dark}.png.

Limits

  • A mirror whose Forge name differs from the GitHub name (renamed in the wizard) is not found by the alias.

  • A description is a claim anyone can make. That is why several claims are listed rather than one picked, unless the site's showcase vouches for one.

  • The IPFS build has no short-URL shim, as with every short URL, so there only the page's own form works (/github.com/?owner=…&name=…), and it opens the mirror's home page.

🤖 Generated with Claude Code

PastaPastaPasta and others added 2 commits October 4, 2026 12:25
/github.com/<owner>/<repo> (and /gh/...) opens the repo's mirror, and the rest of a GitHub path opens the same page of it. /dashpay/dash, which names no Forge repo, opens the mirror too. A mirror is found by the description its owner wrote; several claims are listed unless the showcase vouches for one, and none offers the mirror wizard, prefilled.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68ccf050-a83b-426c-91dc-7df8e878aad4
📥 Commits

Reviewing files that changed from the base of the PR and between 366da81 and 2b792a3.

📒 Files selected for processing (12)
  • docs/guides/mirror-a-github-repo.md
  • forge-web/app/github.com/client.tsx
  • forge-web/app/github.com/page.tsx
  • forge-web/components/mirror/mirror-steps.tsx
  • forge-web/components/repo/repo-not-found.tsx
  • forge-web/e2e/github-alias.spec.ts
  • forge-web/lib/page-title.ts
  • forge-web/lib/short-url.test.ts
  • forge-web/lib/short-url.ts
  • forge-web/lib/view/discovery.ts
  • forge-web/lib/view/upstream-alias.test.ts
  • forge-web/lib/view/upstream-alias.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 2 commits October 4, 2026 12:35
…he GitHub path's query and fragment

/<owner>/<name> opens a mirror only when the owner is no Forge identity, and a lone claim opens only when every repo of that name was read. The alias keeps the GitHub URL's query and fragment, pins the mirror, opens the home page for a GitHub page Forge doesn't have, and shows the unreachable banner when Platform is down. The not-found suggestions use the same mirror rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta

Copy link
Copy Markdown
Owner Author

@coderabbitai review


🤖 Posted autonomously by Claude on behalf of pasta.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

PastaPastaPasta and others added 6 commits October 4, 2026 13:38
# Conflicts:
#	forge-web/lib/page-title.ts
repo-not-found keeps master's checked-claim ranking (#371) and this branch's auto-open of one clear mirror; short-url reserves both gh/github.com and icons.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rror"

Match the wording #371 uses for unchecked mirror claims.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit fb5ec33 into master Oct 5, 2026
13 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/p0-e1-routes branch October 5, 2026 04:45
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