Repository navigation
feat: Give the app an icon and a link preview - #17
Merged
Merged
Conversation
The favicon pointed at /vite.svg, which is not in the repository - every tab showed the browser's blank-page glyph. There were no Open Graph tags either, so pasting the link into Slack produced a bare URL. The icon is an OID tree: a root node, a trunk and two children, white on the blue the header already uses. It is drawn once as an SVG and rendered to PNG for the browsers and platforms that will not take one - 96px as a favicon fallback, 180px full-bleed for the iOS home screen, where the system applies its own rounding. The preview image is a 1200x630 render of scripts/og-image.html: the name, what the thing does, and a slice of the merged tree with two SMIv1 traps under an enterprise node, so the picture says what the product is without being read. Its source is committed next to it, along with the one command that regenerates it, because an image nobody can rebuild is an image nobody will change. The og: URLs are absolute and name the deployed site: a relative one unfurls with no image at all. A fork that publishes elsewhere has to edit them, which the README now says, along with everything else about these files. Also here: the document language was ja while every string in the interface is English, and there was no meta description for a search engine or an unfurl to quote. Verified against the built output rather than the sources - all four files are served at the base path with the right content types, and the tags land in the DOM with the absolute URLs intact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qyesKa9si8szMUe7w8HNK
…witter The preview image carried its own copy of the glyph, so the next edit to favicon.svg would have left the two different without anything failing. It pulls in the file itself now, which the render resolves relative to the source and so still needs no network. twitter:image had no alt text while og:image did. Checked the rest of the change against the artefacts rather than the sources: the three PNGs really are the sizes the tags declare (96, 180, 1200x630), all four files are served at the base path in dev and in the build, nothing still refers to the vite.svg that was never there, the document language matches the interface - which has no Japanese in it - and the command the README gives for regenerating the preview reproduces the committed PNG byte for byte. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qyesKa9si8szMUe7w8HNK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The favicon pointed at
/vite.svg, which is not in the repository — every tab showed the browser's blank-page glyph. There were no Open Graph tags either, so pasting the link into Slack produced a bare URL and nothing else.The icon
An OID tree: a root node, a trunk and two children, white on the blue the header already uses. Drawn once as
public/favicon.svgand rendered to PNG for the browsers and platforms that will not take one — 96px as a favicon fallback, 180px full-bleed for the iOS home screen, where the system applies its own rounding and a rounded source would be rounded twice.It was checked at the size it is actually used: at 16px the branches still read as branches rather than smearing into a blob.
The link preview
public/og-image.pngis a 1200×630 render ofscripts/og-image.html— the name, what the thing does, and a slice of the merged tree with two SMIv1 traps under an enterprise node, so the picture says what the product is without being read. The source is committed next to the output, along with the one command that regenerates it, because an image nobody can rebuild is an image nobody will change. That source pulls infavicon.svgrather than carrying its own copy of the glyph, so the two cannot drift apart.The
og:URLs are absolute and name the deployed site: a relative one unfurls with no image at all. A fork that publishes elsewhere has to edit them, which the README now says, along with everything else about these files.Also here
jawhile every string in the interface is English.meta descriptionfor a search engine or an unfurl to quote.twitter:imagehad no alt text whileog:imagedid.Verification
Against the built artefacts, not the sources:
/mib-browser/…as it should.vite.svg.lang="en"is the truthful value.Tests, typecheck and build are unaffected and green (176 pass).
One thing this cannot do from a file
Pasting the repository URL rather than the site URL unfurls from GitHub's own social preview, which is a repository setting, not a file in the tree. Uploading the same
og-image.pngunder Settings → General → Social preview makes the two match. Worth knowing too: Slack caches an unfurl for a while, so a changed image shows up sooner if the message is posted with?1on the end of the URL.🤖 Generated with Claude Code
https://claude.ai/code/session_018qyesKa9si8szMUe7w8HNK
Generated by Claude Code