chadtmiller.com/group-host
atmosphere group host
A host's operator names it and gives the console their own look
MergedThis pull merges feature/branding (and main 0.7.0) into main. It adds the operator's brand and colour config, getBrand, served host images, a palette and light/dark choice set from the first byte, and a standalone approval page.
I read the Rust (config, brand, apps, api, lib) and the web pieces that carry the logic: hooks.server, brand.ts, appearance.ts, the root layout and its server load, authorize, Alone, Appearance and AuthorizeRequest. I did not read the CSS and token rewrites, the message strings, the docs, the shot images or the e2e/test files. Those are visual, prose or check-enforced, and just docs and the other checks cover them.
I found nothing that must change.
- Config input: each value is validated when the config loads. URLs must be http or https, colours must be hex, the palette must be one of the five, and the name has a length cap. The client re-checks colours before it writes them into a
<style>block, so{@html}there is safe. - Host images: they go through the same SSRF-guarded fetch as app logos, with a size cap and a check of the image's first bytes. They are served with the same headers as app logos.
- Cookie and palette: the cookie value is allow-listed before it reaches
data-theme. The palette is also allow-listed before it reachesdata-palette. The hook builds the palette attribute lazily, after the layout load has set it. describeServer: the newlinksandcontactfields match what atproto's own server description uses.
The pull body says the Rust tests, svelte-check and e2e are left to CI, so those checks need to be green before this merges.
8 passed, 1 skipped
What changes
feature/brandingcomes tomain: a host's operator names it and gives the console their own look.A host is named, with a logo and links.
SERVICE_NAME,LOGO_URL,HOME_URL,PRIVACY_POLICY_URL,TERMS_OF_SERVICE_URL,SUPPORT_URLandCONTACT_EMAILsay how the console shows the host and whose pages it links to;getBrandanswers them.The colour that acts, and a palette.
PRIMARY_COLORandPRIMARY_COLOR_DARKmake the console's buttons, links and marks the operator's colour.PALETTE(paper,slate,neutral,sage,mauve) sets its paper, cards, lines and ink, set on the page from its first byte. The console's colours are each written once, aslight-dark(), over one ladder of lightness.Light or dark, as the reader chooses. A reader picks light, dark or their system's, and the console keeps it.
Approving an app is a page of its own. One card without the console's header and footer, naming the host by its logo and name, over the operator's background (
BACKGROUND_LIGHT_URL,BACKGROUND_DARK_URL).deploy/docker-compose.ymlpasses each of these asGROUP_HOST_<NAME>, empty by default, so a host that sets none looks as it did.Why
Each part landed in
feature/brandingby its own pull, and groups.grain.social has run a build of that branch as a trial. It goes tomainso that it is released, and the host runs a release again rather than a branch build.This merges
main(0.7.0) into the branch first. The one conflict wasdocs/design/signing-in.md, rewritten onmain: the branch's paragraph on the approval page is carried onto the new page, shortened to its design.How it was checked
Each part's pull ran the checks into
feature/branding. On the merge:just docsand oxfmt's check pass here. The rest, the tests under the gate, svelte-check,e2eand its guide pictures, is left to CI.Shortcomings
Each part's change file comes with it (
host-branding,host-colours,appearance-choice,authorize-alone), so the next release is a minor one.