chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.3.1 Latest 5 packages
0
0
---
title: App pages
section: HUD
order: 4
summary: How a bundled view draws an app's page, and where an account opens.
---
An app's page ([`describe_app`](tools.md)) is generic. It shows the app's head, where to go in it and, for an account, that account's part in it.
A bundled view can draw an app's page instead. That's an app page view.
## App page views
An app page view names the app's `domain` (`"knotless.dev"`) in place of a collection or method. It also gives `app`, `description` and the `service` its joins call. It has one mode, `page`, shaped as `{ "join"?: [query joins], "layout", "pages"? }`.
### The page's scope
The main scope is `{ domain, name, icon, actor, me, mine, entries, joins }`. It holds these:
- the app (`domain`, `name`, `icon`)
- the page's account (`actor`, `{ did, handle }`), which is the `actor` argument or else the person signed in
- the person signed in (`me`, or null)
- whether they're the same account (`mine`), read as a `List`'s `where` reads it, so `{ "mine": "mine" }` keeps the literal rows that say `"mine": true`
- the app's entry points (`entries`), each `{ title, call }`
- the answers of its query joins (`joins`)
Its [query joins](views.md) read `domain`, `actor`, `me` and the rest of that scope, as any mode's do. HUD skips a join whose binding doesn't resolve.
### Pages
`pages` names one of the page's joins by its `as`. A `List`, `Covers`, `Gallery` or `Player` of that join's answer is the page's page list. Where the answer has a `cursor`, the tree's `next` is `describe_app` with that `cursor`. That call runs the join alone, from the cursor, and the clients add its items to the list.
### When it's drawn
`describe_app` draws that view's layout where the app has one and there's an account to draw it for. With neither an actor nor anyone signed in, it draws the generic page.
Only a bundled view can be an app's page. HUD refuses an inline view that names `domain` or `page`.
## The bundled app pages
### knotless
knotless's page (`knotless-app`) is its Home. It has three parts:
- My work. This lists Issues and Pull requests opened (with their counts, `50+` where there's a page more), Review requests, Assigned, Notifications (on the person's own page alone), Repositories and Starred (with its count). Each row opens its query.
- Favorites, the repositories the account starred, each opening it.
- Recent, the last 8 pulls and issues the account's doings touched, each once (`getFeed`). Each opens its thread. HUD leaves Recent out when there are none.
The page has four joins, the most a mode makes. They're the open issues and pulls (`listActorItems`), the stars (`getActorStars`, for the Starred count and Favorites) and the recent activity. The other rows have no count.
More on knotless's views is in [knotless](knotless.md).
### Bluesky
Bluesky's page (`bsky-app`) is a profile as Bluesky's app draws one:
- banner, avatar, name, handle and bio
- followers, following and posts
- where to go, on one's own page (Following, Discover, Saved feeds, Notifications)
- their posts and their threads (`posts_and_author_threads`), with links to all of them, their replies, media and videos (the filters of `getAuthorFeed`)
- the feeds they made
## An operator's app page
An operator's app (`HUD_APPS`) has a page as a bundled app does ([the operator's views](views.md#the-operators-views)). Grain is one: its app file and views live in grain's repository, and HUD's tests load a copy as an operator's (`crates/hud-core/src/testdata/grain/apps`).
### Grain
Grain's page (`grain-app`) is its profile. It shows the account's avatar large, its name, handle and bio under it, then, on someone else's, who of its followers you follow ("Followed by alice, bob and 3 others you follow", a `Faces` opening `grain-known-followers`), then its galleries, followers and following, each opening its list (the account's galleries, `grain-followers`, `grain-following`). Anyone else's page has Follow (`social.grain.graph.follow`, with `viewer.following` the one made). One's own has a gear in the bar that opens Settings (`grain-settings`, laid out as [Grain's own](views.md#pages-and-the-hosts-own)), with the account and Sign out, a switch for each upload and notification setting, and the muted and blocked accounts. It ends in Panes: its galleries as 3:4 tiles, newest first, each opening the gallery, 18 a page (`pages`), and on one's own its favorites and its stories (`grain-story-archive`). The data comes from Grain's AppView (`getProfile`, the `actor` feed of `getFeed`, `getKnownFollowers`, `getFavorites` and `getArchive`).
## Where an account opens
A bundled or an operator's view's drawing names accounts in links, mentions and who reposted. Such an account opens as its page in that view's app, where the app has one (`describe_app { domain, actor }`). So a name in a Bluesky post opens their Bluesky page, and a name in a Grain gallery opens their Grain page. In an app with no page, or from an inline view, it opens as the account's profile across its apps (`describe_repo`).
Posts and galleries carry their facets, but a bio has none. HUD finds a bio's links, @mentions and #tags as Bluesky's app does, and a mention there opens by the handle it names.
The tree says which app (`_meta.ui.people`), for the mentions its clients open.
A tile's header has the way across. Its @handle opens the account's profile. The profile's apps open their pages. Those apps are the ones a bundled view draws something of, either an app page or a section of the profile.