Skip to content

[codex] fix route updates#2

Draft
martin18f wants to merge 1 commit into
mainfrom
codex/fix-route-updates
Draft

[codex] fix route updates#2
martin18f wants to merge 1 commit into
mainfrom
codex/fix-route-updates

Conversation

@martin18f

Copy link
Copy Markdown
Owner

What changed

  • Clear the selected parent location when a user edits or deletes a previously selected start, stop, or destination search value.
  • Reset stale route state, rendered directions, travel time, and route-derived distance whenever route inputs change or endpoints become incomplete.
  • Recalculate Google Directions after start/destination/stop/avoid-highways changes and ignore stale async route responses.
  • Add tests covering route recalculation after adding/removing stops and clearing start/destination fields.

Why

The UI could keep an old DirectionsRenderer result and old distance/cost calculation after a route field was edited or cleared. The search input changed visually, but the selected location stored in app state remained valid, so the map and cost estimate stayed tied to the previous route.

Validation

  • CI=true npm test -- --watchAll=false
  • npm run build

Note: gh is not installed in the local environment, so this PR was opened with the GitHub connector after pushing the branch with git.

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
fuely Ready Ready Preview, Comment Jun 19, 2026 1:36pm

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