feat(seo): add crawlable live intelligence tools#5546
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
The /api/military/v1/list-military-flights endpoint accepted page_size but
never applied it — it used the value only in the cache key and returned the
full bounds-filtered set, so a broad viewport transferred an unbounded
response. Bound every request:
- Server pages the exact-bbox-filtered snapshot after retrieval (page_size
0/omitted/malformed -> default 100, >100 capped) and returns an opaque
decimal-offset cursor; empty/error paths return consistent {nextCursor:'',
totalCount:0}. The cache key drops page_size/cursor so all pages share one
snapshot and one upstream fetch.
- The full-dataset internal caller follows next_cursor, deduping across
regions. It fails closed on integrity failures (mid-chain error, empty
continuation page, non-terminating or repeated cursor, page ceiling) so the
circuit breaker keeps its last complete snapshot instead of caching a
truncated region; a region merely unavailable on its first call still
degrades to empty.
- Proto documents the cursor as opaque/echo-only and drops the no-op
annotation; OpenAPI regenerated.
Adds handler pagination tests (filter-before-page, cache reuse, stale
fallback, strict page-size/cursor, empty/error) and service tests
(multi-page, dedup, old-server, mid-chain failure, empty continuation,
first-page tolerance, cursor bound).
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.
Summary
Search visitors can now land on focused World Monitor intelligence pages that remain useful as crawlable, source-labelled references before JavaScript runs, then upgrade with current API signals when coverage is available.
This adds live context to all 196 country pages and 13 chokepoint pages, plus four deliberately bounded crisis trackers, a natural-hazard pulse, and an airspace-disruption checker. Each surface leads into the matching dashboard state instead of competing with the main product as a disconnected SEO experience.
Product and safety decisions
wm-sessionflow; generated pages contain no API keysThe new
/crises/and/tools/families participate in the generated corpus, sitemap, canonical routing, and public revalidation policy rather than falling through to the SPA shell.Validation
New concepts
Bounded live aggregation
A bounded tracker declares its geographic membership before requesting current data. Missing countries remain unavailable, and totals are emitted only when the returned records share a compatible reference period.
That constraint is preferable here to a generic “current crisis” query: it makes each page’s claim reviewable, keeps unrelated spillover out of totals, and prevents partial coverage from masquerading as a complete zero.
flowchart TB A[Static reviewed scope] --> B[Fetch each allowed country] B --> C{Records share a period?} C -->|Yes| D[Render aggregate plus country rows] C -->|No| E[Render country rows and withhold aggregate] B --> F[Keep missing inputs unavailable]The Red Sea tracker, for example, always requests its maintained four-country boundary and never silently expands with whatever events happen to be nearby. This pattern is a poor fit when the product promise is open-ended discovery; use it when the scope itself is part of the trust contract.