Repository navigation
feat(traffic): distinguish map data from route evidence - #426
Merged
Merged
Conversation
1 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Driving and motorcycle route cards now show estimated traffic delays as 1 h 45 min (+45 min), with the duration and delay colored by the existing severity bands. The delay appears only when it is at least five minutes and 10% of the same-path comparison duration.
Unknown or insufficient congestion data leaves the duration in the normal text color. There is no visible unavailable-data row; the explanation remains in About traffic and the route's screen-reader description. Fresh, complete route-specific congestion evidence with no significant delay permits a green duration without an extra caption. Selecting a motorized route alone no longer turns its duration green.
The info button sits at the right of the duration line, above the distance, in every traffic state. Its optional popover explains the estimate, road-update verification and routing source. Request-bound proof checks remain unchanged; verified road-update explanations expire with their evidence and are separate from estimated congestion delays.
The owned Traffic flow legend uses a compact Fast–Slow scale and moves confidence/source explanations into its info popover. TomTom gains its own source/coverage disclosure. Neither map layer claims that its colors affected a route or establish fresh, complete coverage; the public tile formats do not expose usable update timestamps.
Provider limitation: current routing providers do not emit the new
trafficCoverageevidence, so the green state is a tested UI consumer and is not yet reachable from production responses. Existing positive same-path delay estimates still appear without claiming complete coverage. When coverage evidence is supplied, its expiry removes both green and delay colors. Engine-side congestion coverage and public overlay publication metadata remain follow-up work; this PR does not close the whole end-to-end scope of #402.Refs #402.
Verification
2769a87: 121 tests passed across six files, covering route cards, traffic state, popover interactions and both legends.VITEST_MAX_WORKERS=4; no hooks bypassed).Screenshots
Actual Before: retained from this PR's real parent commit
bf47e937a2457f4a2539bcf43d1bf043ccea7248, not an earlier iteration of this PR. These original routes have no comparison duration.Current After examples: different controlled route fixtures demonstrate unavailable data, fresh complete coverage and an estimated 45-minute delay. The green example injects coverage evidence to demonstrate the consumer; it is not a production engine response or a claim of live regional coverage. Images are attached directly to this PR and are absent from the repository. Each PNG is captured at 960 pixels wide, with the 320 CSS-pixel layout enlarged for legibility.
English / dark:
German / light:
Checklist