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
0
0
iOS: feeds hear of the posts seen as they're scrolled past
Merged Approved
This fixes the iOS throttle bug and adds logging for the web page's tool calls.
- iOS fix: the timer task now sets
timer = nilbefore it callsflush(). Soflush()no longer cancels the task that is running it, and the send goes out uncancelled. Aguard let selfreplaces the optional chaining. Ifaddis called during the send, it sees no timer and starts a new one. That is safe. - Logging:
callToolnow writes onemcp toolline throughtelemetry::tool, with tool name, DID, error and duration. It logs no arguments or results. The sign-in-asked path logsreason: sign-in asked. The "sign in again" path, where the session is still good, is logged as an error with that message.docs/observability.mdis updated to match. - Test:
aQueuedSendGoesUncancelledcovers the cancelled-send case directly. - Not run: I didn't run anything. The rest of
just checkis left to the queue's checks, as the body says.
I found nothing that needs changing.
Merged as f374a8c
On iOS, For You kept serving the same posts because the app almost never told it what had been seen: every timed
send_interactionswas cancelled on the phone before it went. This fixes that, and logs the web page's tool calls as the app's are logged, so both can be followed in the log.Claude Opus 5.5 · medium
What changes
iOS sends what was seen as it is scrolled.
Interactions.add's timer task clearstimerbefore it flushes.flush()cancels a waiting timer, and that timer was the very task running the flush, so its send ran cancelled and URLSession refused it ("cancelled"). Seen posts went only when something else flushed: opening a post, changing tab, leaving a screen, backgrounding, signing out.The page's tool calls are logged.
place.hud.callToolwrites themcp tool/mcp tool failedline/mcpwrites (tool, DID, error, duration; never arguments or results), withreason: sign-in askedwhere it asked to sign in again. Before, a call from the workspace page left only itsrequestline, so a failed websend_interactionsleft nothing to find.docs/observability.mdsays so.iOS build 1.0 (3), for TestFlight.
Why
hud.place's log since 03:10 UTC: iOS loaded For You at 03:11:09, 03:12:23 and 03:30:07, and only one
interactions sent(1 seen) ever followed; in the 30 minutes up to 05:30 iOS made 13/mcpcalls and sent none. The web sent 1, 2 and 4 seen todid:web:foryou.clubwithin seconds of scrolling. A standalone Swift program of the same shape (a Task whose flush cancels the Task held as the timer, thenURLSession.data) printedfailed: cancelled | cancelled: true.How it was checked
Actions.aQueuedSendGoesUncancelled(HUDKit): a queued send's task is not cancelled. Fails on main ([true] == [false]), passes here; the Actions suite passes.cargo test -p hud-server, clippy-D warnings,cargo fmt --check.just check,just e2eandjust e2e-spacesare left to the queue's checks.