Skip to content

[feat] Give the operator pages a favicon - #20

Merged
ok merged 2 commits into
mainfrom
ok/favicon
Sep 20, 2026
Merged

ok merged 2 commits into
mainfrom
ok/favicon

Conversation

@ok

@ok ok commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Both pages declared <link rel="icon" href="data:,">, which silences the browser's /favicon.ico request but leaves the tab with no icon at all.

They now share one icon: the Mirall M and its orange square, taken from the path and colour in docs/media/logo-*.svg, on a dark rounded tile so it reads on light and dark tab strips.

It is an inline data:image/svg+xml URI in src/operator/html.js rather than a served file, because the two pages sit under different prefixes behind platform proxies, MIRALL_RELAY_ADMIN_UI=false removes the status page's routes, and the CSP already allows img-src data:. No new route, no new asset to ship.

Testing

  • Unit test: both pages declare the same SVG icon, it decodes to valid SVG with the brand orange, and the encoded value is safe inside a double-quoted attribute. The existing "no external resource" tests still hold.
  • npm run lint clean, npm test green.
  • Rendered at 256/64/32/16 px on light and dark backgrounds.

ok added 2 commits September 20, 2026 21:50
Both pages declared an empty data: icon, so browser tabs showed
nothing. Use the Mirall M and its orange square from the repo's logo,
inlined as an SVG data URI so it works under any proxy prefix and with
the status page's routes turned off.
A fetch parked on docker-proxy's accepted-but-silent socket did not
hold the event loop open, so the process drained mid-await and every
test in the file was cancelled. Hold the loop with an interval and
time each request out.
@ok
ok merged commit ba9008a into main Sep 20, 2026
4 checks passed
@ok
ok deleted the ok/favicon branch September 20, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant