Skip to content

planner: generalise the data layers for one layer at a time - #2347

Merged
timohueser merged 1 commit into
developfrom
claude/planner-data-layers
Oct 3, 2026
Merged

timohueser merged 1 commit into
developfrom
claude/planner-data-layers

Conversation

@timohueser

Copy link
Copy Markdown
Owner

Summary

This change prepares the website planner for the Weather and Wind layers (#2329). Snow is the only layer that it implements. A later layer is one registry line, one implementation file and its tests.

  • Registry. layers/registry.ts lists the data layers in menu order. Each entry names its archive and a factory. A layer shows only when the region has its archive URL. DATA_URLS in map-data.ts maps each archive name (snow, climate) to its URL. The names agree with planner: bake the climate data layer from ERA5-Land #2345 (VITE_PLANNER_CLIMATE_URL).
  • One layer at a time. The layer menu has a segmented control: Off, then each layer. The map syncs the hidden layers first and then the shown layer. The layer date stays shared.
  • No stats block. The left-panel stats block is gone for all layers. The one-line label above the year slider stays.
  • Interface. DataLayer now has:
    • strip?: an optional profile strip (legend, fills, values).
    • variable?: an optional switch in the date bar (for example Temperature | Rain). The layer owns its value.
    • year(samples | null): the year slider as a Grid with labelled rows, also empty rows before a route exists.
    • chart(): a Chart with labelled grids, an optional extra component (for example a wind rose) and an optional note.
    • legend(): swatches or a continuous scale (LayerLegend.svelte, solid colours).
    • sample(line): gets the line coordinates and the profile heights, so a layer can compute the bearing and correct temperature without new requests.
    • Grids have 183 two-day columns or 52 weeks.
  • Snow. The snow layer keeps its look. The tree note and the forest query moved from PlannerMap into the snow layer. LayerSpot merged into LayerInspect (compact).

Not in this change: the night-low labels at overnight stops (Weather). They need the trip day ends as an input. A later change can add them.

Checks

  • npx vitest run src/lib/planner src/components/planner: 163 passed
  • npx svelte-check --fail-on-warnings: no new errors. The 15 that remain are missing wasm pkg/ build outputs.
  • npm run test:planner: the request budget passes, with no change
  • obc suites check, obc prose --check: OK
  • Manual check on the Engadin data (light and dark): menu, map, date bar, strip popover, map callout

Public docs changed: no

Requirements: none

🤖 Generated with Claude Code

The layer menu offers Off or one data layer from a short registry. A layer
shows only when the region has its archive. The archive URLs are one map
keyed by archive name (snow, climate).

The DataLayer interface now covers the decided Weather and Wind designs:
an optional profile strip, an optional variable switch in the date bar,
year slider rows with labels, point charts with several grids and an extra
view, swatch or scale legends, and the profile heights as an input. The
left-panel stats block is gone for all layers. Snow keeps its look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 180a1e06-d186-454b-a556-e2950d061ab3
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timohueser
timohueser merged commit 2ebc75c into develop Oct 3, 2026
28 checks passed
@timohueser
timohueser deleted the claude/planner-data-layers branch October 3, 2026 21:17
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