revert(host): the desktop's account inbox reads the held route again, while Neon Realtime fails to start in production
Why
#3217 (squash 2302746fd) moved the desktop's account inbox (the Inbox tab, the Dock badge, and the notices) onto Neon Realtime. Production's Realtime engine keeps failing to start (logical-slot bootstrap timed out, then admission cooldowns), and main has no fallback, so a desktop built from main shows an empty Inbox tab. The service still serves the old held route, GET /api/inbox?after=… (HOSTED_SERVICE_PATH.INBOX, inbox-page.ts), for released desktops. This PR puts the desktop back on that route.
A plain git revert 2302746fd conflicts, because main has moved on a lot since (oRPC, threads, and more). So this restores only the client side, in main's current shapes.
What changed
- Host: main's notices (
agent-notices.ts) read the account inbox in a loop again. Each read is held with a cursor throughcodingAgents.accountInbox, and a failure or defect waits out the watch interval. The composer's method is back, along with the operator'scodingAgentAccountInbox.- Removed:
account-inbox-follow.ts, the follow and unfollow methods, theaccountInbox.changedevent, the composer'sreset, and@neon/realtimein the host.
- Removed:
- Features:
HostedCodingAgentClient.accountInbox(after)is back. It goes through the oRPC hosted client'sinbox.accountprocedure, held, and always sendsarchived=include.accountInboxLiveis removed.codingAgentAccountInboxParamsSchemaandcodingAgentAccountInboxAnswerViewSchemaare back, with their JSON-schema goldens. - Web: the
PageReturnsseam is removed, because only the live follow used it. That also removes its layer inweb-host.tsandstale-release.ts'sbackOnline, which nothing else used.pageShownAgainstays, because the stale-release reload still uses it.
Main's newer inbox behaviour stays, because the held read carries it on the service: unread state, chat waiting, archived tasks (archived=include), #3992's threads, and failed runs aging out of the 7-day window (the held cursor digests the runs inside the window).
Kept on purpose
- The service's live route:
/api/live/inbox,contract/live.ts,live-procedures.ts,realtime.ts, andlive-wire.ts's schemas. The desktop no longer uses them, but they're harmless, and the unmerged stack builds on them. - #3993's
live-statement.tsand its test. - Removed only because knip flagged them as unused:
live-wire.ts'snextFailedRunExpiryand theAccountInboxLiveAnswertype, which only the follower used. The schemas the service uses stay.
Checks run
- Typecheck: gateway, features, host, panel, web, desktop.
- Tests: the full host and features suites, the panel's coding-agent tests, and web
stale-releaseandweb-notices. scripts/repository-checks.sh,pnpm lint,pnpm knip,pnpm discarded-effect.
pnpm check:affected was run piece by piece, because it runs out of memory in the sandbox.
Made with Luke