rastrillo v0.45.0 (Fiesta 1.6.1) and estilo 6238a47
tokens.css by rastrillo doctor --fix, brand.css by estilo's brand/distribute.py (native icons left as they were), the credits by make credits. Config.KeymailServers (nil in production) lets the tests name keymailtest's host: v0.45 dials a nil list on a clone of http.DefaultTransport, which panics on keymailtest's wrapper. The door tests pin rastrillo's new words, which never name Keymail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 files changed,
+143
−20
go.mod+8 −4go.sum+8 −0internal/calls/auth.go+7 −6internal/calls/config.go+7 −0internal/calls/config_test.go+3 −0internal/calls/credits/notices.json+2 −2internal/calls/signin_browser_test.go+1 −1internal/calls/signin_door_states_test.go+2 −1internal/calls/signin_mail_test.go+6 −1internal/calls/static/brand/brand.css+1 −1internal/calls/static/tokens.css+84 −0internal/callstest/browser_test.go+1 −0internal/callstest/config_test.go+3 −2internal/callstest/harness_test.go+1 −0internal/callstest/main_test.go+7 −0internal/callstest/schema_test.go+1 −1internal/callstest/signin_test.go+1 −1
Intent
diff --git a/go.mod b/go.mod| index 05d411a..c112358 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -4,12 +4,12 @@ go 1.26.0 |
| require ( |
| amadan.net/oficina/agent-access.git v0.0.0-20261025011012-4b94ff9e8a8d |
| - amadan.net/oficina/estilo.git v0.0.0-20261121233240-468fab16e803 |
| + amadan.net/oficina/estilo.git v0.0.0-20261122204240-6238a478888e |
| amadan.net/oficina/home/connect v0.0.0-20261122114341-150d94e2370f |
| amadan.net/oficina/home/handoff v0.0.0-20261122114341-150d94e2370f |
| amadan.net/oficina/home/roster v0.0.0-20261028171508-67c12e39a9d2 |
| amadan.net/oficina/home/teammode v0.0.0-20261028171508-67c12e39a9d2 |
| - amadan.net/rastrillo/rastrillo v0.42.0 |
| + amadan.net/rastrillo/rastrillo v0.45.0 |
| github.com/go-chi/chi/v5 v5.3.2 |
| github.com/go-json-experiment/json v0.0.0-20260820222146-c27c302e5fc3 |
| github.com/google/uuid v1.6.0 |
| @@ -19,7 +19,7 @@ require ( |
| ) |
| require ( |
| - amadan.net/rastrillo/fiesta v1.5.0 // indirect |
| + amadan.net/rastrillo/fiesta v1.6.1 // indirect |
| amadan.net/rastrillo/rastrillo/money v0.1.0 // indirect |
| github.com/BurntSushi/toml v1.6.0 // indirect |
| github.com/carlosframework/rastrillo v0.23.0 // indirect |
| @@ -38,6 +38,7 @@ require ( |
| github.com/tdewolff/parse/v2 v2.8.16 // indirect |
| github.com/yosida95/uritemplate/v3 v3.0.2 // indirect |
| golang.org/x/mod v0.38.0 // indirect |
| + golang.org/x/net v0.58.0 // indirect |
| golang.org/x/oauth2 v0.35.0 // indirect |
| golang.org/x/sync v0.22.0 // indirect |
| golang.org/x/sys v0.47.0 // indirect |
| @@ -51,4 +52,7 @@ require ( |
| modernc.org/sqlite v1.55.0 // indirect |
| ) |
| -tool amadan.net/rastrillo/rastrillo/cmd/rastrillo |
| +tool ( |
| + amadan.net/rastrillo/fiesta/cmd/fiesta |
| + amadan.net/rastrillo/rastrillo/cmd/rastrillo |
| +) |
diff --git a/go.sum b/go.sum| index 3d63a2d..64d94a2 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -2,6 +2,8 @@ amadan.net/oficina/agent-access.git v0.0.0-20261025011012-4b94ff9e8a8d h1:bSsf1N |
| amadan.net/oficina/agent-access.git v0.0.0-20261025011012-4b94ff9e8a8d/go.mod h1:Ph9PIa3VE1IEaUzZiQH6D+IQ6HThWWGfVr0ecMMgrFA= |
| amadan.net/oficina/estilo.git v0.0.0-20261121233240-468fab16e803 h1:yl1LyYZW3/722xRPnXMu5veg4sZGjyDMJFLqOWST0ws= |
| amadan.net/oficina/estilo.git v0.0.0-20261121233240-468fab16e803/go.mod h1:2UFIFrbTrhew8EFM0C94WmTo2OASM2pHEgT4jzeE/s8= |
| +amadan.net/oficina/estilo.git v0.0.0-20261122204240-6238a478888e h1:g2EvXlQAleAEFsc4yIBvS7ycMG3GyuEySEOia0yo8nY= |
| +amadan.net/oficina/estilo.git v0.0.0-20261122204240-6238a478888e/go.mod h1:2UFIFrbTrhew8EFM0C94WmTo2OASM2pHEgT4jzeE/s8= |
| amadan.net/oficina/home/connect v0.0.0-20261122114341-150d94e2370f h1:gnH04Aq06V9RVdv2OSdg+MqluUzsXZcnzSC+fUZ8gxg= |
| amadan.net/oficina/home/connect v0.0.0-20261122114341-150d94e2370f/go.mod h1:B45bHBZF5AtFJqy4d1qSDNDOqYcNkSz1qD20TLF1DI8= |
| amadan.net/oficina/home/handoff v0.0.0-20261122114341-150d94e2370f h1:KVdTBLD+GWe9WJLpxmkOAHOKAHKMNd6yuC+cIRzEg+w= |
| @@ -12,8 +14,12 @@ amadan.net/oficina/home/teammode v0.0.0-20261028171508-67c12e39a9d2 h1:0PQiRUkC+ |
| amadan.net/oficina/home/teammode v0.0.0-20261028171508-67c12e39a9d2/go.mod h1:dXBZeB2ic33SIZiGUCzafmviUT8TYWgzSYZvo2rM6zA= |
| amadan.net/rastrillo/fiesta v1.5.0 h1:wKfTsL5zRMofJBAqOxNlCY7aCtgHCtfwvTPBMA+ZA20= |
| amadan.net/rastrillo/fiesta v1.5.0/go.mod h1:LpO391W1dIRUxOIKklHm+bGyWXtlFyBRRPQCysb9LjY= |
| +amadan.net/rastrillo/fiesta v1.6.1 h1:WYgHt652+uQj6eR0Y0JLin+XrdRPGk1WPW7o0lSrc94= |
| +amadan.net/rastrillo/fiesta v1.6.1/go.mod h1:LpO391W1dIRUxOIKklHm+bGyWXtlFyBRRPQCysb9LjY= |
| amadan.net/rastrillo/rastrillo v0.42.0 h1:RJ0ecpdb2kMqwW9216bBpUqzpboxLYKb/51wq/+ceyo= |
| amadan.net/rastrillo/rastrillo v0.42.0/go.mod h1:0bufVMz8D4aWvxvJjehW70T8Jsvytrp1YEwoIzFTKm8= |
| +amadan.net/rastrillo/rastrillo v0.45.0 h1:zJfxetxg/H/CkCBFIvdGQbiATQ0hV3JR7H82AMk4bmM= |
| +amadan.net/rastrillo/rastrillo v0.45.0/go.mod h1:Vk7QL+RePyKtcP+7XclR9hpSDp/CjrVo37TENKifaFY= |
| amadan.net/rastrillo/rastrillo/money v0.1.0 h1:MxU4oqNrW8abxRTkgZBv24OYNpFnvonajNqeLIzmmaM= |
| amadan.net/rastrillo/rastrillo/money v0.1.0/go.mod h1:cmgkjBEIQh1pFSYvQk0UU6oPYS8kSDypdT9+t4Flx0U= |
| github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= |
| @@ -82,6 +88,8 @@ golang.org/x/crypto v0.56.0 h1:GUh5Ii4J5jtcseSMiRqr1jXCNHoxjeV9Fmekc2oLy6Y= |
| golang.org/x/crypto v0.56.0/go.mod h1:OMW5y6CY9l38uPLmxU6l6pwcXp1obtLo3e6gT7gQR2I= |
| golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk= |
| golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40= |
| +golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= |
| +golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= |
| golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ= |
| golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= |
| golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= |
diff --git a/internal/calls/auth.go b/internal/calls/auth.go| index e1d4b45..471eadd 100644 |
| --- a/internal/calls/auth.go |
| +++ b/internal/calls/auth.go |
| @@ -57,12 +57,13 @@ func (a *app) newAuthPlugin(writer *sql.DB) (*rauth.Auth, error) { |
| // link and Forget lands on /signin, which with Home configured is |
| // connect's SigninDoor, offering Continue with Oficina ID |
| // (home/connect MIGRATING.md, item 3). |
| - SigninScreen: true, |
| - SigninOneWay: true, |
| - SigninPath: signinPath, |
| - ForgetPath: signinForgetPath, |
| - SignedInPath: landing, |
| - Logger: a.logger, |
| + SigninScreen: true, |
| + SigninOneWay: true, |
| + SigninPath: signinPath, |
| + ForgetPath: signinForgetPath, |
| + SignedInPath: landing, |
| + Logger: a.logger, |
| + KeymailServers: a.cfg.KeymailServers, |
| }) |
| } |
diff --git a/internal/calls/config.go b/internal/calls/config.go| index 84d8a5b..6bc0d2e 100644 |
| --- a/internal/calls/config.go |
| +++ b/internal/calls/config.go |
| @@ -106,6 +106,13 @@ type Config struct { |
| // `carlos logs --field` reads fields only from JSON lines. Nil is |
| // Logger. |
| ReportLogger *slog.Logger |
| + // KeymailServers is rastrillo/auth's Config.KeymailServers. Nil, as |
| + // cmd/calls leaves it, is any server an address's own _keymail |
| + // delegation names, which rastrillo (v0.45) dials at public addresses |
| + // only, on a transport of its own. Tests name their in-process fake's |
| + // host here (keymailtest), the one way a probe still goes through the |
| + // test's transport; an empty list is no Keymail at all. |
| + KeymailServers []string |
| } |
| func (cfg Config) development() bool { return cfg.Env == EnvDevelopment } |
diff --git a/internal/calls/config_test.go b/internal/calls/config_test.go| index 4e7e848..d463ffd 100644 |
| --- a/internal/calls/config_test.go |
| +++ b/internal/calls/config_test.go |
| @@ -21,6 +21,9 @@ func minimalConfig(t *testing.T) Config { |
| DEK: base64.StdEncoding.EncodeToString(make([]byte, 32)), |
| Mailer: failingSender{}, |
| AllowedAddresses: []string{"paul@example.com"}, |
| + // The fake's host, as buildForTest names it: rastrillo v0.45 |
| + // dials a nil list on a transport keymailtest cannot stand under. |
| + KeymailServers: []string{keymailHost}, |
| } |
| } |
diff --git a/internal/calls/credits/notices.json b/internal/calls/credits/notices.json| index fc779c8..917f381 100644 |
| --- a/internal/calls/credits/notices.json |
| +++ b/internal/calls/credits/notices.json |
| @@ -35,7 +35,7 @@ |
| }, |
| { |
| "Name": "amadan.net/rastrillo/fiesta", |
| - "Version": "v1.5.0", |
| + "Version": "v1.6.1", |
| "SourceURL": "https://amadan.net/rastrillo/fiesta", |
| "Notices": [ |
| { |
| @@ -46,7 +46,7 @@ |
| }, |
| { |
| "Name": "amadan.net/rastrillo/rastrillo", |
| - "Version": "v0.42.0", |
| + "Version": "v0.45.0", |
| "SourceURL": "https://amadan.net/rastrillo/rastrillo", |
| "Notices": [ |
| { |
diff --git a/internal/calls/signin_browser_test.go b/internal/calls/signin_browser_test.go| index c4e1b64..f7840d6 100644 |
| --- a/internal/calls/signin_browser_test.go |
| +++ b/internal/calls/signin_browser_test.go |
| @@ -71,7 +71,7 @@ func TestSmartDoorInABrowser(t *testing.T) { |
| {Name: "first visit", Path: "/signin", Glyph: true, want: "Continue with Oficina ID"}, |
| {Name: "Oficina ID remembered", Path: "/signin", Glyph: true, jar: jarFor(oficina), want: "Continue with Oficina ID"}, |
| {Name: "a long remembered email", Path: "/signin", jar: jarFor(&lastsignin.Record{Method: lastsignin.MethodMagicLink, Address: long}), want: "Continue as"}, |
| - {Name: "a long remembered Keymail", Path: "/signin", jar: jarFor(&lastsignin.Record{Method: lastsignin.MethodKeymail, Address: long}), want: "Continue to Keymail"}, |
| + {Name: "a long remembered Keymail", Path: "/signin", jar: jarFor(&lastsignin.Record{Method: lastsignin.MethodKeymail, Address: long}), want: "Continue as"}, |
| {Name: "the chooser", Path: "/signin?ways=1", jar: jarFor(&lastsignin.Record{Method: lastsignin.MethodMagicLink, Address: long}), want: "Other ways to sign in"}, |
| {Name: "the email way", Path: "/signin?way=email", want: "Email"}, |
| {Name: "email only", Path: "/signin/local", want: "Email"}, |
diff --git a/internal/calls/signin_door_states_test.go b/internal/calls/signin_door_states_test.go| index 9672326..c5c9ec2 100644 |
| --- a/internal/calls/signin_door_states_test.go |
| +++ b/internal/calls/signin_door_states_test.go |
| @@ -37,7 +37,8 @@ func TestDoorStatesWithHome(t *testing.T) { |
| {"a problem", "/signin?err=expired", email, "Problem signing in to Calls", []string{"That link has expired or was already used.", emailField}, []string{oficinaButton}}, |
| {"rate", "/signin?err=rate", nil, "Problem signing in to Calls", []string{"Too many tries."}, nil}, |
| {"a bad address", "/signin?err=address", nil, "Problem signing in to Calls", []string{"That doesn't look like an email address."}, nil}, |
| - {"Keymail failed", "/signin?force=1&err=keymail", nil, "Problem signing in to Calls", []string{`name="force" value="1"`, "Keymail couldn't confirm it's you."}, nil}, |
| + // rastrillo's own words since v0.45.0, which never name Keymail. |
| + {"Keymail failed", "/signin?force=1&err=keymail", nil, "Problem signing in to Calls", []string{`name="force" value="1"`, "We couldn't confirm it's you."}, []string{"Keymail"}}, |
| {"sent", "/signin?sent=1", email, "Check your email to sign in to Calls", []string{"Check your email", "Use a different email"}, []string{oficinaButton, emailField}}, |
| } { |
| t.Run(c.name, func(t *testing.T) { |
diff --git a/internal/calls/signin_mail_test.go b/internal/calls/signin_mail_test.go| index 999a8ad..2ed3aa9 100644 |
| --- a/internal/calls/signin_mail_test.go |
| +++ b/internal/calls/signin_mail_test.go |
| @@ -325,6 +325,11 @@ func TestMailQueueCloseIsBoundedWithAStalledLogger(t *testing.T) { |
| // build), so whoever builds an app closes its queue. |
| func buildForTest(t *testing.T, d *db.DB, cfg Config) (*http.ServeMux, *app, error) { |
| t.Helper() |
| + if cfg.KeymailServers == nil { |
| + // rastrillo v0.45 dials a nil list's servers on a transport of |
| + // its own, which keymailtest's cannot stand under: name the fake. |
| + cfg.KeymailServers = []string{keymailHost} |
| + } |
| mux, a, err := build(t.Context(), d, cfg) |
| if err == nil { |
| t.Cleanup(a.signinMail.close) |
| @@ -347,7 +352,7 @@ func TestShutdownStopsTheMailWorker(t *testing.T) { |
| } |
| t.Cleanup(func() { d.Close() }) |
| ctx, cancel := context.WithCancel(context.Background()) |
| - _, a, err := build(ctx, d, Config{Env: EnvDevelopment, Origin: "http://app.test", Logger: logger}) |
| + _, a, err := build(ctx, d, Config{Env: EnvDevelopment, Origin: "http://app.test", Logger: logger, KeymailServers: []string{keymailHost}}) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/calls/static/brand/brand.css b/internal/calls/static/brand/brand.css| index 27e25ad..475fb08 100644 |
| --- a/internal/calls/static/brand/brand.css |
| +++ b/internal/calls/static/brand/brand.css |
| @@ -3,7 +3,7 @@ |
| [estilo-brand] { |
| display: inline-flex; |
| align-items: center; |
| - gap: .5rem; |
| + gap: var(--rst-sp-2); |
| min-block-size: 24px; |
| } |
| [estilo-brand-icon] { |
diff --git a/internal/calls/static/tokens.css b/internal/calls/static/tokens.css| index 3ae9664..07f8b10 100644 |
| --- a/internal/calls/static/tokens.css |
| +++ b/internal/calls/static/tokens.css |
| @@ -2476,6 +2476,90 @@ small.rst-field__hint, small[rst-field-hint] { display: block; font-size: var(-- |
| and every caller writes by hand, is rst-form-bar now. */ |
| .rst-form-foot, [rst-form-foot] { display: flex; gap: var(--rst-sp-3); margin-block-start: var(--rst-sp-3); } |
| +/* ── stack: a page's vertical rhythm ────────────────────────────────── |
| + The blocks a screen is written in, a heading, a paragraph, a hint, a |
| + card, a row of buttons, are spaced by the stack they sit in and by |
| + nothing else. Hand-rolled margins gave every screen its own rhythm: |
| + a heading further from its own text than from the section before |
| + it, a hint resting on the button under it. So a stack is a flex |
| + column, where no margin collapses, every child's own block margins |
| + are zeroed, and the space before each child is read off one table |
| + by what it is and what it follows (DESIGN.md, "Spacing"): |
| + |
| + after a heading (h1 to h6) --rst-sp-2 |
| + before an actions row, a button --rst-sp-4 |
| + a label or hint, then its input, or an |
| + input, then its hint --rst-sp-2 |
| + before h1, h2 or a section, or after |
| + the page header --rst-sp-5 |
| + before h3 to h6 --rst-sp-4 |
| + anything else --rst-sp-3 |
| + |
| + Higher in the table wins. Each relation sets its own custom property |
| + on the child, and the one margin rule reads them in the table's |
| + order through var() fallbacks, so which rule wins is written in one |
| + place rather than left to specificity. Every child resets all five |
| + first, so a nested stack's child never inherits its parent's answer. |
| + rst-section marks a child that opens a new section; a section that |
| + holds blocks of its own is a stack too, <section rst-stack |
| + rst-section>. |
| + |
| + The column's gap is the table's smallest step, --rst-sp-2, and a |
| + child's block-start margin is the rest of its answer. The gap is |
| + the floor: it falls only between children that are drawn, so a |
| + [hidden] child, which a sibling selector cannot see past, costs the |
| + block after it its relation but never leaves it touching. A hidden |
| + input, a form's CSRF field, is passed over the same way, so the |
| + first block after one still opens the stack flush. */ |
| +.rst-stack, [rst-stack] { display: flex; flex-direction: column; gap: var(--rst-sp-2); } |
| +.rst-stack > :not([hidden]), [rst-stack] > :not([hidden]) { |
| + --rst-stack-actions: initial; |
| + --rst-stack-heading: initial; |
| + --rst-stack-control: initial; |
| + --rst-stack-section: initial; |
| + --rst-stack-sub: initial; |
| + margin-block: 0; |
| +} |
| +.rst-stack > :not([hidden], [type="hidden"]) + :not([hidden]), [rst-stack] > :not([hidden], [type="hidden"]) + :not([hidden]) { |
| + margin-block-start: calc(var(--rst-stack-heading, var(--rst-stack-actions, var(--rst-stack-control, var(--rst-stack-section, var(--rst-stack-sub, var(--rst-sp-3)))))) - var(--rst-sp-2)); |
| +} |
| +/* A column stretches its children across; a button or a picture keeps |
| + its own width. */ |
| +.rst-stack > button, [rst-stack] > button, .rst-stack > .rst-btn, [rst-stack] > [rst-btn], .rst-stack > img, [rst-stack] > img { align-self: flex-start; } |
| +.rst-stack > :not([hidden], [type="hidden"]) + h3, [rst-stack] > :not([hidden], [type="hidden"]) + h3, |
| +.rst-stack > :not([hidden], [type="hidden"]) + h4, [rst-stack] > :not([hidden], [type="hidden"]) + h4, |
| +.rst-stack > :not([hidden], [type="hidden"]) + h5, [rst-stack] > :not([hidden], [type="hidden"]) + h5, |
| +.rst-stack > :not([hidden], [type="hidden"]) + h6, [rst-stack] > :not([hidden], [type="hidden"]) + h6 { --rst-stack-sub: var(--rst-sp-4); } |
| +.rst-stack > :not([hidden], [type="hidden"]) + h1, [rst-stack] > :not([hidden], [type="hidden"]) + h1, |
| +.rst-stack > :not([hidden], [type="hidden"]) + h2, [rst-stack] > :not([hidden], [type="hidden"]) + h2, |
| +.rst-stack > :not([hidden], [type="hidden"]) + .rst-section, [rst-stack] > :not([hidden], [type="hidden"]) + [rst-section], |
| +.rst-stack > .rst-page-header + :not([hidden]), [rst-stack] > [rst-page-header] + :not([hidden]) { --rst-stack-section: var(--rst-sp-5); } |
| +.rst-stack > label + input:not([hidden]), [rst-stack] > label + input:not([hidden]), |
| +.rst-stack > label + select:not([hidden]), [rst-stack] > label + select:not([hidden]), |
| +.rst-stack > label + textarea:not([hidden]), [rst-stack] > label + textarea:not([hidden]), |
| +.rst-stack > .rst-field__help + input:not([hidden]), [rst-stack] > [rst-field-help] + input:not([hidden]), |
| +.rst-stack > .rst-field__help + select:not([hidden]), [rst-stack] > [rst-field-help] + select:not([hidden]), |
| +.rst-stack > .rst-field__help + textarea:not([hidden]), [rst-stack] > [rst-field-help] + textarea:not([hidden]), |
| +.rst-stack > input + .rst-field__help, [rst-stack] > input + [rst-field-help], |
| +.rst-stack > select + .rst-field__help, [rst-stack] > select + [rst-field-help], |
| +.rst-stack > textarea + .rst-field__help, [rst-stack] > textarea + [rst-field-help] { --rst-stack-control: var(--rst-sp-2); } |
| +.rst-stack > h1 + :not([hidden]), [rst-stack] > h1 + :not([hidden]), |
| +.rst-stack > h2 + :not([hidden]), [rst-stack] > h2 + :not([hidden]), |
| +.rst-stack > h3 + :not([hidden]), [rst-stack] > h3 + :not([hidden]), |
| +.rst-stack > h4 + :not([hidden]), [rst-stack] > h4 + :not([hidden]), |
| +.rst-stack > h5 + :not([hidden]), [rst-stack] > h5 + :not([hidden]), |
| +.rst-stack > h6 + :not([hidden]), [rst-stack] > h6 + :not([hidden]) { --rst-stack-heading: var(--rst-sp-2); } |
| +.rst-stack > :not([hidden], [type="hidden"]) + .rst-actions, [rst-stack] > :not([hidden], [type="hidden"]) + [rst-actions], |
| +.rst-stack > :not([hidden], [type="hidden"]) + .rst-form-foot, [rst-stack] > :not([hidden], [type="hidden"]) + [rst-form-foot], |
| +.rst-stack > :not([hidden], [type="hidden"]) + .rst-form-actions, [rst-stack] > :not([hidden], [type="hidden"]) + [rst-form-actions], |
| +.rst-stack > :not([hidden], [type="hidden"]) + button, [rst-stack] > :not([hidden], [type="hidden"]) + button, |
| +.rst-stack > :not([hidden], [type="hidden"]) + .rst-btn, [rst-stack] > :not([hidden], [type="hidden"]) + [rst-btn] { --rst-stack-actions: var(--rst-sp-4); } |
| +/* The actions row: buttons, links styled as buttons, and the one-button |
| + forms a POST action needs, side by side and wrapping on a phone. A |
| + form stays a box (display: contents would make it one no driver can |
| + see), and a one-button form is as wide as its button. */ |
| +.rst-actions, [rst-actions] { align-items: center; display: flex; flex-wrap: wrap; gap: var(--rst-sp-2); } |
| + |
| @media (prefers-reduced-motion: reduce) { |
| .rst-switch__track, [rst-switch-track], .rst-switch[data-rst-settle] .rst-switch__track, [rst-switch][data-rst-settle] [rst-switch-track], .rst-tblock > .rst-tblock__head[data-rst-settle] > .rst-switch__track, [rst-tblock] > [rst-tblock-head][data-rst-settle] > [rst-switch-track] { transition: none; } |
| } |
diff --git a/internal/callstest/browser_test.go b/internal/callstest/browser_test.go| index 7fa4a8d..041a27e 100644 |
| --- a/internal/callstest/browser_test.go |
| +++ b/internal/callstest/browser_test.go |
| @@ -424,6 +424,7 @@ func (rig *browserRig) serve(t *testing.T, ln net.Listener) { |
| Mailer: rig.mail, |
| Logger: slog.New(slog.NewTextHandler(io.Discard, nil)), |
| ReportLogger: slog.New(slog.NewJSONHandler(&rig.reports, nil)), |
| + KeymailServers: noKeymail, |
| }) |
| if err != nil { |
| t.Fatalf("calls.NewForTest: %v", err) |
diff --git a/internal/callstest/config_test.go b/internal/callstest/config_test.go| index 98828e1..d537c77 100644 |
| --- a/internal/callstest/config_test.go |
| +++ b/internal/callstest/config_test.go |
| @@ -47,6 +47,7 @@ func TestProductionRefusesToStartWithoutSecrets(t *testing.T) { |
| "no allowlist": {Env: "production", Origin: "https://x.test", InstanceKey: "k", DEK: validDEK, Mailer: nopMailer{}}, |
| } |
| for name, cfg := range cases { |
| + cfg.KeymailServers = noKeymail |
| if _, rt, err := calls.App(testCtx(t), openDB(t), cfg); err == nil { |
| rt.Close() |
| t.Errorf("%s: production started without it", name) |
| @@ -55,7 +56,7 @@ func TestProductionRefusesToStartWithoutSecrets(t *testing.T) { |
| } |
| func TestDevelopmentStartsWithNothing(t *testing.T) { |
| - _, rt, err := calls.App(testCtx(t), openDB(t), calls.Config{Env: calls.EnvDevelopment}) |
| + _, rt, err := calls.App(testCtx(t), openDB(t), calls.Config{Env: calls.EnvDevelopment, KeymailServers: noKeymail}) |
| if err != nil { |
| t.Fatalf("development refused: %v", err) |
| } |
| @@ -63,7 +64,7 @@ func TestDevelopmentStartsWithNothing(t *testing.T) { |
| } |
| func TestBadDEKIsRefusedEvenInDevelopment(t *testing.T) { |
| - _, rt, err := calls.App(testCtx(t), openDB(t), calls.Config{Env: calls.EnvDevelopment, DEK: "not base64!"}) |
| + _, rt, err := calls.App(testCtx(t), openDB(t), calls.Config{Env: calls.EnvDevelopment, DEK: "not base64!", KeymailServers: noKeymail}) |
| if err == nil { |
| rt.Close() |
| } |
diff --git a/internal/callstest/harness_test.go b/internal/callstest/harness_test.go| index f4accd8..7fef40a 100644 |
| --- a/internal/callstest/harness_test.go |
| +++ b/internal/callstest/harness_test.go |
| @@ -259,6 +259,7 @@ func newHarnessWith(t *testing.T, env string, logger *slog.Logger, adjust func(* |
| rec := &recordingMailer{} |
| cfg := calls.Config{ |
| Env: env, Origin: testOrigin, AllowedAddresses: members, Mailer: rec, Logger: logger, |
| + KeymailServers: noKeymail, |
| } |
| if env != calls.EnvDevelopment { |
| cfg.InstanceKey = "test-instance-key-not-a-real-secret" |
diff --git a/internal/callstest/main_test.go b/internal/callstest/main_test.go| index 8abb9fc..5f0366e 100644 |
| --- a/internal/callstest/main_test.go |
| +++ b/internal/callstest/main_test.go |
| @@ -40,6 +40,13 @@ func TestMain(m *testing.M) { |
| os.Exit(code) |
| } |
| +// noKeymail is every test app's KeymailServers: none, so every address |
| +// is plain email without a lookup, as the NXDOMAIN resolver above makes |
| +// it anyway. Production leaves the list nil, and rastrillo (v0.45) dials |
| +// a nil list's servers on a transport of its own, a clone of |
| +// http.DefaultTransport that panics on keymailtest's wrapper. |
| +var noKeymail = []string{} |
| + |
| // mailWorkers counts goroutines running a sign-in mail queue's worker |
| // or log pump (internal/calls/signin_mail.go). |
| func mailWorkers() int { |
diff --git a/internal/callstest/schema_test.go b/internal/callstest/schema_test.go| index 5cb4bd1..64e7935 100644 |
| --- a/internal/callstest/schema_test.go |
| +++ b/internal/callstest/schema_test.go |
| @@ -8,7 +8,7 @@ import ( |
| func TestBootCreatesEveryTable(t *testing.T) { |
| d := openDB(t) |
| - _, rt, err := calls.App(testCtx(t), d, calls.Config{Env: calls.EnvDevelopment}) |
| + _, rt, err := calls.App(testCtx(t), d, calls.Config{Env: calls.EnvDevelopment, KeymailServers: noKeymail}) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/callstest/signin_test.go b/internal/callstest/signin_test.go| index e89f790..1fa65ca 100644 |
| --- a/internal/callstest/signin_test.go |
| +++ b/internal/callstest/signin_test.go |
| @@ -91,7 +91,7 @@ func TestSigninOverAFailingMailerLeavesNoAddressInTheLog(t *testing.T) { |
| failing := &failingMailer{err: fmt.Errorf("rastrillo/mail: send to %s: %w", address, errFakeSMTPFailure)} |
| mux, rt, err := calls.App(testCtx(t), d, calls.Config{ |
| Env: calls.EnvDevelopment, Origin: testOrigin, AllowedAddresses: []string{address}, |
| - Mailer: failing, Logger: logger, |
| + Mailer: failing, Logger: logger, KeymailServers: noKeymail, |
| }) |
| if err != nil { |
| t.Fatal(err) |