feat(pit): make an ending's page a directory, not a dead end - #185
Merged
Conversation
`/n/<ending>` shipped as a page that answered one question — what is
already under this ending — and for a young ending the answer is
"nothing", which is true and useless. `.eggs` read:
Nothing lives under .eggs yet.
and that was the whole page. The name page had answered the other two
questions since it shipped: what is near this, and what could go here.
The ending page, which is where somebody actually decides whether to take
a name, had neither.
So it gets both.
Related endings, by the same rule the name page uses: an alias is an
operator saying two endings belong together, and shared ownership is the
next best signal. There is no label to carry across on an ending's page,
so each one links to its own page — which is a page now, and was a 400
until last week.
Suggested names, because "nothing lives here" should come with something
to do about it. The suggestions are the labels the rest of the registry
has actually taken, most-used first, which is a better answer than any
list written up front — `www` and `docs` earn their place by being taken
under other endings. STARTER_LABELS fills the gap while the registry is
young, which is exactly when an ending's page is emptiest. Anything
already taken under this ending is dropped, because a suggestion whose
only outcome is "already taken" wastes the click it asks for, and every
candidate is checked as a whole name rather than as a label, since
`1.420` is refused as an IPv4 literal where `1.eggs` is fine.
Each suggestion links into the same claim box the "See if it is free"
form posts to, so the shortcut and the form cannot disagree about what
happens next.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
ralyodio
marked this pull request as ready for review
August 1, 2026 06:59
…tory # Conflicts: # apps/pwa/src/routes/moshpit.mjs # apps/pwa/test/moshpit-ending-page.test.mjs
…tory # Conflicts: # apps/pwa/test/moshpit-ending-page.test.mjs
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.
/n/<ending>shipped in #184 as a page that answered one question — what is already under this ending. For a young ending the answer is "nothing", which is true and useless. https://pit.moshcode.sh/n/eggs read:and that was the whole page.
The name page had answered the other two questions since it shipped — what is near this (
Related endings/More endings), and what could go here (the buy box). The ending page, which is where somebody actually decides whether to take a name, had neither.What changed
Related endings, by the same rule the name page uses: an alias is an operator saying two endings belong together, shared ownership is the next best signal, everything else is
More endings. There is no label to carry across on an ending's page, so each links to its own page — which is a page now, and was a 400 until #184.Suggested names, so "nothing lives here" comes with something to do about it. Sourced from the labels the rest of the registry has actually taken, most-used first —
wwwanddocsearn their place by being taken under other endings rather than by someone guessing they would be.STARTER_LABELSfills the gap while the registry is young, which is exactly when an ending's page is emptiest and the suggestion matters most.1.420is refused as an IPv4 literal where1.eggsis fine, and onlyparseMoshpitNameknows that.For the holder the heading reads Yours to mint ("you hold this ending, so these cost nothing"); for everyone else, Still free under .x.
Tests
suggestedLabelsis pure and lives beside the other namespace rules inlib/moshpit-name.mjs. 8 new cases cover related-vs-more, never listing itself, a stranger's ending not counting as related, taken names never suggested, registry labels outranking the starter list, and the claim-box link.Full
apps/pwasuite: 371 pass, 0 fail, 1 skipped.