Skip to content

Trail map feedback: dark-mode popups, stop rendering, map resize + home-as-trip-start and campsite booking clarity#30

Merged
johnymontana merged 2 commits into
mainfrom
user-feedback-iter
Jul 6, 2026
Merged

Trail map feedback: dark-mode popups, stop rendering, map resize + home-as-trip-start and campsite booking clarity#30
johnymontana merged 2 commits into
mainfrom
user-feedback-iter

Conversation

@johnymontana

Copy link
Copy Markdown
Owner

Addresses trail-map user feedback for the planning page, plus two feature asks from the same
report: trips that start from home, and clearer campsite booking info.

Plan-map bug fixes

  • Dark-mode popups — MapLibre's default popup is white with no text color, and the global
    color: fg token made popup text near-white in dark mode (white-on-white). Popups are now
    restyled per color mode via .maplibregl-popup-content/-tip token rules in the theme's
    globalCss; inline popup HTML uses Chakra CSS variables instead of hard-coded hex.
  • Stops not rendering until the map moves — the stops effect in MapTripCanvas/TripMap
    dropped the render with no retry whenever isStyleLoaded() was momentarily false. It now
    retries on the next idle event.
  • Map shrinks in plan mode — nothing ever called map.resize(); when added stops made the
    builder column overflow, the scrollbar narrowed the container while the GL canvas kept its
    stale width. Both plan maps now run a ResizeObservermap.resize().

Home location as the trip start point (ADR-074)

  • Durable home anchor (:User)-[:LIVES_AT]->(:Home) (migration 028), captured via the new
    set_home_location ranger tool (confirm-before-save), a Home card on /me (free text or
    browser geolocation), all geocoded server-side through the existing ORS adapter
    (geocode/reverseGeocode on the same key — no new vendor).
  • Per-trip origin defaults from home (overridable for fly-in trips) with a round-trip toggle
    (default on). Fixes a latent bug: :Trip.startPoint was written as a bare map param, which
    Neo4j rejects — it's a real spatial point() now.
  • Origin/return drive legs are :Trip props computed by recomputeSegments (the origin is not
    a :Stop; DRIVE_TO stays stop-to-stop), shown in TripBuilder, counted in metrics, drawn on
    the plan/shared maps (⌂ marker + extended route), and exported in the GPX.
  • Home also surfaces in the ranger memory block, /explore distance sort + "~N mi from home"
    card line, a "From home" stat on park pages, and a home pin in the /map "Your map" overlay.

Campsite booking clarity (ADR-075)

  • New pure lib/camp-booking.ts#bookingSignal classifier (reservation / first-come / mixed /
    unknown) with shared badge wording + palette, consumed by: a prominent callout on the
    campground detail page, a clear badge on finder cards (replacing R42 · FCFS18), and a
    booking badge in the ranger chat campground cards (previously no signal). Unknown degrades to
    "Check on recreation.gov ↗" — absence of data is never rendered as bookable or full.
  • Richer per-site attributes (maxPeople, campfireAllowed, shade) via the RIDB attribute
    mapper; already-synced facilities backfill on changed RIDB content or a forced re-run.

Group trip planning from the same feedback is validated but deferred (noted in ADR-074).

Deploy notes

  • Run pnpm db:migrate (migration 028: :Home uniqueness constraint).
  • No new env vars — geocoding reuses ORS_API_KEY.

Testing

  • pnpm typecheck clean; pnpm test:unit 112 files / 1008 tests passing (new coverage:
    bookingSignal, RIDB attr parsing, home-defaulted trip origin, memory-block home line).
  • pnpm build succeeds; pnpm exec eve info — 0 errors / 0 warnings.
  • E2E not run in this session (needs seeded Neo4j) — recommended before merge since TripBuilder
    markup changed.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
trail-graph Ready Ready Preview, Comment Jul 6, 2026 3:35pm

Request Review

@johnymontana
johnymontana merged commit 55b13d2 into main Jul 6, 2026
8 checks passed
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