Skip to content

1.16 part 11/18: Almanac: page, sky, tables and maps for a place - #182

Closed
epheterson wants to merge 1 commit into
line/1.16.0-10-games-phonefrom
line/1.16.0-11-almanac-page
Closed

epheterson wants to merge 1 commit into
line/1.16.0-10-games-phonefrom
line/1.16.0-11-almanac-page

Conversation

@epheterson

@epheterson epheterson commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Part 11 of 18 of Zimi 1.16.0: Almanac: page, sky, tables and maps for a place. Base: line/1.16.0-10-games-phone (part 10); the diff shows only this part's files. The PR carries the not-a-release label and the version stays 1.15.7, so merging it cuts no release. Merge in order (1 to 17, then 18) with a merge commit, not a squash.

What this is

The Almanac's 2D page: how it opens, the sky card, the tables, the tides and the reference. It also adds "a map for any place": one server-side rule that picks the installed map (or the map worth downloading) for a point, used by the 3D view, Go to, articles with coordinates and the Almanac's place. The page here loads 3D scripts that land in parts 13 to 16, so between parts 11 and 16 it is ahead of them; the built Almanac ZIM lands on top of part 16.

What changes

  • zimi/static/almanac.js (largest change): the page opens with no veil. app.js draws a first frame, this file draws the same head over it, and heavy work (GPU sky, panels) waits until the head has been painted. The clock and section pills stay pinned while scrolling, and the date's parts can be typed in place. The 3D view's files are fetched ahead of a tap only on a machine that can afford it.
  • zimi/static/almanac-sky.js, almanac-skygl.js: the sky is painted once, when it is the picture that stays (GPU or Canvas 2D); the GPU sky gets an eclipse path (the sky lit as a Sun below the horizon) and shared light and airmass tables.
  • zimi/static/almanac-skyfacts.js: a settings sheet for the sky (scene: the place's own, the beach, the true horizon; size of Sun and Moon; the life drawn; land-cover scene names) with a gear that opens it from the foot of the screen.
  • zimi/static/almanac-tables.js: a page of constants lists the capability levels and governor and every quantity the Almanac computes with its source; the PDF comments now name the server's typesetter (part 12).
  • zimi/static/almanac-tides.js, almanac-tides.css: the chart's clock line starts at its dot, and the month strip is scrubbed by press and drag.
  • zimi/static/almanac-reference.js: planets now come from the shared VSOP87D series (EPH_VSOP87D) instead of a table built into the nav data; scripts/build_almanac_navdata.py drops the planet tables and keeps the stars. The series file almanac-vsop87.js and the regenerated almanac-navdata.js land in part 13, so the Reference page is ahead of them at this tip.
  • zimi/mapchoice.py (new): the rule for "which map": only maps whose ground holds the point, smallest region first, then newest, then smallest file, the planet last. It reads installed maps from the library and offers from the catalogs already held; nothing is fetched. zimi/mapregions.py adds NOT_COVERED boxes (sea and neighbours inside a country's rectangle) and scripts/build_map_regions.py and zimi/assets/map-regions.json add antimeridian boxes.
  • zimi/static/mapflow.js (new, fetched on first use): asks /map-for once per spot (about 1 km), then opens the map or shows the offers; without the right to download no offers are shown.
  • zimi/static/almanac-maps.js (new): draws the installed map's roads and names onto the 3D Earth as the camera comes down, one tile per frame, with a quiet chip offering a map.
  • zimi/static/almanac-links.js: more Q-IDs for planet and moon links.

How to review

  • Read first: zimi/mapchoice.py (installed_maps, offered_maps, answer: ordering, antimeridian handling in lng_in, the catalog read in catalog_maps), then mapflow.js (lookup, outcome, canDownload).
  • Then almanac.js open path (_almWhenShown, _almWhenSettled, _almSkySettled): the page must show before the sky or panels run.
  • Risk: almanac-maps.js per-frame cost and GPU memory (tileBudget, MAX_TILES, MAX_LOADS), the new /map-for input (lat and lng parsing sits in http.py, an earlier part), and the pinned clock on a phone.
  • Skip: zimi/assets/map-regions.json (a data table built by scripts/build_map_regions.py).
  • Rides here: tests/test_apps_mobile.cjs first passes at this tip; it covers the apps on a phone, including the Almanac's header. The /map-for route in http.py is in an earlier part and imports zimi/mapchoice.py, which lands here.

Tests

  • Map choice: tests/test_mapchoice.py, tests/test_map_kind.py, tests/test_place_real_tags.py.
  • Maps on the 3D Earth and a map for any place: tests/test_maps3d_browser.py.
  • Page open and clock: tests/test_almanac_open_browser.py, tests/test_almanac_clock_browser.py, tests/test_almanac_layout_browser.py, tests/test_almanac_page_browser.py, tests/test_almanac_live_sky_browser.py, tests/test_almanac_open_path.cjs (browser except the .cjs).
  • Idle cost: tests/test_idle_lean_browser.py, tests/test_orrery_lift_live.py.
  • Tables, tides and text: tests/test_almanac_tables.cjs, tests/test_almanac_tides_browser.py, tests/test_almanac_tide_clock_marks.py, tests/test_almanac_meteor_rows.py, tests/test_today_teaser_names.py, tests/test_almanac_loading_text.py.
  • Tests that read later parts' files are with those parts: test_almanac_lazy_open.cjs and test_almanac_reference.cjs in part 13, test_almanac_view_links.py in part 15.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epheterson epheterson added the not-a-release Ships nothing; CI skips the version check label Nov 23, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Sorry @epheterson, your pull request is larger than the review limit of 150,000 diff characters

@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 9883bfd to 36f1493 Compare November 23, 2026 10:07
@epheterson
epheterson force-pushed the line/1.16.0-11-almanac-page branch 2 times, most recently from b6b2e5a to 5c6a4ad Compare November 23, 2026 10:12
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 36f1493 to 2784201 Compare November 23, 2026 10:52
@epheterson
epheterson force-pushed the line/1.16.0-11-almanac-page branch from 5c6a4ad to 387e48d Compare November 23, 2026 10:52
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 2784201 to 5c8fda1 Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-11-almanac-page branch from 387e48d to 4dfe97a Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 5c8fda1 to 21a45d9 Compare November 23, 2026 16:44
@epheterson
epheterson force-pushed the line/1.16.0-11-almanac-page branch from 4dfe97a to eace8c2 Compare November 23, 2026 16:44
@epheterson

Copy link
Copy Markdown
Owner Author

Reviewed here; included in the release PR #189.

@epheterson epheterson closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-a-release Ships nothing; CI skips the version check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant