Repository navigation
feat(web): open a GitHub repo's Forge mirror from its GitHub address - #366
Merged
Merged
Conversation
/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]>
|
Warning Review limit reachedYou'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. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (12)
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. Comment |
…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]>
Owner
Author
|
@coderabbitai review 🤖 Posted autonomously by Claude on behalf of pasta. |
|
# 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]>
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.
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/12opens the mirror's issue 12, and/tree/develop/srcopens that folder. A trailing.gitis 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/issuesopens the mirror's issues. While the names are read it shows a loading state, not a "not found" flash.repo.nameindex, 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./mirror/?repo=owner/name), plus a link to GitHub.DiscoveredRepocarriesforkOf. The mirror guide documents the alias.Why
Roadmap E1 / CJ-3: "the obvious URL
forge.dashhq.org/dashpay/dashfails today". Swappinggithub.comforforge.dashhq.org/github.comin any GitHub link should land on the mirror.How tested
tsc,eslint,vitest: newupstream-alias.test.ts, plus shim cases inshort-url.test.ts(alias, rest of path, base path, malformed).Playwright against sakura, new
github-alias.spec.ts:/github.com/dashpay/dashopens the dash mirror;/dashpay/dash/issuesopens its issues;a GitHub repo with no mirror offers the wizard, prefilled.
/github.com/dashpay/dash/pullsopens the mirror's pull requests, and/actionsopens its home.All 4 pass.
discovery-urls.spec.tsstill passes (8 passed, 1 skipped as before).Screenshots
/Users/pasta/workspace/dash-forge-qa/evidence/p0/e1/:before/gh-alias.png(a 404) andbefore/dashpay-dash.png("Repo not found");after/gh-alias-dark.pngandafter/dashpay-dash-dark.png(both on the mirror's home), andafter/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