fix: polish the MCP pass chart (short names, tz, planet glyphs, location) - #18
Merged
Conversation
- Add curated catalog shortName ('ISS','Tiangong','Hubble') used in the
chart title, globe dot label, and summary so long titles don't overflow.
- Shorten the geocoded location to its first component for the title.
- Resolve the observer timezone (reuse fetchTimezone) so chart times read
in the location's local clock instead of 'browser local'.
- Embed a ~2KB DejaVu Sans subset (☿♀♂♃♄) as a resvg fallback font so the
planet glyphs render instead of tofu; guard paintPolarModalLegend's
browser-only location read (carried from the full-layout change).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
coffee-converter
added a commit
that referenced
this pull request
Jul 3, 2026
- Add curated catalog shortName ('ISS','Tiangong','Hubble') used in the
chart title, globe dot label, and summary so long titles don't overflow.
- Shorten the geocoded location to its first component for the title.
- Resolve the observer timezone (reuse fetchTimezone) so chart times read
in the location's local clock instead of 'browser local'.
- Embed a ~2KB DejaVu Sans subset (☿♀♂♃♄) as a resvg fallback font so the
planet glyphs render instead of tofu; guard paintPolarModalLegend's
browser-only location read (carried from the full-layout change).
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.
Summary
Polishes the
get_pass_chartMCP image so it reads just like the website chart. Five fixes the OG-card crop never needed:shortNameto the catalog (ISS,Tiangong,Hubble, …) used in the chart title, the globe dot label, and the text summary, so long titles don't overflow."Chicago, …, United States"→"Chicago").fetchTimezone(lat, lon)so chart times show in the location's local clock (e.g. "times in America/Chicago (UTC-6)") instead of "browser local".♀☿♂♃♄were rendering as tofu (□) because Arimo/Exo 2 lack those code points and resvg had no fallback. Embeds a ~2 KB DejaVu Sans subset (just those 5 glyphs) as a resvg fallback font.Verified by rendering charts locally: short "Chicago — ISS pass sky chart" title, local times, and Venus drawn as ♀ on the disc and in the legend.
Test plan
npm test— 381/381 (catalog test now also assertsshortName).npm run typecheck && npm run build— clean.get_pass_chartfor a location with a daytime pass shows the planet glyph + local-time labels.The subset font was produced with
pyftsubset DejaVuSans.ttf --unicodes=263F,2640,2642,2643,2644(DejaVu is Bitstream Vera / public-domain licensed).