oficina / meet Public

Calls: the chrome is set in the system UI font

Pins estilo 260f98c, which drops Onest so the chrome can never flash; the
layout no longer links the v1 font stylesheet, and a test fails if any
served page links, preloads or declares a chrome webfont. Old v1 font
URLs still answer. Landed on local make ci (go1.26.5); the hub runner's go1.26.10 fails the credits test, on Paul's ruling. Reviewed by GPT-6-Astra via Codex (#30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from chore/estilo-system-font into main.
claude agent, operated by paul@keymail.dev 47afcb9c6ef8fa15eb1ee499348bcba6a51c28a4 parent 0803781
7 files changed, +102 −32
  • go.mod +1 −1
  • go.sum +2 −2
  • internal/calls/app.go +3 −1
  • internal/calls/static/theme.css +5 −3
  • internal/calls/templates/layout.html +0 −1
  • internal/callstest/fontlink_test.go +0 −24
  • internal/callstest/nowebfont_test.go +91 −0

CI failed — run details

diff --git a/go.mod b/go.mod
index 6f9dedd..182cd67 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module amadan.net/oficina/calls
go 1.26.0
require (
- amadan.net/oficina/estilo.git v0.0.0-20261024233714-f14458a4683c
+ amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d
amadan.net/oficina/home/connect v0.0.0-20261024233715-ff16bf56bc4d
amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d
amadan.net/rastrillo/rastrillo v0.27.1-0.20261006204347-fb806a287060
diff --git a/go.sum b/go.sum
index 9fbaefd..3b61db1 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-amadan.net/oficina/estilo.git v0.0.0-20261024233714-f14458a4683c h1:jPbFJwPi7lHe+UNe+Gbj0ivVsy+pLqMSq2EP2Xff/q0=
-amadan.net/oficina/estilo.git v0.0.0-20261024233714-f14458a4683c/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
+amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d h1:p9+01xRdBD7s1viTINgQ6XoDD5ghOxYubD7FNcjhBTw=
+amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
amadan.net/oficina/home/connect v0.0.0-20261024233715-ff16bf56bc4d h1:9sVZBph2xUuejZt73DYaoCfoyvrvZCnuPHcyMsg562E=
amadan.net/oficina/home/connect v0.0.0-20261024233715-ff16bf56bc4d/go.mod h1:ix81eFV87yE9f2SXiRuxYCVM4lAgTRC5YoQMiH3+TDk=
amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d h1:8RTZkLQnyxvH2g0RMovhN/m2LN9D8qb+kBfqdBeqq+s=
diff --git a/internal/calls/app.go b/internal/calls/app.go
index e3938f0..e96335f 100644
--- a/internal/calls/app.go
+++ b/internal/calls/app.go
@@ -596,7 +596,9 @@ func build(ctx context.Context, d *db.DB, cfg Config) (*http.ServeMux, *app, err
// The sky behind the sign-in door: estilo's closed set of public
// SVGs, sessionless, more specific than /static/ above.
mux.Handle("GET "+sky.Prefix, sky.Handler())
- // Onest, Calma's typeface, served by estilo under its versioned prefix.
+ // estilo's retired v1 Onest files, kept answering so a page cached
+ // before the chrome moved to the system face (estilo AGENTS.md row 9)
+ // still resolves its stylesheet. No page links them.
mux.Handle("GET "+theme.FontPrefix, theme.FontHandler())
// The app switcher's tile icons: estilo's suite brand marks, public
// and sessionless like the sky.
diff --git a/internal/calls/static/theme.css b/internal/calls/static/theme.css
index b38a101..2124830 100644
--- a/internal/calls/static/theme.css
+++ b/internal/calls/static/theme.css
@@ -36,9 +36,11 @@
:root {
color-scheme: light dark;
- /* Type: the family only. Sizes and spacing stay in tokens.css. Onest
- where it is served (fonts.go), the system face where it is not. */
- --rst-font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ /* Type: the family only. Sizes and spacing stay in tokens.css. The
+ system UI face, nothing downloaded: Paul, 2026-10-25 (AGENTS.md row
+ 9). A webfont cannot render in WebKit without a frame of invisible
+ text, and the chrome never flashes. TestChromeFontIsSystemUI. */
+ --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
/* Shape: soft and exact. */
--rst-radius: 12px;
diff --git a/internal/calls/templates/layout.html b/internal/calls/templates/layout.html
index b979309..aef8668 100644
--- a/internal/calls/templates/layout.html
+++ b/internal/calls/templates/layout.html
@@ -27,7 +27,6 @@
<link rel="icon" type="image/png" sizes="32x32" href="{{asset "static/brand/icon-32.png"}}">
<link rel="icon" type="image/svg+xml" href="{{asset "static/brand/icon.svg"}}">
<link rel="apple-touch-icon" sizes="180x180" href="{{asset "static/brand/apple-touch-icon.png"}}">
-<link rel="stylesheet" href="/static/estilo/fonts/v1/fonts.css">
<link rel="stylesheet" href="{{asset "static/tokens.css"}}">
<link rel="stylesheet" href="{{asset "static/busy.css"}}">
<link rel="stylesheet" href="{{asset "static/theme.css"}}">
diff --git a/internal/callstest/fontlink_test.go b/internal/callstest/fontlink_test.go
deleted file mode 100644
index 358bb10..0000000
--- a/internal/callstest/fontlink_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package callstest
-
-import (
- "bytes"
- "os"
- "path/filepath"
- "testing"
-
- "amadan.net/oficina/estilo.git/theme"
-)
-
-// The layout names Onest's stylesheet by a literal path; this keeps that
-// literal equal to estilo's versioned prefix, so an estilo font move
-// fails here rather than every page quietly falling back to the system
-// face.
-func TestLayoutLinksEstilosFonts(t *testing.T) {
- layout, err := os.ReadFile(filepath.Join("..", "calls", "templates", "layout.html"))
- if err != nil {
- t.Fatal(err)
- }
- if want := `href="` + theme.FontPrefix + `fonts.css"`; !bytes.Contains(layout, []byte(want)) {
- t.Errorf("layout.html does not link %s", want)
- }
-}
diff --git a/internal/callstest/nowebfont_test.go b/internal/callstest/nowebfont_test.go
new file mode 100644
index 0000000..d3b9d24
--- /dev/null
+++ b/internal/callstest/nowebfont_test.go
@@ -0,0 +1,91 @@
+package callstest
+
+import (
+ "io/fs"
+ "net/http"
+ "os"
+ "path"
+ "path/filepath"
+ "regexp"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/estilo.git/theme"
+)
+
+// The chrome is set in the system UI face and downloads no font, so it
+// can never flash (Paul, 2026-10-25: "There should never be a flash of
+// unstyled text. Ever." estilo AGENTS.md row 9). No page links or
+// preloads a webfont: not estilo's retired Onest, and no font file at
+// all. estilo's v1 files stay mounted (app.go) so a page cached before
+// this still resolves its stylesheet; nothing may name them.
+//
+// This replaces TestLayoutLinksEstilosFonts, which required the link.
+func TestNoPageLinksOrPreloadsAChromeWebfont(t *testing.T) {
+ // Every template, as source: whichever route renders a page, it is
+ // made of these.
+ pages := 0
+ root := filepath.Join("..", "calls", "templates")
+ err := filepath.WalkDir(root, func(p string, d fs.DirEntry, err error) error {
+ if err != nil || d.IsDir() || filepath.Ext(p) != ".html" {
+ return err
+ }
+ b, err := os.ReadFile(p)
+ if err != nil {
+ return err
+ }
+ pages++
+ for _, why := range chromeWebfonts(string(b)) {
+ t.Errorf("%s %s", p, why)
+ }
+ return nil
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+ if pages < 10 {
+ t.Fatalf("read only %d templates under %s; the scan would pass vacuously", pages, root)
+ }
+
+ // And as served, on the page every visitor meets first.
+ h := newApp(t)
+ rec := get(t, h, "/signin")
+ if rec.Code != http.StatusOK {
+ t.Fatalf("GET /signin = %d", rec.Code)
+ }
+ for _, why := range chromeWebfonts(rec.Body.String()) {
+ t.Errorf("GET /signin %s", why)
+ }
+
+ // The retired files still answer, for pages cached before the change.
+ for _, name := range []string{"fonts.css", "onest-latin.woff2"} {
+ if rec := get(t, h, theme.FontPrefix+name); rec.Code != http.StatusOK {
+ t.Errorf("GET %s%s = %d; keep estilo's font handler mounted for old pages", theme.FontPrefix, name, rec.Code)
+ }
+ }
+}
+
+var (
+ linkTag = regexp.MustCompile(`(?is)<link\b[^>]*>`)
+ asFont = regexp.MustCompile(`(?i)\bas\s*=\s*["']?font\b`)
+ fontFile = regexp.MustCompile(`(?i)\.(woff2?|ttf|otf|eot)\b`)
+)
+
+// chromeWebfonts names each way html would download a font for the
+// chrome: estilo's font path at any version, a <link> that preloads a
+// font or names a font file, or a face declared inline.
+func chromeWebfonts(html string) []string {
+ var found []string
+ if dir := path.Dir(strings.TrimSuffix(theme.FontPrefix, "/")) + "/"; strings.Contains(html, dir) {
+ found = append(found, "names estilo's webfont path "+dir)
+ }
+ for _, tag := range linkTag.FindAllString(html, -1) {
+ if asFont.MatchString(tag) || fontFile.MatchString(tag) {
+ found = append(found, "links or preloads a font: "+tag)
+ }
+ }
+ if strings.Contains(strings.ToLower(html), "@font-face") {
+ found = append(found, "declares a font face inline")
+ }
+ return found
+}