oficina / calendar Public

App switcher: the suite's apps as tiles open

On branch feat/switcher-tiles

🤖 Paul asked: "Can the 'All apps' dropdown just be a list of apps rather than a dropdown with a single-item list?"

What changed (branch feat/switcher-tiles, 780286a)

  • internal/calendar/chrome_calendar.go: the switcher now sets Apps: chrome.SuiteApps(directory, "calendar") and CurrentLabel: "(this app)" (the file's strings are plain English, so no i18n key). Six tiles (Docs, Sheets, Slides, Calendar, Memoria, Calls) at https://<slug>.<directory host>/, Calendar marked aria-current, then "All apps" below the divider. It is still shown only when HOMEDIRECTORYORIGIN is configured.
  • internal/calendar/routes.go: brand.Handler() was not mounted; it is now, at brand.Prefix on the bare mux, public and sessionless next to sky.Handler. CSP img-src 'self' already covers the icons.
  • estilo bumped from 530cb932e768 to 0e4003429d577cf282f3ba4932b6c8560fc091ce, the estilo feat/switcher-tiles branch commit (estilo discussion oficina/estilo #24). It must be re-pinned to the estilo main commit once that merges.
  • Fallout from the bump: TestDoorFilesAreEstilos failed because the vendored internal/calendar/static/chrome.css was behind estilo. Re-vendored with go run ./scripts/writeestilo, which adds estilo's switcher phone layout and rail-account CSS. Nothing else broke.

Tests TestAllAppsLinksToDirectory is replaced by TestTheSwitcherShowsTheSuite, which checks: six tiles in order with the right hrefs, /static/estilo/brand/<slug>.svg icons and names; exactly one aria-current, on Calendar, with the hidden " (this app)"; "All apps" after the <hr> linking to the directory root; GET /static/estilo/brand/calls.svg with no cookies returning 200 and an SVG; and no switcher when no directory is configured. I watched it fail twice, once with the Apps field removed and once with the brand mount removed.

Local gate: make ci (vet, fmt-check, test, migration-check) with go1.26.5 passes.

Not merged, not deployed.

🤖 Hub CI passed on 780286a675338b112b3db34d0d5e4a97281a0abd (feat/switcher-tiles). Not merged, not deployed.

🤖 Review only, from a detached scratch worktree under /tmp/switcher-review-21a32889; whole branch compared with freshly fetched origin/main. No source edits, commits, pushes or merges. Reviewer: GPT-6-Astra (Codex), reviewing for session 21a32889.

Reviewed head 780286a675338b112b3db34d0d5e4a97281a0abd against b5753d05988c74a2baabb27818049c1861b70fc5.

VERDICT: APPROVE — ready to merge.

  1. No P0, P1 or P2 findings.

calendarChrome passes "calendar" and the current label. The directory comes through validated Home configuration. The new GET brand handler is on the outer mux, outside session middleware, mounted exactly at brand.Prefix; its own slug allowlist cannot serve arbitrary files. The regression test checks the six destinations/icons, exactly one current tile, the hidden label, the divider and public icon response, plus no switcher without a directory.

The vendored internal/calendar/static/chrome.css is byte-identical to the pinned estilo CSS. Its extra rail-account rules come from the intervening dependency update and are scoped to the opt-in rail variant.

Shared-component browser verification used HTML rendered by the actual estilo branch templates and CSS: Chromium and WebKit, all six current-app states, signed in and signed out, at 320, 390 and 1280px (72 layouts). All passed: three columns/two rows, no horizontal overflow, loaded icons, targets above 24px and reachable by pointer. Keyboard opening, link order, Escape/focus return, accessible names and scriptless opening passed; WebKit link navigation used macOS Option-Tab.

Validation: GOTOOLCHAIN=go1.26.5 make ci passed, including the vendored asset checks. Hub CI passed at the reviewed head. Note: repin estilo to its resulting main commit after estilo #24 merges.

Re-pinned estilo to main d53b8e9533a168dee0dc89370fadeef22a43b4f0 (estilo #24 squash; tree identical to the old branch pin 0e40034). go.mod/go.sum only.

New head of feat/switcher-tiles: 610fca3ad3f43cca0934ca27eabf8b7fbb75fef5

Local gate (make ci; writeestilo re-run, no diff, GOTOOLCHAIN=go1.26.5): passed. Waiting on hub CI.