Skip to content

Keep the selected lane across Best time links - #178

Merged
sbc1-code merged 1 commit into
mainfrom
claude/preserve-lane-best-time-20261107
Nov 8, 2026
Merged

sbc1-code merged 1 commit into
mainfrom
claude/preserve-lane-best-time-20261107

Conversation

@sbc1-code

Copy link
Copy Markdown
Owner

What this fixes

From the Nov 7 BorderPulse audit: with SENTRI selected, Plan your crossing then See current wait time returned to the Standard lane. In the audit's sampled test the displayed wait changed from 25 to 185 minutes (test observations, not current waits).

Cause: the lane lives in the URL (?lane=). The crossing-share link, two card links and Best time's return link all dropped it. Dashboard card links to the crossing page already used withLane(); these did not.

Changes

  • Pass the validated lane through withLane() on: CrossingShare best-time link, both BorderCrossingCard best-time links, and Best time's "See current wait time" link.
  • Best time shows a short EN/ES note when a non-Standard lane is selected: that history is standard-passenger and does not describe the lane. The data is unchanged (per the 2026-10-27 decision).
  • scripts/test-crossing-share.mjs had asserted a lane-free best-time link for every lane, which encoded the bug. It now expects the lane key. Added a withLane contract test.
  • CHANGELOG and DECISIONS updated.

Verified

  • npm test suites pass through test:audit; test:bundle passes after a build (entry 61.79 KB of 62 KB budget); test:routes passes (476 navigations).
  • Not verified: a real browser walk-through of SENTRI to Plan to See current wait, or a physical phone. Please check on the Vercel preview.

Not in this PR

"View trends" menu item, Walk or Drive wording, empty Analytics view, scroll position, mixed English in Spanish UI, accessibility items. The paused collector backup repair (codex/collector-backup-review-20261105) is untouched.

Draft. Do not merge until Sebastian approves.


Generated by Claude Code

Opening "Plan your crossing" or the card menu's Best time dropped the
?lane= key, and "See current wait time" then returned to Standard
(25 to 185 minutes in the audit's SENTRI test). Pass the validated lane
through withLane() on the share link, both card links and the Best time
return link. Show a short EN/ES note on Best time when a non-Standard
lane is selected, since that history is standard-passenger.

The share test had asserted a lane-free link for every lane; it now
expects the lane key. Add a withLane contract test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JB1Z5HSRuMsFpDeoEX6spM
@sbc1-code
sbc1-code marked this pull request as ready for review November 8, 2026 05:39
@sbc1-code
sbc1-code merged commit f01806e into main Nov 8, 2026
1 check 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.

2 participants