~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

The built console hands the host's methods on, as vite dev does

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:web/forward

What changes

The built console hands the host's paths to the host, as vite dev already does: /xrpc/, /oauth/ and /.well-known/, beside /console/, cookies and all.

The home page no longer turns a failure into "no groups". A host that fails to answer listGroups, getActorGroups or getActorInvites now fails the page. Swallowing the failure was meant for while the host's methods were being brought over; they all are now. The layout still draws a page signed out when getViewer fails, on purpose.

Why

Found in just dev: signed in as alice, the home page said "No groups here yet", with no "Your groups", though the host listed Riders.

A page drawn in the browser after following a link loads its data from the browser, asking /xrpc/... of the console's own address. The built console (node build, as just dev and the e2e flows serve it) forwarded only /console/*, so that was a 404, and the page's .catch(() => null) drew it as no groups. The first load is drawn on the server, which asks the host directly, so the flows never came to the page by a link.

How it was checked

A new flow, "coming back to her groups by a link, the page drawn in the browser", fails without the change and passes with it. All 22 flows pass on my machine. svelte-check passes.

🤖 Generated with Claude Code

Approved

This pull makes the built console hand /xrpc/, /oauth/ and /.well-known/ to the host, as it already did for /console/. It also stops the home page from drawing a host failure as "no groups". The diagnosis fits the code. A page drawn in the browser asks the console's own origin for /xrpc/..., and the built server only forwarded /console/. The forwarding reuses the existing path, including the forwarded-host and proto headers, manual redirects and a body read whole. Removing the .catch(() => null) matches your note that the host's methods are all in place. I did not run the new flow or the checks; I read the diff and the forwarding code.

One thing to know, which does not block this: the layout still draws a signed-out page when getViewer fails, as you intended. A page that now throws on a host failure will therefore show an error even though the layout drew the user as signed out.

Merged as 517f710