templates: logo 404s on /c/<slug> (no trailing slash) — relative src resolves to /c/logo.svg #115

Closed
opened 2026-09-04 09:30:43 +00:00 by ben · 1 comment
Owner

Observed on the live ngati-example Poster page 2026-09-04: the hero medallion shows a broken image. The template emits <img src="logo.svg">; the page is served at /c/<slug> (no trailing slash), so the browser resolves the relative URL to /c/logo.svg -> 404. /c/<slug>/logo.svg returns 200.

Change

In templates/src/community-page.ts, emit an absolute logo URL: /c/${slug}/logo.svg (slug is available via the submission brand; keep using logoFile for the filename so png kits work). Works identically under prod Caddy and the dev/e2e Hono route (/c/:slug/:file{logo...}).

Acceptance

  • Template unit test asserts the rendered img src equals /c/<slug>/<logoFile>.
  • e2e: after rendering the community page, assert the logo request succeeds (e.g. Playwright page.waitForResponse on the logo URL with status 200, or assert the img natural width > 0) so a regression can't pass silently again.
  • make test, make typecheck, make e2e green.

out_of_scope

Any other template change; Caddy config.

needs_human_decision

None.

Observed on the live ngati-example Poster page 2026-09-04: the hero medallion shows a broken image. The template emits `<img src="logo.svg">`; the page is served at `/c/<slug>` (no trailing slash), so the browser resolves the relative URL to `/c/logo.svg` -> 404. `/c/<slug>/logo.svg` returns 200. ## Change In `templates/src/community-page.ts`, emit an absolute logo URL: `/c/${slug}/logo.svg` (slug is available via the submission brand; keep using `logoFile` for the filename so png kits work). Works identically under prod Caddy and the dev/e2e Hono route (`/c/:slug/:file{logo...}`). ## Acceptance - Template unit test asserts the rendered `img src` equals `/c/<slug>/<logoFile>`. - e2e: after rendering the community page, assert the logo request succeeds (e.g. Playwright `page.waitForResponse` on the logo URL with status 200, or assert the img natural width > 0) so a regression can't pass silently again. - `make test`, `make typecheck`, `make e2e` green. ## out_of_scope Any other template change; Caddy config. ## needs_human_decision None.
Author
Owner

Interactive takeover: swarm hosts have been capacity-starved for 4 days (ticks absorbed), so this never got claimed. Fixing directly — branch agent/issue-115, PR to follow.

Interactive takeover: swarm hosts have been capacity-starved for 4 days (ticks absorbed), so this never got claimed. Fixing directly — branch agent/issue-115, PR to follow.
ben closed this issue 2026-09-04 10:29:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa#115
No description provided.