oficina / meet Public

Pin estilo and home to their main merges

estilo #25 merged as f14458a and home #84 as ff16bf5, so the
connect-item fix now pins main rather than the branches: estilo
f14458a, home/connect and home/handoff ff16bf5. main is merged in too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9b004532ed2a2f521db8b1a7bf3f66270da237d1 parent 963b843parent 47f6a80
5 files changed, +62 −19
  • go.mod +3 −3
  • go.sum +6 −6
  • internal/calls/app.go +4 −0
  • internal/calls/chrome.go +4 −2
  • internal/calls/home_consumer_test.go +45 −8

CI failed — run details

diff --git a/go.mod b/go.mod
index ea53f64..6f9dedd 100644
--- a/go.mod
+++ b/go.mod
@@ -3,9 +3,9 @@ module amadan.net/oficina/calls
go 1.26.0
require (
- amadan.net/oficina/estilo.git v0.0.0-20261024225503-1817c1c6c7ef
- amadan.net/oficina/home/connect v0.0.0-20261024225613-4d87d0031ed4
- amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489
+ amadan.net/oficina/estilo.git v0.0.0-20261024233714-f14458a4683c
+ 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
github.com/go-chi/chi/v5 v5.3.2
github.com/keymaildev/signin v0.1.1
diff --git a/go.sum b/go.sum
index fd22538..9fbaefd 100644
--- a/go.sum
+++ b/go.sum
@@ -1,9 +1,9 @@
-amadan.net/oficina/estilo.git v0.0.0-20261024225503-1817c1c6c7ef h1:c+0jDD33fLLQ0L4lOF7mYjEC6dbcIq1d3RGAAxGtXWo=
-amadan.net/oficina/estilo.git v0.0.0-20261024225503-1817c1c6c7ef/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
-amadan.net/oficina/home/connect v0.0.0-20261024225613-4d87d0031ed4 h1:VN9QzOFXo0dir9A3lXKCgF0nTfnOs3edT1mgPk0z/Yc=
-amadan.net/oficina/home/connect v0.0.0-20261024225613-4d87d0031ed4/go.mod h1:ix81eFV87yE9f2SXiRuxYCVM4lAgTRC5YoQMiH3+TDk=
-amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM=
-amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489/go.mod h1:YISpzFJ+iMgrM0rUL032OSzsAQbP4/nozvXLCCOcn1k=
+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/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=
+amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d/go.mod h1:YISpzFJ+iMgrM0rUL032OSzsAQbP4/nozvXLCCOcn1k=
amadan.net/rastrillo/rastrillo v0.27.1-0.20261006204347-fb806a287060 h1:K2PXcCKfm+AYrqgH1ea6cNsFs4sN7MKLvq+uBY11NZE=
amadan.net/rastrillo/rastrillo v0.27.1-0.20261006204347-fb806a287060/go.mod h1:WmC8TAIfqjAkSwmD+FCTqr7VuqAO5FaX03HlV49K608=
amadan.net/rastrillo/rastrillo/money v0.1.0 h1:MxU4oqNrW8abxRTkgZBv24OYNpFnvonajNqeLIzmmaM=
diff --git a/internal/calls/app.go b/internal/calls/app.go
index 76ac871..e3938f0 100644
--- a/internal/calls/app.go
+++ b/internal/calls/app.go
@@ -1,6 +1,7 @@
package calls
import (
+ "amadan.net/oficina/estilo.git/brand"
"amadan.net/oficina/estilo.git/chrome"
"amadan.net/oficina/estilo.git/sky"
"amadan.net/oficina/estilo.git/theme"
@@ -597,6 +598,9 @@ func build(ctx context.Context, d *db.DB, cfg Config) (*http.ServeMux, *app, err
mux.Handle("GET "+sky.Prefix, sky.Handler())
// Onest, Calma's typeface, served by estilo under its versioned prefix.
mux.Handle("GET "+theme.FontPrefix, theme.FontHandler())
+ // The app switcher's tile icons: estilo's suite brand marks, public
+ // and sessionless like the sky.
+ mux.Handle("GET "+brand.Prefix, brand.Handler())
mux.Handle("/", r)
return mux, a, nil
}
diff --git a/internal/calls/chrome.go b/internal/calls/chrome.go
index d2a5f89..844fe7d 100644
--- a/internal/calls/chrome.go
+++ b/internal/calls/chrome.go
@@ -234,8 +234,9 @@ func (a *app) offersHomeLink(r *http.Request, v viewer) bool {
}
// switcher is the app switcher, or nil when no hub directory is
-// configured. It shows "All apps" alone and no tiles (Paul's §13 answer
-// 2), as Docs, Sheets and Slides do.
+// configured: the suite's six apps as tiles, each at its own host under
+// the directory's (estilo's chrome.SuiteApps), with Calls marked current,
+// then "All apps".
func (a *app) switcher() *chrome.Switcher {
if a.cfg.home == nil || a.cfg.home.Directory == "" {
return nil
@@ -243,6 +244,7 @@ func (a *app) switcher() *chrome.Switcher {
return &chrome.Switcher{
Label: "Oficina apps",
CurrentLabel: "(this app)",
+ Apps: chrome.SuiteApps(a.cfg.home.Directory, "calls"),
AllApps: estilomenu.Item{Href: a.cfg.home.Directory + "/", Label: "All apps"},
}
}
diff --git a/internal/calls/home_consumer_test.go b/internal/calls/home_consumer_test.go
index 02575a9..5baf14e 100644
--- a/internal/calls/home_consumer_test.go
+++ b/internal/calls/home_consumer_test.go
@@ -71,23 +71,60 @@ func TestHomeSigninWhenSignedInReturnsToPage(t *testing.T) {
}
}
-// "All apps" goes to the hub directory, from HOME_DIRECTORY_ORIGIN, in the
-// account corner, and is absent when no directory is configured.
-func TestAllAppsLinksToDirectory(t *testing.T) {
- link := `href="` + homeTestDirectory + `/"`
+// The switcher appears only with a hub directory (HOME_DIRECTORY_ORIGIN)
+// configured. It shows the suite's six apps as tiles at their hosts under
+// the directory's, with Calls marked current, and "All apps" to the
+// directory below a divider. The tiles' icons are served without a session.
+func TestTheSwitcherShowsTheSuite(t *testing.T) {
f := newHomeConsumerFixture(t, homeTestDirectory)
f.local(t)
+ want := []string{"docs", "sheets", "slides", "calendar", "memoria", "calls"}
+ names := []string{"Docs", "Sheets", "Slides", "Calendar", "Memoria", "Calls"}
for _, path := range []string{"/", "/settings"} {
w := f.do("GET", path, "")
- if body := w.Body.String(); w.Code != http.StatusOK || !strings.Contains(body, link) || !strings.Contains(body, ">All apps<") {
- t.Fatalf("GET %s (%d): no All apps link to %s/", path, w.Code, homeTestDirectory)
+ body := w.Body.String()
+ start := strings.Index(body, `<details estilo-switcher name="estilo-menus">`)
+ if w.Code != http.StatusOK || start < 0 {
+ t.Fatalf("GET %s (%d): no switcher", path, w.Code)
}
+ panel := body[start:]
+ panel = panel[:strings.Index(panel, "</details>")]
+ grid, allApps, ok := strings.Cut(panel, "<hr>")
+ if !ok || !strings.Contains(allApps, `<a estilo-menu-item href="`+homeTestDirectory+`/"><span estilo-menu-label>All apps</span></a>`) {
+ t.Errorf("GET %s: the switcher does not offer All apps below the tiles: %s", path, panel)
+ }
+ var tiles []string
+ for _, tile := range strings.Split(grid, "<a estilo-switcher-app ")[1:] {
+ tiles = append(tiles, tile[:strings.Index(tile, "</a>")])
+ }
+ if len(tiles) != len(want) {
+ t.Fatalf("GET %s: %d tiles, want %d: %s", path, len(tiles), len(want), grid)
+ }
+ for i, slug := range want {
+ head := `href="https://` + slug + `.directory.example.test/"`
+ if slug == "calls" {
+ head += ` aria-current="true"`
+ }
+ head += `><img src="/static/estilo/brand/` + slug + `.svg" alt="" width="32" height="32"><span>` + names[i]
+ if !strings.HasPrefix(tiles[i], head) {
+ t.Errorf("GET %s: tile %d = %s, want it to start %s", path, i, tiles[i], head)
+ }
+ }
+ if strings.Count(grid, "aria-current") != 1 || !strings.Contains(tiles[5], "<span estilo-visually-hidden> (this app)</span>") {
+ t.Errorf("GET %s: Calls is not the one current tile: %s", path, grid)
+ }
+ }
+
+ icon := httptest.NewRecorder()
+ f.handler.ServeHTTP(icon, httptest.NewRequest("GET", homeTestOrigin+"/static/estilo/brand/calls.svg", nil))
+ if icon.Code != http.StatusOK {
+ t.Errorf("a tile's icon, without a session, is %d", icon.Code)
}
bare := newHomeConsumerFixture(t, "")
bare.local(t)
- if body := bare.do("GET", "/", "").Body.String(); strings.Contains(body, "All apps") {
- t.Fatal("All apps shown with no directory configured")
+ if body := bare.do("GET", "/", "").Body.String(); strings.Contains(body, "estilo-switcher") || strings.Contains(body, "All apps") {
+ t.Fatal("a switcher with no directory configured")
}
}