Skip to content

fix: respect guaranteed interchanges when determining trip status - #781

Merged
reidzeibel merged 1 commit into
mainfrom
ridwan/add-interchange-calculation-trip-warning
Aug 31, 2026
Merged

fix: respect guaranteed interchanges when determining trip status#781
reidzeibel merged 1 commit into
mainfrom
ridwan/add-interchange-calculation-trip-warning

Conversation

@reidzeibel

Copy link
Copy Markdown
Member

fixes https://github.com/AtB-AS/kundevendt/issues/24423

This PR makes it so that the guaranteed interchange status on some trips are taken into account when calculating the trip possibility, so even if the time is off and looks impossible, we calculate the maximumWaitTime of a guaranteed interchange before deciding if the trip is impossible or not.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
planner-web Ready Ready Preview Aug 31, 2026 1:13pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the trip refresh semantics in the assistant journey-planner so that guaranteed interchanges are respected when determining whether a refreshed trip pattern is “impossible”, aligning web behavior with the interchange contract (including maximumWaitTime) referenced in issue #24423.

Changes:

  • Extend RefreshableLeg to carry interchangeTo.guaranteed and interchangeTo.maximumWaitTime.
  • Update hasTemporalOverlap to ignore overlaps that are covered by a guaranteed interchange (bounded by maximumWaitTime when present).
  • Add comprehensive unit tests covering guaranteed vs non-guaranteed interchanges, max-wait timing boundaries, and walk-legs between services.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/page-modules/assistant/server/journey-planner/refresh-trip-utils.ts Adds guaranteed-interchange-aware overlap detection and supports maximumWaitTime semantics.
src/page-modules/assistant/__tests__/refresh-trip-utils.test.ts Adds test coverage for guaranteed interchange behavior and deadline edge cases.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@reidzeibel
reidzeibel merged commit d6157f2 into main Aug 31, 2026
6 checks passed
@reidzeibel
reidzeibel deleted the ridwan/add-interchange-calculation-trip-warning branch August 31, 2026 13:29
@tormoseng tormoseng added 🐛 Bug Issues related to bug, should have another label that indicates where the bug occurs (e.g. "App") TPW labels Sep 1, 2026
@tormoseng

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Issues related to bug, should have another label that indicates where the bug occurs (e.g. "App") C-bug TPW

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants