<feed xmlns='http://www.w3.org/2005/Atom'>
<title>typerpunk/web/src/siteFooter.js, branch main</title>
<subtitle>Rust + WASM typing game.
</subtitle>
<id>https://srdusr.com/git/typerpunk/atom?h=main</id>
<link rel='self' href='https://srdusr.com/git/typerpunk/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/typerpunk/'/>
<updated>2025-12-14T07:24:00+00:00</updated>
<entry>
<title>Add community text submissions, and make custom text usable for study</title>
<updated>2025-12-14T07:24:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-12-14T07:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/typerpunk/commit/?id=3dbebfbc9345d2603908f32c0dabebc0ff21feb3'/>
<id>urn:sha1:3dbebfbc9345d2603908f32c0dabebc0ff21feb3</id>
<content type='text'>
Submissions
- POST /api/texts proposes a passage; nothing reaches players until a
  moderator approves it. GET /api/texts serves the approved set, which the
  client merges on top of its bundled packs at startup.
- Validation the server enforces rather than trusts: category from a fixed
  list, 40 to 600 characters, no control characters (a newline makes a
  passage untypeable in a single-line input), attribution length, and a
  unique index on md5(lower(btrim(content))) so the same passage cannot be
  submitted twice under different whitespace or casing.
- Moderation is a flag on users. The queue and the review endpoint both
  refuse a non-moderator, and reviewing an already-reviewed submission is a
  404 rather than a silent second write.
- Submissions are rate limited per user: enough for a real contributor, not
  enough to fill the queue from a script.
- A Contribute screen carries the form, your own submissions with their
  status, and - for moderators only - the review queue.

This is the half of TypeRacer's model the packs could not reach by authoring:
their corpus is roughly twelve thousand passages, grown by submission.

Custom text as a study tool
- Imported documents are kept between visits, with how far through each one
  you are. Custom text lived only in memory, so importing a set of notes and
  reloading the page lost them - fine for pasting a paragraph to race,
  useless for working through a file over several sittings.
- Position is recorded when a segment is finished, not when the next is
  started, so closing the tab after a segment does not lose it.
- Markdown is chunked as markdown: fenced code blocks are kept whole and
  typed line by line, and the decoration - hashes, asterisks, backticks,
  link brackets, table pipes - is stripped so what you retype is the
  material rather than the punctuation around it.
- Everything stays on the device. Notes are not uploaded anywhere.

Fixed while doing it: a chunk could contain a newline, which cannot be typed
in a single-line input at all. Any paragraph with a line break inside it --
ordinary in notes and in wrapped prose - produced an unfinishable segment.
Whitespace inside a chunk is now flattened.
</content>
</entry>
<entry>
<title>Fix content packs, seed the leaderboard, and add the missing site furniture</title>
<updated>2025-12-05T22:58:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-12-05T22:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/typerpunk/commit/?id=24f1eb6cc611f458c45f0ac4046efce51211d7d3'/>
<id>urn:sha1:24f1eb6cc611f458c45f0ac4046efce51211d7d3</id>
<content type='text'>
Naming
- "Typing Test" removed from the browser tab, the crate description and the
  READMEs. The scope outgrew it: solo practice, live races, code drills and
  adaptive weak-key training.

Content
- Movies was prose *about* film, not film quotes - the same mistake the
  programming pack had. Replaced with 28 attributed lines. New anime pack,
  28 lines across 24 series.
- This follows the model TypeRacer states outright ("type quotes from popular
  music, songs, anime, comic books and more"): short excerpts attributed to
  the work they came from. The scalable half of their approach is user
  submission with moderation, which is a feature this does not have yet.

Leaderboard
- An empty board tells a new player nobody is here. Bots now race the eight
  fixed-length leaderboard modes, seeded with a fortnight of backdated results
  on first run and one new result every 90 seconds after.
- They are ordinary users carrying is_bot, returned by the same query and
  labelled "bot" in the UI. Seeding a board is reasonable; passing synthetic
  scores off as human results is not, so the flag travels with the row.
- Seeding is checked per mode. A single result from the live ticker used to
  satisfy an "any bot results" guard and leave every other mode empty forever.

Stats
- The per-key accuracy data Practice mode is built on was computed, used to
  generate text, and never shown. The screen now ranks your weakest keys with
  the error rate and pause length behind each one.
- Added recent form against your lifetime average, best accuracy, and tests
  this week.

Multiplayer standings
- Now place, racer, WPM, accuracy and time, with column labels - the columns
  TypeRacer and 10FastFingers both show.

Site furniture
- Share (Web Share where available, clipboard otherwise - no third-party
  button, no tracking script), a GitHub link, and a real privacy page written
  from what the code actually stores rather than from a template.

Button hierarchy
- Everything was an outlined box of roughly equal weight, so a screen's one
  real action, a settings toggle and a filter chip looked alike. Three tiers
  now: primary (filled, one per screen), default (outlined), quiet (toggles
  and filters, bordered only when hovered or active).
</content>
</entry>
</feed>
