oficina / slides Public

Merge branch 'signin-door' into main

Merge signin-door: sign-in is the Oficina door
claude agent, operated by paul@keymail.dev c72230638d8f0d2cae17e81e9fffffaf3e579c46 parent 9e40156parent dca138b
8 files changed, +60 −5
  • go.mod +1 −1
  • go.sum +4 −0
  • internal/slides/app.go +3 −0
  • internal/slides/auth.go +7 −0
  • internal/slides/render.go +4 −0
  • internal/slides/templates/layout.html +1 −0
  • internal/slides/templates/present_controls.html +3 −4
  • internal/slidestest/signin_door_test.go +37 −0

CI passed — run details

diff --git a/go.mod b/go.mod
index fe6d6d5..031a7ea 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-20260929165053-846b39772f3c
+ amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22
amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9
amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489
amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd
diff --git a/go.sum b/go.sum
index 80846f5..17bb1ce 100644
--- a/go.sum
+++ b/go.sum
@@ -8,6 +8,10 @@ amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e h1:LTSmIWUS8RjP
amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c h1:YYocIz3r3b4oIA0K/58JkSsmyTOCzMT/2GaW/MFbbPo=
amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
+amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b h1:UOxYBKsOSRHcHHYNKt0i6cB1Z4yT2soywOTWURYvBWo=
+amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
+amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 h1:RR9qP85FU1cZdn788v1zSLgZbKMGBmSk6Q7Rezj5JYI=
+amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 h1:K/PaOVdQqRMwifPD6ipiwLeGR5nbFSxm9FxjrDJlZcg=
amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9/go.mod h1:YroavXe43Wietec+po8mtSk4a9Bir2h31Q3iAf4MWxI=
amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM=
diff --git a/internal/slides/app.go b/internal/slides/app.go
index 3d618ab..2af5061 100644
--- a/internal/slides/app.go
+++ b/internal/slides/app.go
@@ -1,6 +1,7 @@
package slides
import (
+ "amadan.net/oficina/estilo.git/sky"
"context"
"net/http"
"time"
@@ -233,6 +234,8 @@ func New(d *db.DB, cfg Config) (*http.ServeMux, *app, error) {
mux.Handle("GET "+brand.Prefix, brand.Handler())
// Onest, Calma's typeface, served by estilo under its versioned prefix.
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())
mux.Handle("GET /static/", assets.Handler())
// The drive surface (api.go, spec ยง7), mounted HERE rather than in
// the chi router above, and this is the one deliberate exception in
diff --git a/internal/slides/auth.go b/internal/slides/auth.go
index 46cada1..94a1cd5 100644
--- a/internal/slides/auth.go
+++ b/internal/slides/auth.go
@@ -35,6 +35,7 @@ import (
"amadan.net/oficina/estilo.git/brand"
"amadan.net/oficina/estilo.git/chrome"
+ "amadan.net/oficina/estilo.git/sky"
"amadan.net/oficina/home/connect"
"amadan.net/oficina/home/connect/linkstore"
"amadan.net/oficina/home/handoff"
@@ -611,6 +612,8 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) {
shell: a.publicShell(r, frame{parts: []string{rastrillo.T(r, "slides.signin.sent.title")}, signinPage: true}),
Sent: &chrome.SignInNotice{
Icon: brand.Path("slides"),
+ App: "Slides",
+ Sky: sky.For(r.Host),
Heading: rastrillo.T(r, "slides.signin.sent.title"),
Body: rastrillo.T(r, "slides.signin.sent"),
Link: &chrome.Link{Href: again, Label: rastrillo.T(r, "slides.signin.again")},
@@ -620,6 +623,8 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) {
}
form := chrome.SignIn{
Icon: brand.Path("slides"),
+ App: "Slides",
+ Sky: sky.For(r.Host),
Heading: rastrillo.T(r, "slides.signin.title"),
Action: signinPath,
Hidden: []chrome.Hidden{{Name: "force", Value: "1"}},
@@ -872,6 +877,8 @@ func (a *app) renderSignedOut(w http.ResponseWriter, r *http.Request, status int
shell: a.publicShell(r, frame{parts: []string{title}, signinPage: true}),
Notice: chrome.SignInNotice{
Icon: brand.Path("slides"),
+ App: "Slides",
+ Sky: sky.For(r.Host),
Heading: rastrillo.T(r, "slides.signedout.heading"),
Body: rastrillo.T(r, "slides.signedout.body"),
Link: &chrome.Link{Href: signinPath, Label: rastrillo.T(r, "slides.chrome.signin")},
diff --git a/internal/slides/render.go b/internal/slides/render.go
index 783f7c9..d20fb12 100644
--- a/internal/slides/render.go
+++ b/internal/slides/render.go
@@ -1,6 +1,7 @@
package slides
import (
+ "amadan.net/oficina/estilo.git/sky"
"bytes"
"embed"
"html/template"
@@ -74,6 +75,9 @@ func staticFiles() fs.FS {
files["static/estilo/base.css"] = &fstest.MapFile{Data: base.CSS()}
files["static/estilo/menu.css"] = &fstest.MapFile{Data: estilomenu.CSS()}
files["static/estilo/chrome.css"] = &fstest.MapFile{Data: chrome.CSS()}
+ // The sky behind the sign-in door (estilo sky); its images are
+ // served by sky.Handler.
+ files["static/estilo/sky.css"] = &fstest.MapFile{Data: sky.CSS()}
files["static/estilo/chrome.js"] = &fstest.MapFile{Data: chrome.JS()}
files["static/estilo/save-status.css"] = &fstest.MapFile{Data: savestatus.CSS()}
files["static/estilo/save-status.mjs"] = &fstest.MapFile{Data: savestatus.JS()}
diff --git a/internal/slides/templates/layout.html b/internal/slides/templates/layout.html
index 8990554..8d94da1 100644
--- a/internal/slides/templates/layout.html
+++ b/internal/slides/templates/layout.html
@@ -44,6 +44,7 @@
<link rel="stylesheet" href="{{asset "static/estilo/base.css"}}">
<link rel="stylesheet" href="{{asset "static/estilo/menu.css"}}">
<link rel="stylesheet" href="{{asset "static/estilo/chrome.css"}}">
+<link rel="stylesheet" href="{{asset "static/estilo/sky.css"}}">
<script defer src="{{asset "static/rastrillo.js"}}"></script>
<script defer src="{{asset "static/busy.js"}}"></script>
<script defer src="{{asset "static/estilo/chrome.js"}}"></script>
diff --git a/internal/slides/templates/present_controls.html b/internal/slides/templates/present_controls.html
index e5fa100..ac2f822 100644
--- a/internal/slides/templates/present_controls.html
+++ b/internal/slides/templates/present_controls.html
@@ -18,10 +18,9 @@
Buttons []{Op, Label, Slide} โ€” one form each; Slide only for a
goto, which nothing renders yet and which the handler
accepts so a native remote has it. */}}
-{{/* data-busy="false": the busy rule's 650ms spinner is for a button
- that changes something and wants a beat to say so; Next and
- Previous during a live talk want to be instant. A deliberate
- exception to the suite's rule, 2026-09-29. */}}
+{{/* data-busy="false": the busy rule is for buttons that save something.
+ Next, Previous and Blackout save nothing โ€” they are presenting
+ controls, and they stay instant (Paul, 2026-09-29). */}}
{{define "present-controls"}}
{{- range .Buttons}}
<form method="post" action="{{$.Action}}" data-busy="false">
diff --git a/internal/slidestest/signin_door_test.go b/internal/slidestest/signin_door_test.go
new file mode 100644
index 0000000..8557cf0
--- /dev/null
+++ b/internal/slidestest/signin_door_test.go
@@ -0,0 +1,37 @@
+package slidestest
+
+import (
+ "net/http"
+ "net/http/httptest"
+ "regexp"
+ "strings"
+ "testing"
+)
+
+// The sign-in page is the Oficina door (estilo chrome): a card on the
+// suite sky with this app's mark and name, its sky layers served signed
+// out by estilo's handler rather than shadowed by the app's /static/.
+func TestSignInPageIsTheDoor(t *testing.T) {
+ h := newApp(t)
+ GET := func(p string) *httptest.ResponseRecorder { return get(t, h, p) }
+ rec := GET("/signin")
+ body := rec.Body.String()
+ for _, want := range []string{"estilo-door", "<span>Slides</span>", `name="address"`, " autofocus"} {
+ if !strings.Contains(body, want) {
+ t.Errorf("sign-in page lacks %q", want)
+ }
+ }
+ if !regexp.MustCompile(`<img estilo-sky-layer="placeholder"[^>]*src="data:image/png;base64,`).MatchString(body) {
+ t.Error("sign-in page has no inline sky placeholder")
+ }
+ layer := regexp.MustCompile(`<img estilo-sky-layer="[a-z]+"[^>]*src="(/static/estilo/sky/v1/[^"]+)"`).FindStringSubmatch(body)
+ if layer == nil {
+ t.Fatal("sign-in page links no served sky layer")
+ }
+ if got := GET(layer[1]); got.Code != http.StatusOK || got.Header().Get("Content-Type") != "image/svg+xml" {
+ t.Errorf("GET %s signed out: %d %q, want 200 image/svg+xml", layer[1], got.Code, got.Header().Get("Content-Type"))
+ }
+ if !regexp.MustCompile(`/static/estilo/sky\.[0-9a-f]{16}\.css`).MatchString(body) {
+ t.Error("sign-in page does not link sky.css")
+ }
+}