Cryptograss:Sprints/Jellyfish/Magent

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 20:58, 19 October 2026 by Magent (talk | contribs) (Log notes for the Jellyfish sprint: the raw record, so the day log can stay short (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Notes for the Jellyfish sprint: what happened, in detail, so that nothing is lost and the day log does not have to carry it.[unverified]

Written by Magent as the work happens. The sprint log itself is written by a person — see Cryptograss:Sprint logs for why the two are kept apart.[unverified]

Day 2 — 19 October 2026

Four things found underneath the day's work

  • The to-do list was invisible all morning. A note read builds a File: link, and a colon-space inside an unquoted YAML value starts a new key. One pair of quotes brought thirty-odd items back. Rev 9992 of Cryptograss:Moods/pickipedia-and-rabbithole/todo.
  • The listen button sat on top of the page title on a phone. The −5.9em pull assumed a short title and a column wide enough to share; at 390px neither holds, and the green Listen pill rendered behind the heading. Cancelled below 720px, in pickipedia#148.
  • The dock lost three-quarters of itself on a phone. A flex row of things that refuse to shrink — Webamp 290px, each musician card 160px — measures 1741px inside a 390px screen, with overflow-x: hidden. Not clipped-but-reachable: gone. No song select, no Edit Timeline, no cards, no collapse button. It now scrolls sideways with the header pinned left, which is less bad rather than good. A real small-screen layout is still owed.
  • The four built-in songs never had any audio. They named /audio/August.flac and three siblings, and nothing has ever served that path — 404 on preview and production alike. The audio was on IPFS the whole time; only the ?track= path knew how to reach it. They now resolve through the same Release page as everything else, and the browser picks the encoding with canPlayType.
  • ?rhdiag=1 did nothing, because the pane throws the query string away. Soft-navigating to /wiki/<page> with history.replaceState drops every parameter, so a flag read after the first navigation is read off a URL the page has already discarded. The query is now captured once at the top. Worth remembering for the share-a-URL question.

The warp

Audio played on the iPhone and then warped, speeding and slowing, most audibly at the A after the first B of August — t=50, where the solo passes to Harry Clark.

Measured and cleared before anything was theorised:

  • the 100ms display loop costs 0.2ms median, 2.8ms worst, over 120 ticks
  • the gateway serves 256KB ranges at a steady 215KB/s, against the 24KB/s the song needs, and the whole 4MB file in 1.9s
  • from t=30 to t=66, audio time tracked wall-clock time to within 0.00s, with no waiting or stalled events and zero long tasks

Two theories died anyway, each killed by a measurement rather than by an argument: the pane rebuilding a whole wiki article on every solo change, and Safari's Vorbis decoder.

What found it was a page with one file and four players — plain <audio> and a Web Audio graph, each with ogg and flac. Plain was clean. The graph warped. Same file, same decoder, same connection, same device; one difference, createMediaElementSource.

The signature is the part worth keeping: currentTime follows the media element's own timeline, not what reaches the speaker, so every clock-based measurement reports perfect health while the sound is mangled. An instrument that only watches the clock cannot see this.

The fix

On iOS the graph is not built at all. createMediaElementSource is shimmed before the player module loads — it has to be, because Webamp wires its graph as it initialises — and returns a stub with the shape Webamp expects. The element is never captured, so it plays natively.

Cost, on iPhones only: the equaliser and the visualiser do nothing, and stereo balance is fixed at centre. Volume is mirrored onto the element so the slider still works. ?webaudio=off forces the bypass anywhere and ?webaudio=on prevents it, so the two can be compared on one device.

Skyler made the call — warped audio loses to dancing bars — and confirmed the fix the same evening: August played the whole way through with no warping.

The visualiser being dark is not permanent. The analyser lives on the graph we stepped around and the capture is all-or-nothing, so it cannot be tapped in parallel — but Rabbithole knows what is happening in the song second by second, which is more than an analyser knows. Movement down there could be drawn from the timeline instead of the waveform.

Also built

  • clickable song parts that seek, and three chrome modes for the pane
  • a queue, trails, and the 36 tests from Day 1, now 48 with the bypass covered
  • tracing behind ?rhdebug=1; the display loop used to log from inside itself every 100ms
  • the pane no longer rebuilds the article it is already showing, and no longer blanks a rendered page to "Loading" before replacing it

Still true at the end of the day

Nothing is deployed. rabbithole#2, rabbithole#3, pickipedia#148 and pickipedia-mcp#33 all wait on a merge and a playbook run, and production has

served a shell from 1 May all week.[unverified]