chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
Task boxes tick at once, by their text too, and strike through what is done
Merged Approved
This makes ticks instant: each tick is saved behind the boxes, one save at a time with the newest body last, and the page is read anew once all are saved. It also lets a click on a task's text tick its box, and strikes done tasks through using a span.task-text that the page wraps around each task's text.
I found nothing that must change. Here is what I traced:
- Save loop: after a failed save,
showngoes back tosaved, so the loop ends and the boxes are reset frommarks(saved). - Wrapping:
wrapis idempotent, and the box is always the span'spreviousElementSibling, with or without the whitespace gap. - Failures:
callthrows on failure, sofailedandproblemget the server's message. - Loose lists:
li > p:first-childis handled in the CSS.
Two small things, neither blocking:
problemisn't cleared when a later tick saves, so an old error can stay under the thread.tasks.tshas its quotes and indentation reformatted (double to single quotes, spaces to tabs), which makes the diff look larger than the change. It looks like the repo's prettier style.
All seven checks were still queued or running when I looked, so I couldn't confirm the e2e and shots results. Please make sure both pass. If shots flags any page, add a Shots-moved: line to the body.
All checks have passed
8 passed, 2 skipped
Merged as 0bbc4d1
What changes
Ticking is instant. Before, a tick disabled every box until the save reached the PDS, so a click made meanwhile was dropped, and every box flashed grey. Now a tick shows at once and the boxes stay live. Each tick's body is saved behind them, one save at a time with the newest last, and the page is read anew once all are saved. A save that fails puts the boxes back as last saved and shows why under the thread.
The text ticks too. Clicking a task's text ticks its box, as a label would, unless the click is on a link or ends a text selection. For the author, the box and its text show a pointer.
Done tasks are struck through. A ticked task's own text is struck through and muted, up to any list nested under it, for everyone reading. Boxes in a loose list (items separated by blank lines, drawn inside a
<p>) lose their bullet as the others do.Why
Ticking off Basic forge features missing, from archive downloads to webhooks felt broken. Repeated clicks on one box went missing while each save ran, and the box was the only thing to aim at.
The struck-through text comes from a
span.task-textthe page wraps around each task's text, so CSS can strike only that text and not a nested list. Doing it in serve's Markdown rendering would also work without scripts. It would change every rendered body's HTML, though, for a style.How it was checked
npm run check.just look issue --as bob.test, clicking a task's text witheditItemheld: the box ticks and strikes while the save is pending, and the other boxes stay live. Also looked at signed out, where boxes are disabled but done tasks are still struck. Desktop light and phone dark.Shortcomings
🤖 Generated with Claude Code