Skip to content

fix: polish the MCP pass chart (short names, tz, planet glyphs, location) - #18

Merged
coffee-converter merged 1 commit into
mainfrom
seeksat-chart-polish
Jun 15, 2026
Merged

fix: polish the MCP pass chart (short names, tz, planet glyphs, location)#18
coffee-converter merged 1 commit into
mainfrom
seeksat-chart-polish

Conversation

@coffee-converter

Copy link
Copy Markdown
Owner

Summary

Polishes the get_pass_chart MCP image so it reads just like the website chart. Five fixes the OG-card crop never needed:

  1. Short satellite names — adds a curated shortName to the catalog (ISS, Tiangong, Hubble, …) used in the chart title, the globe dot label, and the text summary, so long titles don't overflow.
  2. Location shortened — the geocoded place name is trimmed to its first component for the title ("Chicago, …, United States""Chicago").
  3. Timezone — reuses 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".
  4. Planet glyphs♀☿♂♃♄ 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.
  5. Fonts otherwise unchanged (Arimo is a clean substitute for the site's San Francisco).

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 asserts shortName).
  • npm run typecheck && npm run build — clean.
  • Manual (post-deploy): get_pass_chart for 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).

- 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).
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
seeksat Ready Ready Preview, Comment Jun 15, 2026 5:04pm

Request Review

@coffee-converter
coffee-converter merged commit c85b705 into main Jun 15, 2026
1 of 3 checks passed
@coffee-converter
coffee-converter deleted the seeksat-chart-polish branch June 15, 2026 17:04
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).
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