~ 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

Grain's page pages its galleries

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hud:grain/paged-galleries

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 (its as). A List, Covers, Gallery or Player of that join's answer is the tree's page list, and where the answer has a cursor the tree's next is describe_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.json names "pages": "galleries".

describe_app takes cursor. 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::paged decides it for List, Covers, Gallery, Player and Messages. Ctx.paged is 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's pages. 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_app had no next page. Opening the actor feed 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's next and its one page list; a page more with the galleries join alone; no next on the last.
  • bundled_query_joins_are_their_methods checks the paging join, with a cursor, against getFeed's lexicon.
  • Live, against Grain's AppView, chadtmiller.com: 7 pages (6 × 18, then 4), 112 galleries, no duplicates, next gone after the last. describe_app of bsky.app with a cursor says "Bluesky's page has no page more".

Shortcomings

  • No just look picture: harness/look has no Grain app page, and no client changed.
  • Bluesky's and knotless's pages do not page; each could name a join the same way.
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. append in web/shared/result.ts takes only the page list from the next tree. So it doesn't matter that a page more draws its header without profile, and grain_pages_its_galleries shows that tree still passes ui::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 any cursor param that's already there. The bundled test checks the joined query against getFeed's lexicon.
  • Same change: the docs (app-pages.md, tools.md), the place.hud.view lexicon 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