Skip to content

feat: deterministic route planner and dark mode toggle - #3

Merged
bjarkeef merged 2 commits into
mainfrom
feat/route-planner-and-dark-mode
Jun 23, 2026
Merged

feat: deterministic route planner and dark mode toggle#3
bjarkeef merged 2 commits into
mainfrom
feat/route-planner-and-dark-mode

Conversation

@bjarkeef

Copy link
Copy Markdown
Owner

Summary

  • Extract deterministic route generation into src/lib/route-planner.ts (seeded loop / out-and-back strategies, variants, typed errors) and slim the route-planner API handler.
  • Wire route planner UI/map for another route, accuracy, route type, and fit-to-bounds.
  • Add light/dark theme toggle beside the profile avatar (and login), with preference stored in localStorage and applied before paint to avoid flash.

Test plan

  • Route planner: generate a loop and out-and-back for a target distance; confirm geometry and accuracy display
  • Route planner: use "Another route" / variant and confirm a different but deterministic route for the same start + distance
  • Route planner: map fits to route bounds after generation
  • Header: theme toggle appears next to profile avatar (desktop and mobile)
  • Toggle dark/light; preference persists across reload
  • Theme applies without a white/dark flash on first load when preference is set
  • Logged-out view still shows theme toggle next to login

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
runnr Ready Ready Preview, Comment Jun 23, 2026 3:38pm

bjarkeef added 2 commits June 23, 2026 17:37
Move ORS routing out of the API route into src/lib/route-planner.ts with
seeded, non-random loop/out-and-back strategies, variant support, and typed
errors. Slim the API handler and wire UI/map for Another route, accuracy,
route type, and fit-to-bounds.
Persist light/dark preference in localStorage, apply theme before paint to avoid flash, and expose a header switcher beside the profile icon (and login).
@bjarkeef
bjarkeef force-pushed the feat/route-planner-and-dark-mode branch from d1c9ed4 to a1f1399 Compare June 23, 2026 15:37
@bjarkeef
bjarkeef merged commit 0b8ce4d into main Jun 23, 2026
4 checks passed
@bjarkeef
bjarkeef deleted the feat/route-planner-and-dark-mode branch June 23, 2026 15:42
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