~ 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

Android: HUDKit in Compose draws every view, in a gallery app

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hud:android/renderer
1 reviewer 1 approved
android

HUD gets an Android app. Its renderer, android/hudkit, draws every catalog component from a resolved tree in Jetpack Compose, as iOS and the web do. For now the app's one screen is the gallery of sample tiles. Sign-in and the workspace come next.

Claude Opus 5.5 · high

What changes

android/hudkit (place.hud.kit) is the renderer, ported from ios/HUDKit. tree/TreeView.kt's ResolvedNode draws each of the catalog's 31 components through a function of its own, and parts/ and embed/ hold their pieces. data/ reads a tool result as web/shared/result.ts does: what it draws, paging by next, latest, and stamping $now and $text. support/ holds the surfaces by role (HudColors, a theme's palette or else Material's own colours), the type, the web renderer's own icons drawn from its path data, and pictures through Coil. Players and videos play on media3. A composer picks photos with the system picker, scales them down and strips them, and sends through apply_writes.

android/app is the host. Its debug build carries target/gallery/gallery.json, and just android <entry> opens it at an entry. just android-test runs hudkit's tests on the JVM, which read iOS's own fixtures.

Docs: docs/running.md gets a section, The Android app. docs/overview.md lists the missing workspace, and AGENTS.md describes android/ and counts it among the catalog's places.

Why

So HUD runs on Android, drawing what the server resolves as the other two clients draw it. A view stays data, with nothing Android-only about it. The rest is filed:

  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5pmohczt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5rgpxgzt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5srbufzt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5uejy7zt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5vkl64zt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5wq2knzt
  • at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5xvgttzt

How it was checked

./gradlew :hudkit:testDebugUnitTest :app:assembleDebug passes with no warnings: 22 tests covering results, paging, the header's lead, stamping, times, counts, links, themes and the composer. All 48 gallery entries were drawn on an API 34 emulator and looked at against iOS and the web, with no crash. Two broken rows found that way were fixed and looked at again: a chat's row drawn one letter per line, and Grain's counts broken mid-word. just lint passes. Nothing in CI builds android/ yet (at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/hud/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3n2rs5rgpxgzt). The rest of just check touches nothing changed here and is left to the runner.

pull.png

Approved

This adds an Android app and android/hudkit, a Compose port of ios/HUDKit, with docs and a Justfile entry. The app has one screen, the gallery.

I read the build config, manifest, network security configs, MainActivity, the Justfile and .gitignore changes, data/Compose.kt and data/Result.kt. I found nothing that must change.

  • Cleartext traffic is off in the main build. The debug build allows it only for 10.0.2.2 and localhost.
  • The release build points at https://hud.place/.
  • The composer strips metadata by re-encoding the bitmap. It reads EXIF from the original first and sends it only when asked.
  • Result paging and latest match the logic of web/shared/result.ts.

I did not read the rest of the roughly 10.7k-line diff in any depth: the rest of parts/, tree/, embed/, support/, view/ and workspace/, the tests, and the gradle wrapper files. That is too much to review line by line, and the pull's own checks (22 JVM tests, an emulator pass over all 48 gallery entries) cover rendering far better than reading would. The approval therefore rests on the files I did read.

Two small things, neither blocking:

  • Nothing in CI builds android/, as the body says, and it is filed as an issue. Until that lands, a break in the build would go unnoticed.
  • android/gradle/wrapper/gradle-wrapper.jar is a binary in the repo. It is worth pinning its checksum with distributionSha256Sum in gradle-wrapper.properties if that is not already set.
Merged as 3808aa9