Skip to content

AB#736 Fix MQTT crash, prop type warnings and embedded search logo/background - #6069

Merged
sharhio merged 7 commits into
v3from
AB#736
Oct 13, 2026
Merged

sharhio merged 7 commits into
v3from
AB#736

Conversation

@vesameskanen

@vesameskanen vesameskanen commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Proposed Changes

  • Fix a crash when opening an itinerary that uses a route without a fixed schedule (e.g. certain flex/demand-responsive routes): the itinerary page's MQTT real-time client startup called startRealTimeClient with a null config whenever the route's feed wasn't configured for realtime or its realtime source wasn't active, which crashed mqttClient.js's startMqttClient on settings.options. startClient() in ItineraryPageUtils.js now guards against a null client config the same way RouteControlPanel, DepartureListContainer, and updateClient already do.
  • Verified locally with CONFIG=hsl yarn run dev: reproduced the crash on /reitti/Martti, Turku::60.440986,22.253577/Kakola, Turku::60.44278,22.242233?time=1791437498
  • Fix prop type warnings: ErrorBoundary children is now optional (empty content, e.g. stop page alerts tab), and the embedded search generator preview passes a complete match (location.pathname, params) to EmbeddedSearch.
  • Fix embedded search (/haku) background graphic being hidden: the control panel became opaque white when its invalid background-color: ffffff was corrected to #fff, so the panel is now explicitly transparent in the embed.
  • Embedded search shows only config.secondaryLogo (light-background logo) instead of falling back to the navbar logo, which is often white. Added secondaryLogo for matka (new recolored SVG), varely, hsl, pori, jyvaskyla, kotka, turku, rovaniemi, tampere (favicon) and joensuu (new SVG); hameenlinna now uses its main logo (unused secondary-logo.png removed). Themes without one (e.g. default, waltti, kela, mikkeli) show no logo.

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

…e feed

startClient() passed configClient()'s result straight to
startRealTimeClient without checking for null. configClient() returns
null when the itinerary's feed isn't configured for realtime or the
realtime source isn't active - e.g. special routes without a fixed
schedule - which crashed mqttClient.js's startMqttClient on
settings.options. Other call sites (RouteControlPanel,
DepartureListContainer, updateClient) already guard against this;
added the same guard here.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vesameskanen vesameskanen changed the title AB#736: Fix crash when MQTT client starts for routes without active realtime feed AB#736 Fix crash when MQTT client starts for routes without active realtime feed Oct 8, 2026
vesameskanen and others added 6 commits October 9, 2026 08:28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vesameskanen vesameskanen changed the title AB#736 Fix crash when MQTT client starts for routes without active realtime feed AB#736 Fix MQTT crash, prop type warnings and embedded search logo/background Oct 9, 2026
@sharhio
sharhio merged commit 350f6be into v3 Oct 13, 2026
9 checks passed
@sharhio
sharhio deleted the AB#736 branch October 13, 2026 05:41
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