chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.5.0 Latest 5 packages
0
0
Grain's page pages its galleries
Merged Approved
This pull lets an app page view name the join that pages it (page.pages). When that join's answer has a cursor, page_ui sets the tree's next to describe_app { domain, actor, cursor }. With a cursor, describe_app_tool runs only that join. It refuses when the page doesn't page, when there's no account to draw the page for, or when the join doesn't answer. ui::paged now makes one decision about which list is the page list, and List, Covers, Gallery, Player and Messages all use it. Grain's view names galleries.
I found nothing that needs to change. What I checked:
- Clients: they need no change, as the pull says.
appendinweb/shared/result.tstakes only the page list from the next tree. So it doesn't matter that a page more draws its header withoutprofile, andgrain_pages_its_galleriesshows that tree still passesui::check. - The
$binding:{"$": "joins.<as>…"}is now read as paged, but only in the root scope. A record's own join of the same name can't become a page list by accident. PageMode::more: it replaces anycursorparam that's already there. The bundled test checks the joined query againstgetFeed's lexicon.- Same change: the docs (
app-pages.md,tools.md), theplace.hud.viewlexicon and the tool schema are updated with the code, as AGENTS.md asks. - Checks: all of them pass on 3692a8c (check, test, web, lexicons, docs, e2e, e2e-spaces).
Merged as 209633a
Grain's page showed an account's 18 latest galleries and no way to see the rest. Now its gallery tiles grow with Load more, 18 a page, until the account's last gallery, in the MCP view, the workspace and the iOS app alike.
Claude Opus 5.5 · high
What changes
A page that pages. An app page view may name the query join that pages it,
page.pages(itsas). AList,Covers,GalleryorPlayerof that join's answer is the tree's page list, and where the answer has acursorthe tree'snextisdescribe_app { domain, actor, cursor }. That call runs the join alone, from the cursor, so the clients add its items to the list as they do any page more: none of them changes.Grain's page.
views/grain-app.jsonnames"pages": "galleries".describe_apptakescursor. It refuses one where the app's page does not page, where there is no account to draw it for, and where the join does not answer.One rule for the page list.
ui::pageddecides it forList,Covers,Gallery,PlayerandMessages.Ctx.pagedis now the names of the joins whose answer is the page's: a records view's that read a page's records, as before, or an app page'spages. A{"$": "joins.<as>…"}binding counts only in the root scope, so a record's own join of the same name never does.Why
A page view's joins run once, and
describe_apphad no next page. Opening theactorfeed instead draws the galleries as rows, not the grid, and is offered only on one's own page. Naming the join keeps the view data-only and reuses the clients' page more as it is.How it was checked
just check, after rebasing on main.grain_pages_its_galleries: the first page'snextand its one page list; a page more with the galleries join alone; nonexton the last.bundled_query_joins_are_their_methodschecks the paging join, with a cursor, againstgetFeed's lexicon.chadtmiller.com: 7 pages (6 × 18, then 4), 112 galleries, no duplicates,nextgone after the last.describe_appofbsky.appwith a cursor says "Bluesky's page has no page more".Shortcomings
just lookpicture:harness/lookhas no Grain app page, and no client changed.