feat(pit): tab Yours and Theirs instead of stacking them - #128
Merged
Conversation
The two sections ran one after the other, so reaching the market meant scrolling past every ending you hold -- and that gets worse with each one you claim. They are now tabs, directly under the claim form. Server-rendered anchors rather than client-side toggling: the page has no other JavaScript, and ?tab= gives each panel a URL that survives a reload and can be linked to. An unrecognised value falls back to Yours rather than rendering nothing. Form posts carry the tab through the redirect, so buying a name in Theirs no longer bounces you to Yours to read the result. Only the visible panel's detail is queried. Yours needs a names lookup and an exemptions lookup per ending; Theirs is one row each. Viewing the market was doing 2N queries for endings it never drew. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
Yours and Theirs are now tabs, directly under the
.whateverclaim form.Previously reaching the market meant scrolling past every ending you hold — and that gets worse with each one you claim.
Folded into the existing strip
#124 landed a tab strip while this was in flight (
Namespace/Use it (DNS)). Rather than nesting tabs inside tabs, this makes it one strip of three — they're three views of the same namespace:Namespaceis gone as a label; it was the thing that now splits into Yours and Theirs. Counts are omitted on/pit/dns, which doesn't load the registry.Approach
Server-rendered anchors, not client-side toggling. The page has no other JavaScript, and
?tab=gives each panel a real URL that survives a reload and can be linked. An unrecognised?tab=falls back to Yours rather than rendering an empty page.Two things that came with it
back()now takes one, so buying a name in Theirs no longer bounces you to Yours to read the result. The three checkout redirects return to Theirs; everything else to Yours.Verification
npm test→ 199 pass, 0 fail (includes #124's).Booted the real server — one strip on every route, correct tab lit:
/pit/pit?tab=theirs/pit?tab=bogus/pit/dns🤖 Generated with Claude Code