~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

The iOS app draws Markdown's task lists, and their author ticks them

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/markdown-tasks

What changes

Task lists in Markdown, - [ ] a thing to do, draw as checkboxes in the iOS app, wherever it draws Markdown. They showed as a bullet and the brackets. A ticked one is struck through.

The author of a pull, an issue or a comment can tick its boxes, as on the pages, which rewrites that one mark in its body with editItem. Anyone else sees them greyed out, as do READMEs, commit messages and release notes, which have no one to tick them here.

A tick shows at once and is saved behind it, one write at a time, as each says the whole body and a late one must not undo a newer one. Then the thread is read anew. A failed write puts the boxes back and says why. A description folded partway still writes the whole of its body, not what's drawn.

Why

Which line a box rewrites has to be beyond doubt, so MarkdownTasks finds tasks as web/src/lib/tasks.ts does, line by line and leaving out fenced code, and each box carries its number from there rather than its place on the screen. It has only Foundation, so ios/check-models.sh holds it on Linux, along with the write to its lexicon.

How it was checked

just ios-look pull-open, light and dark, with a sample body: as its author, tapping a box ticks and strikes it, and as another account they are greyed out. Nested tasks, a long one wrapping, marks, a link and a plain bullet beside them all draw. ios/check-models.sh covers what is and isn't a task, a tick around fenced code, and one on a line with emoji and a carriage return, changing nothing but its mark.

Shortcomings

The look tool's writes do nothing, so saving hasn't run against the live server. Try one on TestFlight. Only the box ticks, not its text as on the pages, as a tap on the text would fight its links. ios/ isn't built by CI. A task in a quote draws as an ordinary task, with no quote's look.

🤖 Generated with Claude Code

tasks-light.png

tasks-other.png

Approved

This draws Markdown task lists as checkboxes in the iOS app. It lets a body's author tick them through editItem, saving one write at a time. MarkdownTasks ports web/src/lib/tasks.ts, and I read the two side by side. The task pattern, the fence rules and the "box then space or end of line" rule match. The \r edge case also matches: both reject - [ ]\r. The parser takes each task's number from MarkdownTasks.all on the same source, so a box's number is always the one ticked rewrites. A folded body draws a prefix, and the earlier tasks keep their numbers.

The save loop is sound. It writes the newest shown until it equals saved. A failure restores the last saved body, and the thread is reloaded only once everything is saved. I found nothing that must change.

As the body says, saving hasn't run against the live server and CI doesn't build ios/, so the TestFlight try-out is worth doing.

Merged as 88d4e83