~ 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 issue and pull lists refresh and hold still as they load

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ios/list-refresh

What changes

Pull to refresh on a repository's Pulls and Issues, on your own under My Work, and on every other list built on PagedList: commits, releases, runs, followers and search results.

No more gap under the Open and Closed picker. Each time the list was shown again, as after coming back from a pull or another tab, it set itself loading, which put a row between the picker and the rows already there, pushing them down until the answer came. Now what's on screen stays while it reads again.

Switching between Open and Closed shows what was already read of that state at once, and reads it again quietly, rather than showing the other state's rows under a spinner.

A list scrolled far down stays where it was when shown again. It used to go back to its first page. Pull to refresh does start again from the first page.

Leaving a list while it loads no longer shows "cancelled" as its failure when you come back, and a read that fails leaves what's on screen rather than replacing it.

Why

Reading again on each appearance is right, as a pull may have been closed or merged meanwhile, so that stays. Only what it does to the screen changes.

How it was checked

With the app's recorded answers slowed to 5 seconds on repeat reads, a temporary change to see the moment. The gap showed on the old code on coming back from another tab, and doesn't on this. Open to Closed and back shows its rows straight away. A long drag ran the refresh, seen by a temporary marker at its start and end, 5 seconds apart, on Pulls and on the Inbox, which already had it.

Shortcomings

The refresh's spinner wasn't caught in a picture, on Pulls or on the Inbox: a marker shows it ran, not how it looks, so try it on a phone. Not run against the live server. Paging far down a list and coming back wasn't tried, as the recording has only short lists. The Inbox still goes back to its first page when shown again. ios/ isn't built by CI.

🤖 Generated with Claude Code

Approved

This adds pull to refresh to PagedList and ItemsView. It also keeps the rows on screen while a list reads again, caches each Open/Closed state's answer, and treats a cancelled read as no failure. I read the whole diff (only RepoView.swift) and found nothing that must change. I did not build or run it.

Two minor points:

  • rereading keeps old rows past the first page. If one of those was closed or merged meanwhile, it stays on screen until you pull to refresh or page again. That fits "stays where it was", but it is a stale-row case.
  • The new rereading helper was inserted between the /// A list a page at a time… comment and PagedList, so that comment now sits above the wrong declaration.
ios/Knotless/Views/RepoView.swiftline 508
}
}
/// A list a page at a time, for those screens that are only that.
review.knotless.dev

This doc comment described PagedList but now sits above rereading. Move it back down to PagedList.

Merged as 0ecbe56