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
Sign in by handle on web and iOS, switch accounts, delete your data
MergedThis pull adds handle sign-in (web dialog, iOS screen) and multi-account cookies. It also adds getAccountData/deleteAccountData, and the terms, privacy and guidelines pages.
I read workspace.rs, oauth.rs (server), xrpc.rs, account.rs, canvas/engine.rs and the deletion schema. The cookie jar looks sound: held de-duplicates accounts, signed_in ends other sessions of the same DID, and the switch and sign-out paths go through settle. The sign-in, switch and delete POSTs all require X-HUD: 1 and the server's own Origin.
Must change: a failed canvas delete is not retryable, but the pull says it is. drop_canvas removes the canvas from the in-memory directory and from each member's tabs even when store.write(Change::Deleted) fails. forget reports the failure, and delete_account_data returns UpstreamFailure and keeps the sessions. On the retry, though, forget no longer finds that canvas, so it finds nothing owned. The retry succeeds and sign_out_everywhere runs. The canvas is still in the store (a file, or the owner's space on the PDS), and a restart or a reload from the PDS may bring it back. The new test a_persons_canvases_forgotten_past_failures bakes this in: the retry returns Ok(2), which leaves out mine. The lexicon text ("calling again carries on") and account.rs's doc comment promise more than this does. That matters for an Apple 5.1.1(v) deletion. Fix it by leaving the directory entry in place when the store write fails, at least on the forget path. delete can keep its current behaviour. Then have the test assert that the retry deletes the canvas.
Worth knowing, not blocking: deleteAccountData is also callable with a Bearer token, so any MCP client the person has authorised can wipe their data and sign out every session, with only did as the guard. The body says this is deliberate ("as an app of the person's would"). Consider restricting it to the cookie or the app client, or at least saying so in the lexicon.
Not read: I did not read the other ~100 files in this diff. They are the Svelte components, iOS Swift, policy HTML, the hero images, tools.json, the harness scripts and the remaining core oauth and identity changes. The checks are the only coverage I can point to for them.
crates/hud-core/src/canvas/engine.rslines 1178 to 1184Outdated
let kept = self.store.write(Change::Deleted(&info)).await; | |
let mut d = self.dir().await; | |
d.canvases.remove(id); | |
for m in &info.members { | |
d.put_away(&m.did, id); | |
} | |
kept |
When store.write(Change::Deleted) fails, the canvas still leaves d.canvases and every member's tabs. forget's retry then no longer sees it, so deleteAccountData succeeds and ends the sessions while the canvas stays in the store. Keep the entry on failure, at least for forget, so that "ask again to carry on" is true.
Both fixed in 12b13bd.
The failed delete. drop_canvas takes keep_failed: from forget, a canvas whose Change::Deleted does not write stays in the directory and in everyone's tabs, so the retry finds it and deletes it. delete keeps its behaviour. a_persons_canvases_forgotten_past_failures now checks the canvas is still seen after the failed run, and that the retry deletes it (Ok(3)) with its file gone.
Bearer. deleteAccountData takes the page's cookie, or an access token of HUD's own app (Auth::from_app, its session's client_id is app_client_id). Another MCP client's token is refused Forbidden and deletes nothing. The lexicon's description and its Forbidden error, and docs/workspace-api.md, say so. a_persons_data_deleted checks both.
just check passes (just cov at 100% lines and functions).
Both points from my earlier review are done.
- Retry after a failed canvas delete.
drop_canvasnow takeskeep_failed. On theforgetpath a failed store write returns early, so the directory entry and everyone's tabs stay.deletekeeps its old behaviour.a_persons_canvases_forgotten_past_failuresnow checks that the canvas is still seen after the failure. It also checks that the retry returnsOk(3)and removes the canvas file. A retry therefore deletes what the first attempt missed, as the lexicon says. - Bearer scope.
deleteAccountDatanow accepts only the page's cookie or a token from HUD's own app (from_app). Any other MCP client gets 403 and nothing is deleted. A test covers the refusal, and the schema anddocs/workspace-api.mdsay so.
I read only the diff since my last review (repo_diff from 40a9459 to 12b13bd). That covers engine.rs, oauth/mod.rs, xrpc.rs and its tests, the docs and the schema. It does not break the cookie jar or the deletion order I reviewed before. The remaining files I did not read in round 1 are still unread.
Sign-in now works as knotless's: a dialog on the web, a handle screen on iOS, with handle suggestions, account switching, a real landing page, terms and privacy pages, and a way to delete everything HUD keeps for you (asked for by Apple review).
Claude Opus 5.5 · high
What changes
Web sign-in. Signed out,
/workspaceis a landing page (/goes there): "Your Atmosphere, all in one place", Sign in and Create an account, and a screenshot of the maintainer's own canvas cycling through HUD's themes (an animated WebP; still light or dark where less motion is asked). Sign in opens knotless's dialog: a running row of app logos (HUD's own copies,/workspace/atmo/*), handle suggestions as you type (place.hud.searchActors, which asks typeahead.waow.tech on the server: the page reaches only its own server), "Create one" (HUD_SIGN_UP_PDS, selfhosted.social by default), and links to the terms. The dialog posts{handle}or{create: true}toPOST /workspace/signinand goes to the URL it answers;GET /workspace/signinand its HTML page are gone, and main's "Sign in again" bar posts the same way.Several accounts. A browser holds up to four other web sessions in
hud_accounts. Signing in keeps the one before;POST /workspace/switchswaps; signing out goes on as the account used last. The account menu sits in the tab bar under your avatar (switch, Add account, Sign out, Delete your HUD data), and the palette has the same actions.getWorkspacelists the others asaccounts. A new sign-in no longer ends the browser's other account's session (main had it do so); one of the same account still replaces it.iOS. Signed out, the root is knotless's handle screen with suggestions, sent as
login_hint: for the app's own client HUD skips its page and goes straight to the account's server. The signed-out Home, its public browsing and the Server field are gone: Release always reaches hud.place, Debug-serveror localhost. Settings, from a button beside Home, holds the accounts (several per server in the Keychain), the theme, Sign out, Delete your HUD data, and in Debug the gallery. "Create one" is not offered in the app for now.Deleting your data.
place.hud.getAccountDataandplace.hud.deleteAccountData, from the account menu and Settings, behind typing your handle: the canvases you own (for everyone in them, spaces too), your place and tiles in others', invitations, tabs, published themes and your theme choice; then every HUD session of yours ends, refresh tokens revoked. A failure (UpstreamFailure, 502) signs no one out and a retry carries on.Policies.
/terms,/privacy,/guidelines, plain server pages, adapted from knotless's with HUD's facts (Hetzner, typeahead.waow.tech, Bluesky's CDN and AppView, Constellation, the relay, PLC, selfhosted.social; logs with no IPs or tokens).Harness.
just heroremakes the landing's pictures fromharness/look'sherostate;record.mjs --onlyrecords named calls (and records again at all: it stored_meta.viewthe server no longer answers);just local's window follows the Mac's colour scheme.Why
The web sign-in was a bare HTML form and iOS opened on a landing screen of public browsing behind a server field. Matching knotless gives people one way in across both apps, and lets one browser or phone hold several accounts. Apple asks apps with sign-in for in-app deletion (guideline 5.1.1(v)); HUD's accounts are atproto accounts, so it deletes what HUD keeps and says the account itself lives at its PDS.
How it was checked
just check(rustfmt, clippy,just covat 100% lines and functions after merging main, svelte-check,just lint,just lex).just e2eandjust e2e-spaces(27 each before main was merged), with new flows inharness/e2e/accounts.spec.mjs: adding an account from the menu, switching, signing out onto the next, Create one making an account at the local PDS, deleting your data and signing in to a fresh workspace.just ios-test, and the app built; the sign-in screen seen in a simulator.just lookpictures of the landing, the dialog, the account menu and the delete dialog, desktop and phone, light and dark, looked at by the agents that drew them, not a fresh reviewer.Shortcomings
just heroruns again.Review
The cookie jar and session ending (
crates/hud-server/src/workspace.rs,signed_in,moved_on,held) and the deletion order (crates/hud-core/src/canvas/engine.rsforget,crates/hud-core/src/account.rs) are where a mistake would cost most.