Deep links and saved lists: a malformed value no longer locks the app - #69
Merged
Merged
Conversation
A link with date=2026-10-1 or a stored favorite of null threw inside initApp, and the boot card blamed the data and retried the same URL. URL dates must be real YYYY-MM-DD days and times HH:MM; anything else falls back like an out-of-window date, and the address bar is corrected in place to match the screen. Stored favorites, watched routes and trips are checked per entry and a malformed one is dropped. Station names in a link resolve regardless of case, accents or St spelling, preferring the station that has trains (LILLE resolves to LILLE (intramuros)). A name matching nothing says Unknown station instead of No MAX seat. The boot card now says the page could not open when the data loaded but the app failed, and its Retry opens the app without the link.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
7/10, high
Problem
One malformed value in a shared link or in the browser's saved lists makes the app unusable. A link with
date=2026-10-1, or a saved favorite stored asnull, throws insideinitApp. The boot card then says "Couldn't load the data" and its Retry reloads the same URL, so the user never gets back in without editing the link or clearing site data.queryFromParamspassesdatethrough unchecked, andloadFavoritesand its two siblings only check that the stored value is an array. Both go back to the first build, ad68f09.Fix
A date in a link must be a real calendar day and a time must read
HH:MM. A bad departure date falls back to today, as an out-of-window one already did, other bad values are dropped, and the address bar is corrected in place to match the screen. Saved favorites, watched routes and trips are checked entry by entry, so one malformed entry is dropped rather than the whole list.Two changes ride along. A crash after the data has loaded now says "This page couldn't be opened" and retries without the link, since reloading the same link can only fail again. Station names in a link resolve whatever their case, accents or St and Saint spelling, and a name matching nothing says "Unknown station" instead of "No MAX seat", which sent people to add connections for a place that does not exist.
Resolution is an exact match after that normalising, with no substring fallback, so a typo is reported rather than guessed.