feat(pit): tab Yours and Theirs instead of stacking them - #128
Merged
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. |
ralyodio
added a commit
that referenced
this pull request
Sep 6, 2026
The cost table is where you notice a session that cost $300, and the next thing you want is the thing it produced — which is on GitHub, not on this machine. Claude Code already writes a `pr-link` record when a session opens a pull request; nothing was reading it. Adds a `pr` column to both `moshcode cost` and `moshcode cost --all`, rendered as an OSC 8 hyperlink: the label reads "view #128" at four columns wide while the click target is the full URL, so the column costs almost nothing to carry. `--json` carries `pr` and `prs` in full. OSC 8 is not universal and cannot be feature-detected, so piped output falls back to the raw URL and `MOSHCODE_HYPERLINKS=0` forces that same plain form in a terminal that would otherwise paint a "view" nobody can click. ui.mjs had to learn about hyperlinks to make this line up: `strip` only matched SGR, so a cell measured with a URL inside it would have sized its column to sixty characters and pushed the table apart. `clip` now copies an OSC 8 wrapper whole and closes one it cut into, the same care it already took with colour. `ps` deliberately does not get this column. It runs in 0.22s; the transcript scan the PR comes from takes 1.75s, and that is a bad trade for a column that is empty while the work is still in progress. Only github.com-shaped https URLs are accepted — the string ends up in an escape sequence handed to the user's browser, and a transcript is a file on disk that other tools write to. Claude-Session: https://claude.ai/code/session_01Cbtunz1LzTra3EEJNK1cHN Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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