feat(radar): clarify positional mapping for filter arrays and dimension types#274
Merged
andre-j3sus merged 1 commit intomainfrom Jan 8, 2026
Merged
feat(radar): clarify positional mapping for filter arrays and dimension types#274andre-j3sus merged 1 commit intomainfrom
andre-j3sus merged 1 commit intomainfrom
Conversation
…nd dimension types Improve documentation to explain that filter arrays (location, asn, continent, geoId) map positionally to dateRange arrays. When comparing time periods for the same location, users must repeat the filter value for each dateRange element, otherwise unmatched periods default to worldwide data. Also adds documentation for dimension types (timeseries, summary, timeseriesGroups) and includes ASN in filtering options.
|
lgtm |
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
dateRangewith filter arraysProblem
When using multiple
dateRangevalues (e.g.,["7d", "7dcontrol"]) with a single filter value (e.g.,location: ["IR"]), the API returns worldwide data for unmatched periods instead of the expected filtered data. This led to incorrect analysis conclusions.Root cause: Filter arrays map positionally to
dateRangearrays. A single location value only filters the first period; subsequent periods default to worldwide.Solution
Improved documentation in two places:
apps/radar/src/types/radar.ts): Added "IMPORTANT" notes toDateRangeArrayParam,LocationArrayParam,AsnArrayParam,ContinentArrayParam, andGeoIdArrayParamexplaining positional mapping behavior.apps/radar/src/radar.context.ts):Testing
Verified that an LLM correctly uses location: ["IR", "IR"] when asked to compare Iran's bandwidth between this week and last week.