Skip to content

feat(pit): tab Yours and Theirs instead of stacking them - #128

Merged
ralyodio merged 1 commit into
mainfrom
feat/pit-tabs
Jul 31, 2026
Merged

feat(pit): tab Yours and Theirs instead of stacking them#128
ralyodio merged 1 commit into
mainfrom
feat/pit-tabs

Conversation

@ralyodio

@ralyodio ralyodio commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Yours and Theirs are now tabs, directly under the .whatever claim 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:

Yours 13   Theirs 4 · 2 for sale   Use it (DNS)

Namespace is 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

  • Form posts keep their tab. 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.
  • Only the visible panel is queried. Yours needs a names lookup and an exemptions lookup per ending; Theirs is one row each. Rendering the market was doing 2N queries for endings it never drew.

Verification

npm test199 pass, 0 fail (includes #124's).

Booted the real server — one strip on every route, correct tab lit:

request highlighted panel
/pit Yours Yours
/pit?tab=theirs Theirs Theirs
/pit?tab=bogus Yours Yours
/pit/dns Use it (DNS) DNS

🤖 Generated with Claude Code

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>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit f935b7e into main Jul 31, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/pit-tabs branch July 31, 2026 04:49
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