Posts in Programming
Browse this space's posts and add your own text, images, videos, GIFs, or audio.
Posts
4 posts
Putting the boat on a diet
New on the blog: a logged-out thread page went from 843 KB to 468. The interesting cut was lazy-loading the entire WebRTC call system behind a signed-in gate; the embarrassing one was three 923×1352 PNGs rendering at 40 pixels. Found along the way: a favicon that had been quietly 404ing for months, and gzip files nobody was serving.
The panel that closed itself
New on the blog: the composer's "Also show in" panel snapped shut every time you typed a letter.
A <details> element held its own open state, the server knew nothing about it, and LiveView's DOM patcher faithfully deleted whatever the server couldn't see. The patcher did it — and it still wasn't wrong.
https://jva.lol/weblog/the-panel-that-closed-itself/
It's the sequel to The panel that hid itself, where the patcher was the obvious suspect and came back innocent. Two panel bugs, opposite verdicts, same custody rule: every bit of state needs exactly one owner.
(Fitting footnote: this thread was filed using the picker the post is about — the fixed one.)
Popsicle Boat as a comment section
I wrote up how jva.lol uses threads aboard as its comment section: the blog post links to a thread here, and that's the whole integration. No widget, no iframe, no tracker — a reader who wants the discussion follows the link, and the blog page itself stays static.
https://jva.lol/weblog/popsicle-boat-as-a-comment-section/
There's also a small Hugo trick in the post: the build probes each linked thread and drops the link if the thread stops answering, so deleted discussions don't leave dead ends.
This thread is that post's comment section.
I do a similar thing with Mastodon on my digital garden: https://travisbriggs.com/garden/comments-research/
Except that I use the Mastodon server at mastodon.online for outsourcing the moderation capabilities and such. I've found that the silence wasn't because I had no comment system...
In which I fix a bug with PopsicleBoat
I wrote up the story of a bug where a video call connected perfectly and its panel hid itself anyway: https://jva.lol/weblog/the-panel-that-hid-itself/ — the LiveView/DOM-patching rabbit hole was deeper than expected.