From 5da014f52c9fd3059f26a4c6e0946c4582906fc0 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Wed, 29 Oct 2025 13:00:20 +0100 Subject: [PATCH] feat(symbols): Pass project platform to builtin symbol sources API Sends the project's platform to the builtin symbol sources API endpoint to enable platform-based filtering of symbol sources. This is the frontend companion to the backend PR that adds platform restrictions for builtin symbol sources with org access control. Depends on backend PR #TBD --- .../views/settings/projectDebugFiles/index.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/static/app/views/settings/projectDebugFiles/index.tsx b/static/app/views/settings/projectDebugFiles/index.tsx index 46e887d8e502ae..4614216ae60e30 100644 --- a/static/app/views/settings/projectDebugFiles/index.tsx +++ b/static/app/views/settings/projectDebugFiles/index.tsx @@ -53,8 +53,14 @@ function makeDebugFilesQueryKey({ return [`/projects/${orgSlug}/${projectSlug}/files/dsyms/`, {query}]; } -function makeSymbolSourcesQueryKey({orgSlug}: {orgSlug: string}): ApiQueryKey { - return [`/organizations/${orgSlug}/builtin-symbol-sources/`]; +function makeSymbolSourcesQueryKey({ + orgSlug, + platform, +}: { + orgSlug: string; + platform?: string; +}): ApiQueryKey { + return [`/organizations/${orgSlug}/builtin-symbol-sources/`, {query: {platform}}]; } function ProjectDebugSymbols({organization, project, location, router, params}: Props) { @@ -91,7 +97,10 @@ function ProjectDebugSymbols({organization, project, location, router, params}: isError: isErrorSymbolSources, refetch: refetchSymbolSources, } = useApiQuery( - makeSymbolSourcesQueryKey({orgSlug: organization.slug}), + makeSymbolSourcesQueryKey({ + orgSlug: organization.slug, + platform: project.platform, + }), { staleTime: 0, enabled: hasSymbolSourcesFeatureFlag, @@ -137,6 +146,7 @@ function ProjectDebugSymbols({organization, project, location, router, params}: queryClient.invalidateQueries({ queryKey: makeSymbolSourcesQueryKey({ orgSlug: organization.slug, + platform: project.platform, }), }); },