Skip to content

Conversation

@sharhio
Copy link
Contributor

@sharhio sharhio commented Dec 11, 2025

Proposed Changes

  • reset previous platform value between leg changes

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • This pull request does not have any merge conflicts
  • All existing tests pass in CI build

Review

  • Read and verify the code changes
  • Test the functionality by running the UI locally with all popular browsers available in your platform
  • Check that the implementation matches the design, when such one is defined in an issue in Azure Boards
  • Merge the pull request

Copy link
Member

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

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

Incorrect warning still shows up occasionally - got it 4 times during 20 tests. Maybe the logic below is more obvious:

  • Do not evaluate change status at all unless next leg is a transit leg
  • RESTORED status can't be set unless CHANGED status is detected first
const platformRef = useRef();

  if (legChanged) {
    platformRef.current = undefined;
  }
  let platformStatus = PLATFORM_STATUS.NORMAL;
  if (nextLeg?.transitLeg) {
    platformStatus = getPlatformChangeStatus(nextLeg, platformRef.current);
    if (platformStatus === PLATFORM_STATUS.CHANGED) {
      platformRef.current = nextLeg.from.stop.platformCode;
    }
  }

@vesameskanen vesameskanen merged commit 48481be into v3 Dec 15, 2025
7 checks passed
@vesameskanen vesameskanen deleted the fix-original-platform branch December 15, 2025 09:29
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.

3 participants