Skip to content

pit: let a pasted line carry its own price and target - #142

Merged
ralyodio merged 2 commits into
mainfrom
feat/paste-per-line
Jul 31, 2026
Merged

pit: let a pasted line carry its own price and target#142
ralyodio merged 2 commits into
mainfrom
feat/paste-per-line

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The paste area applied one price and one target to everything in it, so a list where three endings are worth more than the rest meant claiming the list and then editing three rows.

A line can now say what that ending is worth and what it points at:

.toplevel .redirect $2.00USD
.yeah $5USD
oranges, pears, plums

Anything on a line beats the form. The form is the default for the whole paste; overrides go up as well as down$5 on a line is honoured even though the default is $2.

Price shapes

$5, $5USD, 5.00, USD5, $1.50 all read as prices. Order on the line doesn't matter, because the two fields can't be confused: a price is the only one that starts with $ or is all digits, and an all-numeric ending is rejected anyway.

Anything that isn't a price is read as the ending this one points at — the safe misreading, since a stray token then fails loudly against an ending you don't own, rather than silently setting a price. Zero and negatives aren't prices.

Behaviour change

Whitespace inside a line now separates fields, not endings. a b on one line used to be two endings; it's now one pointed at the other. Commas and newlines are the separators, which is what the placeholder shows. A pre-existing test caught this and was updated to the new meaning.

Default price

Moves $1.99 → $2. PRD 0005 R3 caps a child name at $1.99, but that arrives with terms and renewals and nothing enforces a ceiling yet — so this is an operator's asking price and a line may exceed it.

Tests

11 new. 256/256 across the pwa suite.

🤖 Generated with Claude Code

ralyodio and others added 2 commits July 31, 2026 10:27
The paste area applied one price and one target to everything in it, so a list
where three endings are worth more than the rest meant claiming the list and
then editing three rows. A line can now say what that ending is worth and what
it points at:

  .toplevel .redirect $2.00USD
  .yeah $5USD
  oranges, pears, plums

Anything on a line beats the form; the form is the default for the whole paste.
Overrides go up as well as down — $5 on a line is honoured even though the
default is $2.

Prices are read in the shapes people type: $5, $5USD, 5.00, USD5, $1.50. Order
on the line does not matter, because the two fields cannot be confused: a price
is the only one that starts with `$` or is all digits, and an all-numeric
ending is rejected anyway. Anything that is not a price is read as the ending
this one points at — the safe misreading, since a stray token then fails
loudly against an ending you do not own rather than silently setting a price.
Zero and negatives are not prices.

Behaviour change: whitespace inside a line now separates fields, not endings.
`a b` on one line used to be two endings and is now one pointed at the other.
Commas and newlines are the separators, which is what the placeholder shows.

The default price moves 1.99 -> 2. PRD 0005 R3 caps a child name at $1.99, but
that arrives with terms and renewals and nothing enforces a ceiling yet, so
this is an operator's asking price and a line may exceed it.

11 more tests. 256 across the pwa suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
apps/pwa/node_modules was a symlink into another worktree, created so the
previous commit's tests could resolve @libsql/client. It is machine-local and
points at a path that exists nowhere else.

Co-Authored-By: Claude Opus 5 (1M context) <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 d1a12bf into main Jul 31, 2026
3 checks passed
ralyodio added a commit that referenced this pull request Jul 31, 2026
* chore(release): v0.13.3

install.sh resolves releases/latest, so everything merged since v0.13.2 has
been sitting on main unreachable — `moshcode dns enable` exists in the source
and not in anyone's binary.

The headline is the DNS bridge (#141). Moshpit names now resolve for every
program on the machine, not just inside TronBrowser: each OS gets the mechanism
that routes ONE SUFFIX rather than the one that replaces the resolver —
/etc/resolver on macOS, systemd-resolved routing-only domains or dnsmasq on
Linux, an NRPT rule per namespace on Windows.

  moshcode dns enable / disable / status
  moshcode uninstall <engine|tool>          (#150, completion in #151)

The pit gained most of a namespace registry in between: key pins per name
(#137), pasted bulk claiming with per-line price and target (#138, #142, #143,
#146), all-numeric endings (#147), /n/<name> serving a name or a directory
(#145, #149), and Buy Now on an unclaimed name (#148).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: restore the em-dash the version bump escaped

The bump rewrote package.json through a JSON serialiser that defaults to ASCII,
turning the em-dash in `description` into —. Valid JSON and the same string
once parsed, but a gratuitous diff in a commit that should touch one line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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