oficina / slides Public

Slides: 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 eafb0151a0e5b86e5d76bb16be105dacea59aaf7 parent e53c44d
7 files changed, +102 −32
  • go.mod +1 −1
  • go.sum +2 −2
  • internal/slides/app.go +3 −1
  • internal/slides/static/theme.css +5 −3
  • internal/slides/templates/layout.html +0 −1
  • internal/slidestest/fontlink_test.go +0 −24
  • internal/slidestest/nowebfont_test.go +91 −0

CI passed — run details

diff --git a/go.mod b/go.mod
index e34d496..2cdc88e 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.25.0
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/dashboard v0.0.0-20261024234842-3774eb68f816
amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d
diff --git a/go.sum b/go.sum
index 0268aa1..b21af90 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/dashboard v0.0.0-20261024234842-3774eb68f816 h1:AFDuOio0MxNxN9ZWVc3lul1QHkNjNUCO56kXpe/Fw3I=
diff --git a/internal/slides/app.go b/internal/slides/app.go
index fd303bd..5a19c96 100644
--- a/internal/slides/app.go
+++ b/internal/slides/app.go
@@ -243,7 +243,9 @@ func New(d *db.DB, cfg Config) (*http.ServeMux, *app, error) {
// The suite's app icons (the bar's brand, the switcher's tiles),
// served from estilo rather than vendored.
mux.Handle("GET "+brand.Prefix, brand.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 sky behind the sign-in door: a closed set of SVGs, public.
mux.Handle("GET "+sky.Prefix, sky.Handler())
diff --git a/internal/slides/static/theme.css b/internal/slides/static/theme.css
index 8ba18fc..1f12b27 100644
--- a/internal/slides/static/theme.css
+++ b/internal/slides/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/slides/templates/layout.html b/internal/slides/templates/layout.html
index 8d94da1..f4b6c5e 100644
--- a/internal/slides/templates/layout.html
+++ b/internal/slides/templates/layout.html
@@ -36,7 +36,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/slidestest/fontlink_test.go b/internal/slidestest/fontlink_test.go
deleted file mode 100644
index 633db53..0000000
--- a/internal/slidestest/fontlink_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package slidestest
-
-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("..", "slides", "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/slidestest/nowebfont_test.go b/internal/slidestest/nowebfont_test.go
new file mode 100644
index 0000000..0e783e2
--- /dev/null
+++ b/internal/slidestest/nowebfont_test.go
@@ -0,0 +1,91 @@
+package slidestest
+
+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("..", "slides", "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
+}