~ 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

Bios and feed descriptions mark their links, mentions and tags

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hud:richtext/bios

A profile's bio and a feed's description now draw their links, @mentions and #tags, as posts and galleries already did: on Bluesky's and Grain's pages, every profile card, and the Saved feeds tile.

Claude Opus 5.5 · high

What changes

Bios. A profile record (app.bsky.actor.profile, social.grain.actor.profile) has no facets, so the server finds them in the text by the rules the composer writes with (richtext::marks), as Bluesky's app does for a bio. The Profile card sends descriptionRuns in place of description, so the Bluesky page, bsky-profile, knotless's profile and describe_repo's profile all mark them. Grain's page draws its bio as RichText with a new format: "detect". A mention found so opens the account by the handle it names (describe_app/describe_repo resolve it when it is opened), so a run's actor is a DID or, here alone, a handle.

Feed descriptions. The Saved feeds tile, a profile's Feeds and the Bluesky page's Feeds draw a feed's description as RichText with its descriptionFacets, and a new style: "muted" on RichText keeps them small and secondary, as the muted Text they were.

Code. facet_runs and the new detected_runs share marked_runs. On the web, a mention run's field is actor (it was did), ProfileView and ClampedText draw runs and open mentions, and RichText draws its runs itself so muted applies. On iOS, ProfileCard draws the runs through Clamped (its own ClampedDescription is gone) and Run.mention takes actor:. place.hud.ui grows profileProps.descriptionRuns and richTextProps.style.

Why

A bio's @mentions and links were plain text, though posts and galleries beside them were not. Finding mentions without resolving them keeps the resolver synchronous and hud resolve offline, and costs nothing until one is opened; resolving each handle to a DID on every profile drawn would hide dead handles, at a lookup per mention and a network step in the resolver. For posts and feeds, the stored facets alone say what is marked, as before.

How it was checked

just check. hud-core's tests, with a new one for a bio's links, mentions and tags; hud resolve on the recorded answers: your profile's bio and Grain's page give mention, tag (opening Grain's hashtag feed) and link runs, and the Saved feeds tile with a mention facet gives a muted run opening its DID, a feed with no description still nothing. just look with the profile tile and the Saved feeds tile, desktop light and dark, critiqued by an agent that did not draw them. just ios-test.

Shortcomings

  • An iOS build from before this shows no bio: Profile no longer sends description (kept in the lexicon, marked no longer sent).
  • A bio's @handle that resolves to no account is drawn as a link all the same; opening it says so.
  • The phone pictures show only the first column, so the profile and feeds tiles were looked at on desktop alone. just e2e left to CI.

Review

Start at crates/hud-core/src/ui/mod.rs (marked_runs, detected_runs, rich_text) and ui/layout.rs's profile.

Approved

This pull marks links, @mentions and #tags in bios and feed descriptions. Bios get them from richtext::marks through the new detected_runs, sent as Profile.descriptionRuns and drawn with the new format: "detect" in Grain's view. Feed descriptions now go through RichText with their stored descriptionFacets and a new style: "muted".

I read every file the diff changes, plus the code around it that I needed to judge it:

  • Runs: splitting facet_runs and detected_runs over a shared marked_runs keeps the old behaviour. Facets out of range or overlapping an earlier one still leave their text plain. A facet with no feature it recognises still covers its range as plain text.
  • Mentions by handle: these work end to end. The web's openActor passes the actor straight to describe_app/describe_repo, and iOS's hud-actor: route does the same. Every use of the old did field on the web and of .mention(…, did:) on iOS has been renamed.
  • Three places: the catalog, the resolver, place.hud.ui, the web renderer and HUDKit all change together, as AGENTS.md asks. The lexicon only grows: description stays and is marked as no longer sent.
  • iOS: the muted RichText uses the same font and .secondary colour as a muted Text. ProfileCard now uses the shared Clamped, so its "more" state is still kept through the view's memory.
  • Web: FacetText is still used by Embed, and it already passes runs through RichRuns, so the rename reaches it.

Nothing needs to change. The check, test, web, lexicons and docs checks pass. e2e and e2e-spaces were still running when I looked.

Approved

I approved this at fc8b0a1. The only change since is a merge of main (the Notifications tiles and the <details> block), and it doesn't break what I approved.

  • The conflict in catalog.rs: it was resolved correctly. RichText's notes keep both main's <details> wording and the pull's detect and style: "muted". The pull's own diff of that file shows only its own changes.
  • Merged code still using the old names: I found none. On the web, every mention run reads actor, and the only .did left in web/renderer/src is the composer's account suggestions, which aren't runs. On iOS, TreeView builds .mention(text, actor:), and no merged Swift calls the old did: form. The new notification views don't use Profile.description.

At the merged head the docs and check workflows pass. e2e and e2e-spaces were still running when I looked; test, web and lexicons were still queued. Nothing needs to change.

Merged as 476f307