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

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0

iOS: a feed pages on as its foot comes on screen

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hud:ios/feed-paging

Scrolling a feed on iOS loaded one page more, then left its spinner turning: no page after the second came. It now loads each page as the foot of the list comes on screen.

Claude Opus 5.5 · low

What changes

iOS feeds page on. A screen or tile's list asks for its next page as its foot scrolls into view, page after page, as the web does.

Why

StepView drew the foot's ProgressView in a plain VStack inside its ScrollView, and a plain stack builds every child at once, so onAppear ran as the view was built, not as it came on screen: page 2 loaded at once, off screen. The spinner was the same view after, so it never appeared again, and page 3 was never asked for. The stack is a LazyVStack now, building the foot only near the screen, and the spinner is one view a page (.id of the next page's call), so each page's asks afresh. onScrollVisibilityChange would say the same, but needs iOS 18; the app targets 17.

How it was checked

The app builds for the simulator (xcodebuild … build). Left to CI: the rest of just check.

Shortcomings

Not tried by hand: no feed was scrolled on a simulator or device (just local --ios, a long feed scrolled past a few pages, is the check).

Approved

The change swaps the VStack in StepView for a LazyVStack. It also gives the foot spinner an .id of the next page's Call. The foot is now built only near the screen, and a new spinner appears for each page, so onAppear fires once per page. Call is Hashable, so .id(next) compiles. After a failed load, "Try again" clears the error and the spinner is rebuilt, so it asks again. I found nothing that needs changing.

The author says no feed was scrolled by hand, and I couldn't check that either. Scrolling a feed past a few pages on a simulator is still worth doing before release.

Merged as b345a4f