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

Approving an app is a page of its own, over the host's background

Merged
Merged chadtmiller.com asked to merge into feature/branding from chadtmiller.com/group-host:branding/authorize

The page an app's request is approved on is now one card of its own, without the console's header and footer, over the host's background picture. The host's name and the account menu sit at the card's top, and Decline sits beside the sign-in button.

Claude Opus 5.5 · high effort

What changes

The page. /authorize says it stands alone (alone: true from its load), and the root layout then draws neither the header nor the footer. A new template, Alone, draws one card over the host's background:

  • Top: the host's name and logo (SiteBrand, the same molecule the header now uses) and who is signed in. Their menu is UserMenu with places={false}: switch account, add one, sign out, and none of the ways off into the rest of the console. Signed out, it's a quiet Sign in. The page draws SignInDialog itself, as the header no longer does.
  • Body: as before. With one group to approve, Decline sits beside its button, sent by formaction from that group's form. With more than one, or none, Decline comes once after them all, so the page never has two.
  • Foot: "Technical details" (now AskedScopes, out of AuthorizeRequest) and the operator's links (SiteLinks, shared with the footer), set apart by a rule. It's drawn only when it has something to show.

Backgrounds. BACKGROUND_LIGHT_URL and BACKGROUND_DARK_URL set the picture behind the card, by the reader's colour scheme, either one standing in for the other. The host serves them at /img/background-light and /img/background-dark, read as the logo is but up to 2 MiB. It keeps its own pictures by role (logo, light, dark), so one URL set for two of them can't serve one past the other's size limit. getBrand names them as backgrounds.

Why

This is the page an app sends people to. As the reference PDS does with its sign-in screens, it should name whose host this is and leave nothing to wander off to mid-request. The header's links led away from a request that then lapsed. The route-group alternative would have dropped the header from the root error page (an unknown address), so the page opts out by its data instead.

How it was checked

  • tests/brand.rs: an unbranded host has no backgrounds and 404s at both routes; a 300 KiB background is served while the same picture as a logo isn't; a background over 2 MiB isn't.
  • tests/config.rs: both variables read.
  • svelte-check, layers, strings, dialogs, clippy, just lex, harness/docs.mjs.
  • just look of the approval page: with Grain's name, icon, links and photo, desktop light and phone dark; unbranded, signed in to two accounts with the account menu open.
  • just shots docs/guides/signing-in-as-a-group.md redrew the guide's pictures; the guide's approve step says what's new.

e2e and the coverage gate are left to CI.

Shortcomings

  • Several approvable groups each keep their own sign-in button with Decline once at the end, as before.
  • A background that doesn't load leaves the plain page colour, with no message.
Approved

This makes /authorize a standalone page: one card over the host's background, with no console header or footer. It adds BACKGROUND_LIGHT_URL and BACKGROUND_DARK_URL, served at /img/background-light and /img/background-dark with a 2 MiB cap.

I read the Rust side (brand.rs, config.rs, lib.rs, apps.rs), plus Alone.svelte and authorize/+page.svelte. The pull is large, and I did not open the rest of the diff. That includes the root layout, UserMenu, SiteBrand, AuthorizeRequest, the CSS, the messages, the docs and the tests.

  • Each picture has its own cache key (logo, light, dark) and its own size limit, so one URL set for two roles can't be served past the smaller limit.
  • Unset backgrounds return 404.
  • read_image now takes the byte limit as an argument, and the app-logo path still passes LOGO_AT_MOST.
  • The light and dark fallback in Alone is correct.

Nothing I read needs changing. One reminder from AGENTS.md: a change people see needs a .changeset/ file, or Changeset: none on its own line in the body. The check check enforces this. I didn't look for one in the diff.

Merged as fba1cbe