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
Notifications tiles for Bluesky and Grain
MergedThis pull adds a Notifications tile for Bluesky (app.bsky.notification.listNotifications) and one for Grain (social.grain.notification.listNotifications). Each app's page and launcher opens its tile. It also changes query joins in two ways:
- A join that reads
responsenow runs on every page, not only the first. $eachdrops repeated values and is cut to the param's lexiconmaxLength.
The join changes look right:
params_ofkeeps the order and stops atMAX_PARAM_ARRAYonce repeats are dropped.cut_to_lexiconreadsmaxLengthfrom the query def thatask_withuses next, so the lexicon is looked up only once.per_pagenow countsresponsetoo. That can't change any existing view: no other bundled view with acursorhas query joins (the views that readresponsein a join are profiles, a gallery, a chat and a repository, and none of them pages). The pull's own new test covers this.- In
tools.rs,with_saidnow gets all of the mode's joins on a later page, butjoinedholds only the ones that ran, which matches how records pages already work.
The views do what the tests claim:
- A Bluesky like or repost opens
record.subject.uriand draws the joined post. A reply, mention or quote opens its own thread through the inner list. A follow's subject is a DID, so it opens nothing. - A Grain row opens
getGalleryonly when it has agalleryUri. - The Grain service DID matches the other Grain views, and
galleryThumbis in the bundled lexicon.
The docs (views.md and app-pages.md) and the gallery's made-up answers are updated with the change. Every check on the head commit passes: check, test, docs, e2e and e2e-spaces; web and lexicons were skipped because nothing they watch changed.
I read all 14 changed files except the bulk of harness/gallery/answers.json, which is generated gallery data held to its lexicons by the answers step. I have nothing to ask for.
Bluesky and Grain each get a Notifications tile, from their own AppView's
listNotifications, opened from each app's page and launcher. A Bluesky like or repost shows the post it is about; a Grain one its gallery, with a thumbnail.Claude Opus 5.5 · high
What changes
views/bsky-notifications.json(app.bsky.notification.listNotifications): each row is the author's avatar, name and time, what they did, and what it is about. A like or repost shows the post it likes, from a query join ofapp.bsky.feed.getPostsover the notifications'record.subject.uri, and opens its thread; a reply, mention or quote shows its own text and opens its own thread; a follow opens only its follower. Launched withlimit: 25, so every liked post on a page fits onegetPostscall.views/grain-notifications.json(social.grain.notification.listNotifications): the same header; the comment replied to, the comment, and the gallery's title, its thumbnail beside. A row opens its gallery (getGallery); a follow, its follower.Entry points: a Notifications launcher in each view, and a Notifications row in
bsky-app's andgrain-app's where-to-go lists on one's own page.Query joins (
hud_core::join,tools.rs,view.rs):responseruns on every page, as a records page's that readsrecordsdoes: a page more of notifications fetches its own liked posts. The bundled views whose joins readresponsetoday (profiles, a gallery, a chat, a repository) have no cursor, so nothing else changes.$eachholds each value once (ten likes of one post ask for it once), and is cut to the param'smaxLengthin the method's lexicon (getPoststakes 25), the first asked, not the call refused.xrpc::ask_withtakes the lexicon documents already fetched, so the cut costs no second lookup.Docs:
docs/views.md($each, pages, bundled views and joins, launchers),docs/app-pages.md(both apps' where-to-go).Why
Notifications are each app's: Bluesky's and Grain's answers differ in shape and in what they open, and a name in a view opens that person's page in the view's app, which a merged tile would lose. One view per method keeps them data; a merged feed would need a mechanism merging two services' cursors.
Bluesky's answer carries the like or repost record, not the post it is about, so the post comes by a join; without the two join changes a page more drew no liked posts, and a busy page refused the join outright.
How it was checked
just check(fmt, clippy, the tests, svelte-check, lint with docs, lex). New tests: both views draw an answer their lexicon allows and open what each row is about (tools.rs);$eachasks each value once, no more than the param'smaxLength, and a join readingresponseruns per page (join.rs). Made-up answers for both tiles in the gallery (harness/gallery/made.mjs, held to their lexicons, the join'sgetPostsanswer too);just gallery --shotin desktop and phone, light and dark, critiqued by an agent that did not draw them: its points on the reason wrapping and an orphaned time were fixed.Shortcomings
grain-serve/src/read/notification.rs).updateSeen) or shows which are unread.wrap: "cut"Row squeezes its middle children to nothing after a first one shorter than its 3ch floor (web/renderer/src/tree/Row.svelte), which the dot was.Review
The design of the two join changes (
join.rs'sparams_ofandcut_to_lexicon,QueryJoin::per_page), then the views.