chadtmiller.com/group-host
atmosphere group host
0
0
A host is named, given a logo and links to its operator's pages
Mergedchadtmiller.com added 1 commit
Approved
The pull adds the operator's brand settings. It adds config::Brand with validation. It adds getBrand and /img/host, which shares read_image, kept and served with apps.rs. It adds links and contact in describeServer. In the console it adds the header logo and name, the footer links, and a Title atom for page titles.
I read every changed file and found nothing that must change.
- Validation, the cache, and the SSRF guard on the logo fetch all behave as the body says. The guard is the same one
/img/appuses, and a missing logo answers 404 instead of falling through. - Both new methods are listed in
api.md,config.md,deploying.mdand the compose file. The change file is there, and tests cover config,getBrand,describeServerand/img/host. - Dropping the
route_*_headmessages leaves no use of the removed keys in the diff.
Minor and not blocking: failed in SiteHeader never resets, so a logo that fails once stays hidden until the page reloads. That is fine for a static setting.
Merged as 0de86e7
A host's operator can now give it a name, a logo and links to their own pages, and the console shows them in its header, page titles and footer. This is the first part of feature/branding; unset, the console is Atmosphere Groups as before.
Claude Opus 5.5 · high effort
What changes
Operator settings.
SERVICE_NAME(at most 40 characters),LOGO_URL,HOME_URL,PRIVACY_POLICY_URL,TERMS_OF_SERVICE_URL,SUPPORT_URLandCONTACT_EMAIL, read intoconfig::Brand. Each is optional; one set to nothing but spaces is unset. The host refuses to start on a name too long, a URL that isn't http or https, or an email address with no@. Compose passes each through asGROUP_HOST_<name>.The host.
org.atgrp.internal.getBrandanswers the name, the logo's URL and the links, each only when set; anyone may ask./img/hostserves the logo as/img/appserves an app's: read from a public address (any, on an http host), following no redirect, at most 256 KiB, only a PNG, JPEG, GIF or WebP image by its bytes, kept ten minutes.apps.rsnow shares the read (read_image), the keeping (kept) and the response (served) between the two.describeServergives the privacy policy and terms of service aslinks, and the email ascontact, as the reference PDS does.The console. The root layout loads
getBrandbesidegetViewer, falling back to the console's own name when the host doesn't answer. The header draws the logo (hidden if it fails to load) and the name, which gives way with an ellipsis on a phone. The footer says "<name> runs Atmosphere Groups at <host>" and links the operator's pages. A newTitleatom writes every page's<title>as "<page> · <name>", so the head messages no longer each carry "· Atmosphere Groups"; the ones that only repeated a page's heading are gone.Why
The reference PDS lets an operator brand its sign-in and account pages; a group host run by an app (Grain's groups, say) needs the same, or its people approve apps on a page that names someone else. The settings live on the host alone, so the console and
describeServersay the same thing. Pull 2 builds/authorizeon this; pull 3 adds colours.How it was checked
tests/config.rs: what each variable reads to, blanks as unset, and each refusal.tests/brand.rs: an unbranded host answers{links: {}}, emptylinksandcontactindescribeServer, and 404 at/img/host; a branded one answers every field, serves its logo as an image with the same headers as/img/app, keeps it as read, and serves nothing for an SVG, a 404, or a private address from an https host.tests/oauth_clients.rsstill passes over the shared logo code.just lex, svelte-check,harness/layers.mjs,strings.mjs,dialogs.mjs.just lookwith Grain's name, icon and links: signed out and signed in, desktop light and phone dark, a group's page, and a 40-character name on a phone.The coverage gate, e2e and shots are left to CI.
Shortcomings