oficina / memoria Public

Switcher: the suite's apps as tiles, not "All apps" alone 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 (dfc5ccf)

  • internal/memoria/chrome.go: the switcher sets Apps: chrome.SuiteApps(a.directory, "memoria") — Docs, Sheets, Slides, Calendar, Memoria, Calls as tiles at https://<slug>.<directory host>/, Memoria marked current, then "All apps" below a divider. Still shown only when Home names a hub directory; no origins hard-coded.
  • brand.Handler was not mounted; it is now, at a literal GET /static/estilo/brand/ on the outer mux (public, sessionless, beside the sky and the font). Declared in gate 17's mux list (TestNoUndeclaredRoutes), and new TestBrandRouteIsEstilosPrefix keeps the literal equal to brand.Prefix. The production CSP's img-src 'self' data: already covers it.
  • estilo bumped from 530cb932e768 to 0e4003429d577cf282f3ba4932b6c8560fc091ce, a commit on estilo's feat/switcher-tiles branch (estilo discussion oficina/estilo #24). It must be re-pinned to the estilo main commit once that merges. The bump changed only the vendored static/chrome.css (re-written with go run ./scripts/writeestilo); no other test fallout.

Tests

  • TestTheSwitcherIsAllAppsOnly (which pinned "no tiles") is replaced by TestTheSwitcherShowsTheSuite: six tiles in order with hrefs, /static/estilo/brand/<slug>.svg icons and names; exactly one aria-current, on Memoria's tile, with the hidden " (this app)" label; All apps after the <hr>; GET /static/estilo/brand/calls.svg with no cookies is 200 and an SVG; no switcher without a directory.
  • Seen red: Apps line removed -> 0 tiles; brand mount removed -> icon 404 and the prefix test red. Both restored by hand. (Mutations mine, so per AGENTS.md they prove consistency, not the gate.)

Local gate (GOTOOLCHAIN=go1.26.5, .amadan/ci.d/* in order): vet, fmt, test, migration-check all pass. The first test run had fact.TestLabellingIsNotQuadraticInAChunksFacts red on timing (3.48x for 2x input) under machine load; it passed 3/3 alone and the full rerun was green. Unrelated package.

Not merged, not deployed.

🤖 Hub CI on dfc5ccf: failed before any step ran, so this is a runner problem and says nothing about the change. The runner (oficina-extra-ci-runner) could not sync its workspace:

fatal: destination path '/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/git' already exists and is not an empty directory. (and could not reset the workspace: unlinkat .../cache/go-mod/modernc.org/libc@v1.74.1/wctype: permission denied)

The Go module cache in that workspace is read-only, so the reset cannot delete it, and every run after this will fail the same way until someone clears it (chmod -R u+w and then remove /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria, or go clean -modcache with that GOMODCACHE). I have not touched the runner. The local gate (vet, fmt, test, migration-check on go1.26.5) passed. 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 dfc5ccff7e4d3b819c2594ff8bebae27ecfb2d55 against 81f7fe94e3b2ac6e8fd5b16575b71495c5c9ee36.

VERDICT: APPROVE — ready to merge.

  1. No P0, P1 or P2 findings.

The current slug is "memoria"; directory configuration is validated before use. The new public GET route is outside authentication and its literal /static/estilo/brand/ is exactly brand.Prefix. Both the declaration guard and a real cookie-free SVG request exercise it. The brand handler only serves allowlisted embedded artwork. The tile test checks all six destinations/icons/names, unique current semantics, the divider and All apps, and absence without a directory.

The vendored internal/memoria/static/chrome.css is byte-identical to the pinned estilo CSS. The additional rail-account rules are from the intervening dependency update and remain scoped to that opt-in 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: ran GOTOOLCHAIN=go1.26.5 make ci. Vet and formatting passed; the test step failed in the unchanged TestAModelResponseIsCheapToProcess/a_row_whose_processing_crosses_the_deadline_is_dropped (the supposedly timely row exceeded the deadline). A serial retry still failed. A fresh scratch checkout of origin/main reproduced the same test and assertion, so this is not a branch regression. The new switcher and vendored checks reported no failures. Ran the remaining make migration-check separately: passed. Hub CI remains blocked by the known workspace-reset permission failure, before tests run.

Note: repin estilo to its resulting main commit after estilo #24 merges. The code verdict does not claim the runner is green.

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: b80115efa8ecdcceb8014710b287ae729661b3cb

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