chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.3.0 Latest 5 packages
0
0
A feed in the web shell pages as it is scrolled
Merged Approved
This adds an opt-in auto prop to LoadMore. With it set, an IntersectionObserver on the foot loads the next page once the foot is within a screen of the scroller. The shell's Stack sets auto only for the level in front and settled (inFront).
I read the whole diff and found nothing that must change.
- Effect: it re-runs when
loading,errororautochanges. That gives one page at a time, a fresh observer after each page, and a stop on error until Try again. The foot is only observed inside$effect, so SSR and hydration are unaffected. - Scroller:
scroller()returns null for the page. A nullrootwith a percentagerootMarginthen uses the viewport, which is what you want there. - Checks: the ssr test covers one call when the foot is shown twice, no load under an inert screen, and no repeat load after an error. The docs page and the changeset are both present.
- Not run: I didn't run the checks or the Rust side. The body says
just check's Rust side and e2e are left to CI.
All checks have passed
9 passed
Merged as 511366c
A feed, grid or camera in the web shell (next.grain.social) loads its next page by itself as you scroll near its foot, as Grain's iOS and Android apps do. The Load more button stays as the fallback.
Claude Opus 5.5 · high
What changes
Paging on scroll: where a screen's tree has a
next, itsLoadMorefoot watches itself with an IntersectionObserver against the level's own scroller (its nearest ancestor that scrolls,view/window.ts'sscroller, now exported), its margin a screen below (rootMargin: 0px 0px 100% 0px). As it comes within that, the next page loads, with no button press.LoadMoretakesautofor this. The shell'sStacksets it for the level in front alone (inFront): the sheet's while one is open, otherwise the top of the stack with no pager over it, in the tab on show, and not while its call is made again (refreshing, or swapped).When it doesn't load: while a page is on its way (the observer is let go and made again once the page lands, so a page too short to fill the view brings the next), after an error (the error shows with Try again, and nothing loads until it's pressed), under another screen or
inert, and wherenavigator.connection.saveDatais set (the button alone pages). It starts only in an effect, so the page the server draws is the page hydrated.The button: stays in every case, for the keyboard, screen readers, a page with no script and errors.
docs/views.md (The frame) says so, and a patch changeset is in
.changeset/.Why
The web asked for a button press each page where the native kits page as the foot comes near (Grain's iOS
LevelScreen.swift,.onAppearon the foot, and Android'sLevelScreen.kt, within 2400 px of the end). An observer on the foot, re-made after each page, keeps it to one page at a time without a scroll listener, and opt-inautokeepsLoadMore's other hosts (the MCP view in a frame, which its host sizes to its content, and the workspace's tiles) as they are.Other lists: a screen's one paged list is its tree's page list (
List,Covers,GalleryorPlayer), which this covers, grids included.Messageskeeps its own "Load earlier messages" button at its top, as HUDKit's and the Android kit's do. Grain's Explore grid is a join of 18 with nonext, so nothing pages it on any platform.How it was checked
npm run check,npm run unit,npm run ssr,node harness/docs.mjs.web/shell/test/ssr.mjsadds a long feed in the browser with a fake IntersectionObserver: its foot shown loads the next page once (shown twice at once, one call), a screen over it (inert) loads nothing, a failed page shows its error with Try again and loads nothing more when shown again, and Try again loads the last page and the foot goes. Withautotaken out of the Stack, it fails.HUD_WORKSPACE=off,HUD_APPSGrain'snext/fromorigin/feature/hud) and Grain'snext/built on this branch's packed@hud/*, signed out, at 390 and 1440. Scrolled by the wheel alone, Home, chadtmiller.com's profile grid and the Apple iPhone 16 Pro camera each loaded two pages more with no button pressed, and an element in view at the moment each page was asked for was at the same place (0 px) once it appended. Explore has no Load more to page.Shortcomings
just check's Rust side and e2e (no Rust changed), left to CI.