registry: the account pages in the brand shell (BRAND slice 2, part 2) #295
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The registry's account pages (
/account, sign-in, sign-up, claim, passkey, authenticator-app and step-up pages, rendered bytools/registry/src/account.trb) wear the brand's shell andbrand/tokens.css, like the package page of #12, and BRAND.md slice 2 is marked done.Source
Design
pageOfinaccount.trbwraps its body in the shell function of #12 (same header with thepackageslabel, top rule, footer, theme toggle); the forms, buttons and tables use the brand's classes (ink primary button; a red button only where BRAND.md section 8 allows it, which is none on these pages).default-src 'none'only by what the shell needs:style-src 'self',font-src 'self',img-src 'self'. Still no inline style, no inline script, nounsafe-inline; the two passkey pages keep their onescript-src 'self'script;form-actionandframe-ancestorsstay as they are. The shell's theme toggle script is the external file of #12, so no page gains an inline script.Cache-Control: no-store, escaped, and CSRF-protected as before; only markup and classes change.Acceptance criteria
account.trbis produced through the shell of #12; none writes its own<html>skeleton.style-src 'self'; font-src 'self'; img-src 'self'; the tests that assert the policy are updated and a new one asserts there is still nounsafe-inlineand no inline<script>orstyle=in any account page.tools/registry/README.mdand RELEASE.md 7.1 describe the new policy; BRAND.md slice 2 is marked done (status paragraph and section 13).Seed impact
None expected (registry write service and static assets; no syntax, native or driver flag).
Size and dependencies
One PR, one or two Conventional Commits. Depends on #12 (the shell function and its stylesheet). Deploying the registry is outside the loop.
[loop:torbscript] claim refine by session:loop-torbscript-20261010 until 2026-10-10T12:44Z (#12 is merged, the dependency is gone)
[loop:torbscript] decided by the loop: the account pages also get
script-src 'self'. Why: the shell of #12 (registryPageHtmlincompiler/src/documentation/site-registry.trb) puts<script src="/assets/registry.js">in every head (stored theme, theme toggle), anddefault-src 'none'would block it, so the toggle would stay hidden and the stored theme would not apply. The script is the same external file of the same origin (nginx serves/assets/on packages.torb.dev, Traefik routes/accountthere too), so no inline script appears and the two passkey pages (which already carryscript-src 'self') lose nothing. The acceptance criterion on the policy is amended below. Rejected: a shell parameter that leaves the script out on account pages (a second shell variant for a toggle, and the account pages would flash the wrong theme).[loop:torbscript] decided by the loop: the form styles go into
assets/registry.css, in the same PR. Why:site-style.trbandregistryStylesheetstyle the search field only; there are no classes for a labelled field, a text input, a form row or the list of identities/passkeys, so "the brand's classes" for the forms do not exist yet. They are added insite-registry.trbnext to the package-page rules, from the tokens only (no new colour, no red, ink primary button =button button-primary, tables = the existingtable/.table-wrap, notices =.callout), so the account pages need no inline style.[loop:torbscript] refine: amended contract, ready for implementation.
Goal. Every page
account.trbrenders (account, sign-up, sign-in, claim, passkey registration and sign-in, authenticator app, step-up, refusal pages) goes through the registry shell of #12 and wearsbrand/tokens.css; BRAND.md slice 2 is done.Design point. BRAND.md section 11 "packages.torb.dev" (Shell: same header with the
packageslabel; ink primary button, never red) and section 13 slice 2; RELEASE.md 7.1 (account page) and 7.11 (hosting, CSP).Acceptance criteria (replaces the list in the description where it differs):
pageOfintools/registry/src/account.trbcallsregistryPageHtml(title and body only, nosearchAction, as the package pages); no page ofaccount.trbwrites its own<html>skeleton, and no page has an inline<script>body,style=attribute or event handler.contentSecurityPolicybecomes the previous value plus exactlyscript-src 'self'; style-src 'self'; font-src 'self'; img-src 'self'(default-src 'none',form-action,frame-ancestors,base-uriunchanged);ceremonyPolicybecomes the previous value plusstyle-src 'self'; font-src 'self'; img-src 'self'(itsscript-src 'self'is already there);policyOf(provider origins inform-action) still derives from the constant and keeps its test.account.trbthat answers HTML, that the policy has nounsafe-inline/unsafe-eval, that every<scriptcarriessrc="/(none inline) and that the body has nostyle=and noon<event>=attribute.Cache-Control: no-store, escaping and CSRF checks are untouched.assets/registry.css(fromregistryStylesheet) gains the rules the account pages need (labelled field, text input, form row, list of identities/passkeys/tokens, tokens table in.table-wrap), tokens only, with a test incompiler/tests/site-registry.test.trbthat the stylesheet has them and no#literal outside what it has today.tools/registry/README.md(the policy sentence at line 73) and RELEASE.md 7.1/7.11 describe the new policy and that the account pages use the shell; BRAND.md slice 2 reads done (section 13 item 2 and the status paragraph at the top, "the account pages are #295" removed);docs/tooling/torb-docs-site.mdmentions the form rules;skills/regenerated if a doc it is built from changed.Seed impact. None: markup, CSS and a policy string in
.trbsource; no syntax change, no new native, no driver flag, no std name looked up by string; the two-commit rule does not apply.Size. One PR, two Conventional Commits:
feat(docs): the registry stylesheet's form rules(site-registry.trb + its test + torb-docs-site.md) andfeat(registry): the account pages in the brand shell(account.trb, tests, README, RELEASE.md, BRAND.md, skills). Closes #295. Deploying the registry stays outside the loop.next: ready
[loop:torbscript] claim implement by session:loop-torbscript-20261010 until 2026-10-10T16:52Z
[loop:torbscript] implement: PR #307 (head
c6d20d09, CI success, argus requested), est. tokens 120000, next: waiting (review by argus)