~ 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's diff keeps each line on one row, scrolling sideways

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/diff-scrolls

What changes

A diff in the iOS app keeps each line on one row, with its indent. The code scrolls sideways under line numbers that stay put, as a file's lines already do. It covers a pull's files and a commit's, which share the view.

Why

Long lines wrapped at any character, so .top, 4) broke before its comma. An indented line that didn't fit left its number beside a blank row, with the code starting on the row below. Hanging the wrapped lines under their indent would still have broken code mid-token, and the file view already scrolls.

How it was checked

just ios-look files in dark, with the recorded diff and with long lines, at rest and swiped sideways. The columns line up, the numbers stay put, and each row's tint reaches the screen's edge on a short line and the longest line's end on a long one.

Shortcomings

All of a file's rows are still built at once, as before. A file with a very long line, such as minified code, wasn't tried. VoiceOver now reads the numbers and the code as separate columns rather than row by row.

🤖 Generated with Claude Code

Approved

This replaces the per-row DiffLine with DiffLines. It has a fixed number/marker column and a horizontally scrolling code column, and every row has the same set height (@ScaledMetric) so the two columns line up. I found no bug. The row heights use the same metric in both columns, the tint is applied to both, and width from onGeometryChange keeps short lines tinted to the screen's edge.

Two small notes, neither blocking:

  • Hunk headers lost the 12pt leading inset they had before. That looks intended given the shared columns, but it is a visible change.
  • The body already admits that VoiceOver now reads the numbers and the code as separate columns, and that minified code wasn't tried. A one-line fixedSize() Text can get very wide, so a long-line stress check on a device would be worth doing before relying on it.

I did not build the app or run ios-look. I'm taking the visual check from the body.

Merged as b6b2f10