Skip to content

Forward ooni_run_link_id from MAT View measurements link#1129

Open
toomore wants to merge 1 commit into
ooni:masterfrom
toomore:fix-mat-view-measurements-ooni-run-link-id
Open

Forward ooni_run_link_id from MAT View measurements link#1129
toomore wants to merge 1 commit into
ooni:masterfrom
toomore:fix-mat-view-measurements-ooni-run-link-id

Conversation

@toomore

@toomore toomore commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Problem

On the MAT (Measurement Aggregation Toolkit) chart, each tooltip has a "View measurements >" link that carries the active filters over to the /search measurements list page. When the aggregation is filtered by ooni_run_link_id, that filter was not included in the generated link, so the destination /search page showed unfiltered results instead of the OONI Run link's measurements.

Cause

The link query is built by generateSearchQuery in components/aggregation/mat/CustomTooltip.js, which only forwards a fixed allow-list of keys (probe_cc, test_name, category_code, probe_asn, input, domain). ooni_run_link_id was missing from that list, even though:

  • the MAT carries it in query (the MAT Form has an ooni_run_link_id field), and
  • the /search page already accepts it as a supported filter (pages/search.js).

Change

Add ooni_run_link_id to the forwarded keys. The existing reduce logic handles it correctly: it's a filter (not a chart axis), so it's pulled from the MAT query and only included when set and non-empty. Links without an OONI Run filter are unchanged. No other change is needed since /search already parses the param.

Testing

  • Opened a MAT chart with ooni_run_link_id set, hovered a data point, and confirmed the link's href now contains ooni_run_link_id=<id>.
  • Confirmed /search loads with the OONI Run link filter applied.
  • Confirmed that with no ooni_run_link_id set, the link is unchanged.

🤖 Generated with Claude Code

The MAT chart tooltip's "View measurements >" link forwards the active
filters to the /search page, but the ooni_run_link_id filter was missing
from the allow-list in generateSearchQuery. As a result, filtering an
aggregation by an OONI Run link was lost when navigating to the
measurements list.

Add ooni_run_link_id to the forwarded keys. The /search page already
accepts it as a supported filter, so no other change is needed.
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@toomore is attempting to deploy a commit to the OONI Team on Vercel.

A member of the Team first needs to authorize it.

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