Skip to content

Batch route search into two requests and gate old web versions - #152

Merged
MrAlders0n merged 1 commit into
devfrom
routes-search-batch
Oct 10, 2026
Merged

MrAlders0n merged 1 commit into
devfrom
routes-search-batch

Conversation

@MrAlders0n

Copy link
Copy Markdown
Member

Route search now makes at most two requests per search (/routes/search and /routes/cross, both with an optional iatas list) instead of one /routes/cross call per IATA pair. A search over ~372 areas used to fire ~138k requests. Needs beacon-server 2.0.4.

  • Scope is the picked areas, else the region's, else global (iatas omitted). Picking every area is global. More than 100 is blocked.
  • Hashes are validated (hex, 1–4 bytes) and lowercased.
  • Within-area and cross-area results share one table, sorted by hops then last seen.
  • A new search, clear or leaving the page aborts in-flight requests. Route search never retries.
  • 400 messages from the server are shown as-is, 503 shows a timeout message, and a failed search never says "no routes".

Adds a version gate: the app reads minWebVersion from GET /api/v1/info on load and on tab focus (at most once a minute) and shows a blocking reload screen when it is older. A 404, null or malformed value, or a network error never blocks.

Bumps the version to 2.0.3.

@MrAlders0n
MrAlders0n merged commit 8ac3e1b into dev Oct 10, 2026
2 checks passed
@MrAlders0n
MrAlders0n deleted the routes-search-batch branch October 10, 2026 02:20
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.

1 participant