~ 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 loads Markdown's pictures, colours its code, and quotes the lines a comment is on

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/images-avatars

What changes

Pictures in Markdown load. A README's, a pull's, an issue's and a comment's, at their own size, attachments and paths relative to the repository included, with an SVG drawn as a picture and the alt text if one won't load.

Fallback avatars. An account with no picture gets the identicon the pages draw for it, the same from the same DID. A commit by a coding agent shows that agent's own face.

No flash of the identicon. An account's picture is decoded once and kept, so a screen draws those it has seen in its first frame. One still on its way is a plain ground, and the identicon shows only if the picture fails to load.

Code in Markdown has colours. A fenced block takes the ranges the server already sends in that text's html, painted as the diff and code views paint theirs. The block also gets a ground of its own, as it was the colour of the card behind it.

A comment on lines says which. A comment on a pull's lines shows the file and line above it, the lines it's on, and whether it's outdated or resolved. Answers sit under the thread they answer.

Checks. A repository's Actions row and its screen are now called Checks, as everywhere else.

Why

Asked for by the owner from using the app on a phone: pictures didn't load, avatars flashed in over a pattern, code had no colour, and a review's line comment read as a bare "x" with no sign of what it was on.

How it was checked

just ios-look of a pull with HTML the server's renderMarkdown gave for a fenced block and with line comments set (pictures attached), and installed on a phone. ios/check-models.sh now also holds the fence reading and the thread order.

Shortcomings

Line comments show in the conversation only: not in the Files view beside their lines, and the app can't write one yet. A resolved thread shows open with a Resolved tag, where the pages fold it. The marked line in a quote stops at the end of the longest line, so short lines don't fill the box. Commit messages have no html, so their code has no colours. Markdown tables still aren't drawn.

🤖 Generated with Claude Code

code-colours.png

line-comments.png

Approved

This makes the iOS app load Markdown pictures, including SVG, attachments, and paths relative to the repo. It also adds identicon avatars with a decoded-image cache, colours for fenced code taken from the server's html ranges, and a quote of the lines a comment is on, with answers grouped under their thread. "Actions" is renamed "Checks".

I read all 20 files and found nothing that has to change.

  • Authorization. Credentials go only to the site's own host, and only the site's getAttachment is asked on behalf of the signed-in account.
  • Pictures. Only http and https schemes are loaded. SVGs are drawn as an <img> data URL, so no script runs.
  • Fence matching. The match by block text degrades to uncoloured code, as the comment says.

Two small things, neither a reason to hold the pull:

  • In ios/ModelCheck/main.swift, the new top-level let said sits beside func said(_:reply:). If ios.yml reports a redeclaration or an ambiguous use, rename one of them. That check hadn't finished when I looked.
  • A reply whose thread start isn't in the list is drawn indented, with no line quote. That is an edge case.
Merged as 7e464e0