Skip to content

fix(data-sources): say a source did not answer instead of "0 in view" - #734

Merged
Medformatik merged 1 commit into
mainfrom
claude/confident-volta-2tlyvq
Nov 1, 2026
Merged

Medformatik merged 1 commit into
mainfrom
claude/confident-volta-2tlyvq

Conversation

@Medformatik

@Medformatik Medformatik commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

When a fuel, charging or parking source isn't ready, the OpenConditions providers answer with partial: "unavailable". The mobility panel only showed a notice for partial === "area". So an unavailable source with no results showed "0 in view", which reads as "there are no stations here".

Now, for unavailable:

  • The panel shows "Not every source answered, so results may be missing here." with a Retry action, not "Zoom in", because zooming doesn't help a source that didn't answer. The retry shows a spinner while the source is asked again.
  • The "0 in view" count is left out while it's unknown. Results that did arrive stay listed with the notice.

Unchanged: the area-limited "Zoom in to load more" notice, complete empty answers ("0 in view", no notice), and the loading and error states. The notice follows the current query, so a new viewport, provider or filter drops a stale notice.

Text added in English and German (dataSources.sourceDidNotAnswer); Retry reuses common.retry.

Related work

Fixes #412.

Verification

  • DataSourceFilterContent.test.tsx (new) covers: unavailable with no results, unavailable with results, the pending retry, loading during refetch, the area notice, a complete empty answer, and the notice clearing when the answer changes. Against the old component, the four unavailable cases fail and the three unchanged-behaviour cases pass.
  • DataSourcePartialNotice.test.tsx covers both reasons in English and German.
  • vitest run apps/web/src/components/panels/datasource/: 11 passed.
  • tsc --noEmit for apps/web: passes.
  • Biome check on the changed files and pnpm check-translations: pass (0 errors).

Not performed: screenshots or a browser check of the rendered notice; the maintainer asked to skip them. Full test suite and other workspaces' type checks are left to CI.

Release and upgrade impact

None.

When a fuel, charging or parking source is not ready, the search answer
carries `partial: "unavailable"`. The panel only noticed `"area"`, so an
unavailable source with no results read "0 in view", as if there were
no stations here.

Show a notice that not every source answered, with a retry action
instead of "zoom in", and leave out the count while it is unknown.
Results that did arrive stay listed. The area-limited notice and
complete empty answers are unchanged.

Refs #412

Claude-Session: https://claude.ai/code/session_017DEL8C49cYr4sPqU7EJgCR
@Medformatik
Medformatik enabled auto-merge (squash) November 1, 2026 17:24
@Medformatik
Medformatik merged commit 2175f67 into main Nov 1, 2026
28 of 42 checks passed
@Medformatik
Medformatik deleted the claude/confident-volta-2tlyvq branch November 1, 2026 17:31
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a "source unavailable" notice instead of "0 in view" in the mobility panel

1 participant