Repository navigation
Add favicons, social card and page metadata - #35
Conversation
build-icons.mjs writes the whole icon set from one grid. That grid is derived from Sentry Logo.svg rather than drawn: the path rasterised at 1024px, cropped to its tight bounding box, and box-sampled into 32 square cells. Sizes 32 and up scale it by whole numbers so the pixels stay square. Below 32 a 32-cell grid cannot have whole-number cells at all, so the same mark is rendered at 16x and averaged down rather than replaced with a simpler drawing. png.mjs is a dependency-free PNG encoder/decoder and .ico packer, so the repo can write image files without taking on a dependency.
Nine files: the SVG every current browser picks, an .ico carrying 16/32/48 rasters for the rest, and PNGs for iOS and the manifest. Black mark on #51ff00. icon-maskable-512 is a separate render at 56% fill. Android crops a maskable icon to whatever shape the launcher wants and only the middle 80% of the width is guaranteed to survive, so reusing the normal 512 would clip the arch feet. Generated by: node tools/build-icons.mjs --ink '#000000' --bg '#51ff00'
og.html composites the card rather than screenshotting it. The app fits the planet to the viewport, so the card's framing -- a lot of sky above a distinctly curved horizon -- is not a camera the app can be put into. Scaling a captured disc into position is the only way to set the globe's radius and its crest independently. That is why plates/ holds two kinds of image. plates/globe/*.png is the planet alone on the page ground; plates/stars.png is the star field alone. Baking them together and scaling would shrink the stars along with the globe and leave a denser, finer patch of sky wherever the disc landed. brand/lockup.png is the Sentry lockup, supplied as artwork and drawn over the top. The header comment has the recipe for retaking the plates, including why cloud opacity and star count both have to be tuned away from their defaults.
1200x630, and the only image the metadata declares. Versioned in its filename because scrapers cache the old image indefinitely and a query string does not reliably bust them.
The page carried none at all: no description, no icons, no social tags. Adds the description, canonical, theme-color, the icon and manifest links, and the full og: and twitter: set. og:image is the only image declared -- a second one makes the choice the scraper's rather than ours -- and its URL is absolute, since a scraper has no page to resolve a relative one against.
tools/ could not reach production already -- Vite copies only public/, main.go serves only static/, and the runtime image is FROM scratch with just the binary and static/ -- but COPY . . was still pulling it into the frontend build stage. Excluding it trims the build context as well. Adds tools/README.md covering what each script does and why the card is composited, and a short section in README.md pointing at it.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1c15715. Configure here.
| try { | ||
| // Departure Mono is the face the app sets its readouts in; the LIVE marker | ||
| // has to wait for it or it lands in the fallback and measures wrong. | ||
| await document.fonts.load('400 26px "Departure Mono"'); |
There was a problem hiding this comment.
OG card never loads custom font
Low Severity
document.fonts.load waits on Departure Mono, but og.html never registers that face against /fonts/DepartureMono-Regular.otf. The Font Loading API only loads already-declared faces, so the LIVE label falls back to generic monospace and measureText uses the wrong width.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1c15715. Configure here.


Before
No metadata at all. No description, no icons, no social tags — a shared link
rendered as a bare URL, and the tab showed the browser's blank-document icon.
After
og:andtwitter:set,summary_large_image, 1200×630 card.ico(16/32/48), Apple touch, 192/512, maskable 512site.webmanifestEleven files in
public/, 260 KB, of which the card is 245 KB. Verified throughnpm run buildintostatic/.Both images are generated rather than mocked up. The mark is derived from
Sentry Logo.svgby rasterising the path and sampling it onto a 32×32 grid; thecard composites a captured globe plate, a separate star plate and the lockup.
The scripts live in
tools/, which is not served, shipped or run at build time— see tools/README.md for what each one does and the
four separate guards that keep it out of production.