oficina / memoria Public

Memoria: the chrome is the system UI face, and links no webfont

Brings in estilo main 260f98c, which sets --rst-font to the system UI
stack and drops Onest: on Paul's ruling (2026-10-24/25) the chrome must
never flash, and no loading strategy got Onest into WebKit without a
frame of invisible text (estilo AGENTS.md row 9).

- Pin estilo at 260f98c.
- Re-run scripts/writeestilo: static/theme.css gains the new --rst-font.
- The layout no longer links /static/estilo/fonts/v1/fonts.css.
- estilo's font handler stays mounted, so a page cached before this still
  resolves its stylesheet (and credits keep listing Onest while the file
  is served).
- TestNoPageLinksOrPreloadsAChromeWebfont replaces the test that required
  the link: every template, and the sign-in page as served, may not name
  estilo's font path, preload a font or link a font file, and v1's two
  files must still answer. It failed on the old layout before the link
  went.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a37e80888df03fa004be7264bd83f5c7582c6942 parent dfc76e3
6 files changed, +104 −10
  • go.mod +1 −1
  • go.sum +2 −2
  • internal/memoria/app.go +5 −3
  • internal/memoria/static/theme.css +5 −3
  • internal/memoria/templates/layout.html +0 −1
  • internal/memoriatest/nowebfont_test.go +91 −0

CI passed — run details

diff --git a/go.mod b/go.mod
index df95244..1ecbdae 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.26
toolchain go1.26.5
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/oficina/suite v0.0.0-20260905215529-60b01a8a0d6d
diff --git a/go.sum b/go.sum
index 393e0a1..3a7eac9 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/memoria/app.go b/internal/memoria/app.go
index 1ee90ca..43d20b4 100644
--- a/internal/memoria/app.go
+++ b/internal/memoria/app.go
@@ -184,9 +184,11 @@ func App(d *db.DB, origin string, sealer *seal.Sealer, logger *slog.Logger) (*ht
mux := http.NewServeMux()
mux.HandleFunc("GET /static/credits.css", serveCreditsCSS)
mux.Handle("GET /static/", assets.Handler())
- // Onest, Calma's typeface, served by estilo under its versioned
- // prefix. A literal, so the route gate can read it;
- // TestFontRouteIsEstilosPrefix keeps it equal to theme.FontPrefix.
+ // 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. A literal, so the
+ // route gate can read it; TestFontRouteIsEstilosPrefix keeps it equal
+ // to theme.FontPrefix.
mux.Handle("GET /static/estilo/fonts/v1/", theme.FontHandler())
// The sign-in door's sky (estilo sky), under its versioned prefix:
// public artwork, served before any session gate like the font. A
diff --git a/internal/memoria/static/theme.css b/internal/memoria/static/theme.css
index 97d613b..7df91c0 100644
--- a/internal/memoria/static/theme.css
+++ b/internal/memoria/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/memoria/templates/layout.html b/internal/memoria/templates/layout.html
index d4b6e0e..2a6a475 100644
--- a/internal/memoria/templates/layout.html
+++ b/internal/memoria/templates/layout.html
@@ -30,7 +30,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"}}">
{{/* theme.css carries the palette. tokens.css only USES --rst-bg and
diff --git a/internal/memoriatest/nowebfont_test.go b/internal/memoriatest/nowebfont_test.go
new file mode 100644
index 0000000..0a89b7b
--- /dev/null
+++ b/internal/memoriatest/nowebfont_test.go
@@ -0,0 +1,91 @@
+package memoriatest
+
+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.
+//
+// The layout linked v1's fonts.css until this test went in.
+func TestNoPageLinksOrPreloadsAChromeWebfont(t *testing.T) {
+ // Every template, as source: whichever route renders a page, it is
+ // made of these.
+ pages := 0
+ root := filepath.Join("..", "memoria", "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, _ := signinApp(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
+}