chadtmiller.com/group-host
atmosphere group host
0
0
A site's page draws its frame at once, and finds visitors on a network of its own
Merged Approved
The page around a site now carries the frame's size and body margin in its own <style>, so the iframe never draws as the default box. The rule is gone from shell.ts. The page's plc setting now comes from the new SITE_PLC_URL, which falls back to PLC_URL. I checked SHELL_POLICY in sites.rs: it has style-src 'self' 'unsafe-inline', so the inline style is allowed. The config default, the compose pass-through and the docs all match the code. The tests cover the frame rule, the plc value in the page's config, and the SITE_PLC_URL default and override. I found nothing that needs changing.
Merged as bd0439a
The page the host serves around a site now sizes the site's frame itself. Before, a small bordered box flashed while
shell.jsloaded. The page also gets a new setting,SITE_PLC_URL, for the directory where it looks up a visitor'sdid:plc. A host on a network of its own, like next.opensocial.fyi, can now point that page at a directory the visitor's browser can actually reach.Claude Opus 5.5 · high effort
What changes
The frame is drawn at full size from the first paint. The page around a site (
crates/group-host/src/sites.rs) used to style its iframe only fromshell.js. Until that module loaded, the browser drew its default iframe: about 300×150 with an inset border. That is the box that flashed before Kicker loaded on next.opensocial.fyi. The page's own<head>now carries the frame's size and the body's margin. The shell's CSP already allows'unsafe-inline'styles. That rule is gone fromweb/shell/shell.ts.SITE_PLC_URL. The page resolves the visitor's DID from their browser. It usedPLC_URL, which on next.opensocial.fyi ishttp://next-plc:3000. That name exists only on the box's docker network, so no browser can reach it.SITE_PLC_URLis the directory as the browser sees it, and defaults toPLC_URL, so a host on plc.directory changes nothing. Compose now passesSITE_HANDLE_RESOLVERandSITE_PLC_URLthroughGROUP_HOST_SITE_*. Before this, compose had no way to setSITE_HANDLE_RESOLVEReither.SITE_PLC_URLfalls back toGROUP_HOST_PLC_URL.Why
Kicker, published on next.opensocial.fyi, flashed the box on every load. Its sign-in also can't get past the handle step there: the config the page gets names
handleResolver: https://bsky.socialandplc: http://next-plc:3000, and neither can find a*.pds.next.opensocial.fyiaccount. After this merges, the next network setsGROUP_HOST_SITE_HANDLE_RESOLVER=https://pds.next.opensocial.fyiandGROUP_HOST_SITE_PLC_URL=https://plc.next.opensocial.fyiin hetzner-infra.How it was checked
tests/sites.rs: the shell page carries the frame's rule, and its config namesSITE_PLC_URL.tests/config.rs:SITE_PLC_URLdefaults toPLC_URLand can be set apart from it.docker compose configwithGROUP_HOST_PLC_URL=http://next-plc:3000:SITE_PLC_URLcomes out as that value when not set.Docs
docs/reference/config.mdlistsSITE_HANDLE_RESOLVER(it wasn't listed before) andSITE_PLC_URL.docs/deploying.mdlists the compose variables.docs/design/sites.mdsays both lookups happen in the visitor's browser.