Skip to content

feat(daemon): add a PI monogram dashboard favicon - #9

Merged
prorochestvo merged 1 commit into
mainfrom
feat/8-dashboard-favicon
Aug 12, 2026
Merged

feat(daemon): add a PI monogram dashboard favicon#9
prorochestvo merged 1 commit into
mainfrom
feat/8-dashboard-favicon

Conversation

@prorochestvo

Copy link
Copy Markdown
Owner

Closes #8

Gives the dashboard a PI monogram favicon so the tab identifies the page instead
of showing the browser's generic placeholder.

What changed

Two files, 50 added lines, one of them the mark itself:

  • gateway/httpapi/web/index.html — a single <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,…"> after <meta name="theme-color">,
    on its own line so the blob stays contained in diffs.
  • gateway/httpapi/ui_test.go — a regression subtest under TestHandleDashboard.

gateway/httpapi/ui.go is untouched: no new go:embed, no new file under web/,
no /favicon.ico route. The dashboard stays one self-contained asset whose version
always equals the binary.

The mark

512x512 master downscaled to 32x32 with Catmull-Rom (never rasterised directly at
32): rounded tile at 19% corner radius filled --bg:#0b0e14, PI in JetBrains Mono
Bold in the dashboard's own accent --accent:#6f9dff — Open Question 1, resolved by
the owner in favour of the issue's default. Glyphs fitted by measured ink bounds
rather than advance widths, since a monospace cell's side bearings would otherwise
make the mark read small; ink height 48% of the tile, width landing at ~68%, so the
"PI is wider than CV" crowding pitfall never bit and no tracking tweak was needed.

1083-byte PNG, 1444 base64 chars — 1.4 KB on a 35.9 KB page, inside the issue's
~2 KB budget and one fewer round trip than a separate favicon file.

Per the issue's default, no 16x16 variant: browsers downscale the 32 acceptably for
a two-glyph mark.

The generator is a throwaway Go program (golang.org/x/image/font/opentype) kept out
of the repo, as the issue requires — the committed artifact is the data URI alone.
It replaces the breakdown's assumed Python/PIL step only because neither PIL nor
pip exists on the workstation; same technique, same output contract. No font file
is added to this repo.

Verification

  • make test and make lint green; native and arm64 builds green.
  • Mutation-tested the new assertion — it fails on all four realistic regressions:
    link removed, payload truncated, href swapped to an external file, duplicate icon
    link. The first cut used png.DecodeConfig, which waved the truncated payload
    through (a truncated blob still carries an intact IHDR); it now decodes in full.
  • End-to-end against a real daemon — started yarddogd, fetched /, and the
    icon extracted from the served bytes decodes to a 32x32 PNG that is SHA-256
    identical to the generated master.

Left to the reviewer

Task 4's real-browser check. This host is headless and a tab-bar favicon is not
something a headless screenshot can capture, so everything mechanically checkable is
checked and the "does it look right in a tab" pass is yours. Mind the trap the issue
flags: check in a new tab or a private window — browsers cache favicons hard and a
plain reload will keep showing the old placeholder.

The browser tab showed the generic placeholder, so the dashboard was
unidentifiable among open tabs. Ship a "PI" monogram in JetBrains Mono
Bold on the page's own dark tile, glyphs in the dashboard accent blue so
the icon matches the product it belongs to.

The mark rides inline as a base64 data URI rather than a second embedded
asset: the dashboard is one self-contained file whose version always
equals the binary, and a separate asset would need its own embed, route
and cache policy for no user-visible gain. The serving path is unchanged.

The accompanying test asserts the served page carries exactly one icon
link whose payload fully decodes as a 32x32 PNG, by marker rather than by
byte-exact blob, so the mark can be regenerated without breaking it.

Refs: #8

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@prorochestvo
prorochestvo merged commit 348a290 into main Aug 12, 2026
1 check passed
@prorochestvo
prorochestvo deleted the feat/8-dashboard-favicon branch August 12, 2026 05:18
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.

Add a PI monogram favicon to the dashboard

1 participant