Signed-out tab says Signed out; test Home's words on the door
Review (Fable): the signin tree's static title read "Sign in" on the signed-out page, and the test did not check Home's heading, sentence or link, nor the status and no-store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+13
−4
internal/memoria/home_router_test.go+12 −3internal/memoria/templates/signin.html+1 −1
CI passed — run details
CI log
=== vet === go vet ./... go: downloading amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 === fmt === === test === go test ./... ? amadan.net/oficina/memoria/cmd/memoria [no test files] ok amadan.net/oficina/memoria/internal/memoria 3.611s ok amadan.net/oficina/memoria/internal/memoria/chunk (cached) ok amadan.net/oficina/memoria/internal/memoria/fact (cached) ? amadan.net/oficina/memoria/internal/memoria/icons [no test files] ok amadan.net/oficina/memoria/internal/memoria/index (cached) ok amadan.net/oficina/memoria/internal/memoria/notion (cached) ok amadan.net/oficina/memoria/internal/memoria/provider (cached) ok amadan.net/oficina/memoria/internal/memoria/query (cached) ok amadan.net/oficina/memoria/internal/memoria/seal (cached) ok amadan.net/oficina/memoria/internal/memoria/sibling (cached) ok amadan.net/oficina/memoria/internal/memoriatest 1.975s ? amadan.net/oficina/memoria/scripts/writeestilo [no test files] ? amadan.net/oficina/memoria/tools/bench [no test files] ? amadan.net/oficina/memoria/tools/drive [no test files] ? amadan.net/oficina/memoria/tools/seed [no test files] ? amadan.net/oficina/memoria/tools/vendorassets [no test files] === migration-check === go run github.com/carlosframework/rastrillo/cmd/rastrillo migration check rastrillo migration check: models and migrations agree
diff --git a/internal/memoria/home_router_test.go b/internal/memoria/home_router_test.go| index fa8b6f4..6ade219 100644 |
| --- a/internal/memoria/home_router_test.go |
| +++ b/internal/memoria/home_router_test.go |
| @@ -3,6 +3,7 @@ package memoria |
| import ( |
| "bytes" |
| "context" |
| + "html" |
| "io" |
| "log/slog" |
| "net/http" |
| @@ -382,10 +383,18 @@ func TestHomePagesStateTheModelSwitch(t *testing.T) { |
| func TestSignedOutIsTheDoor(t *testing.T) { |
| f := newHomeRouterFixture(t) |
| w := f.do("GET", "/signed-out", "") |
| - b := w.Body.String() |
| - for _, want := range []string{"estilo-door", "estilo-sky-layer", "estilo-signin", "<span>Memoria</span>", "/static/chrome.", "/static/sky."} { |
| + if w.Code != http.StatusOK || w.Header().Get("Cache-Control") != "no-store" { |
| + t.Fatalf("/signed-out: %d, Cache-Control %q", w.Code, w.Header().Get("Cache-Control")) |
| + } |
| + data := connect.Page("signedout", "") |
| + b := html.UnescapeString(w.Body.String()) |
| + for _, want := range []string{ |
| + "<div estilo-door", "estilo-sky-layer", "<section estilo-signin", "<span>Memoria</span>", |
| + "/static/chrome.", "/static/sky.", "<title>" + data.Title + " · Memoria</title>", |
| + data.Title, data.Body, `href="` + data.Action + `"`, data.ActionLabel, |
| + } { |
| if !strings.Contains(b, want) { |
| - t.Errorf("/signed-out (%d) lacks %q", w.Code, want) |
| + t.Errorf("/signed-out lacks %q", want) |
| } |
| } |
| } |
diff --git a/internal/memoria/templates/signin.html b/internal/memoria/templates/signin.html| index bbf136c..7e3a5da 100644 |
| --- a/internal/memoria/templates/signin.html |
| +++ b/internal/memoria/templates/signin.html |
| @@ -1,4 +1,4 @@ |
| -{{define "title"}}Sign in — Memoria{{end}} |
| +{{define "title"}}{{with .SignedOut}}{{.Heading}} · Memoria{{else}}Sign in — Memoria{{end}}{{end}} |
| {{/* The suite's door (estilo chrome): one card on the team's sky, the |
| app's mark and name at its head. chrome.css draws the card, sky.css |
| the sky; both are vendored from estilo (go run ./scripts/writeestilo). |