Skip to content

Commit 6c80168

Browse files
authored
feat(symbols): Pass project platform to builtin symbol sources API (frontend) (#104116)
## Summary Frontend changes to support platform-restricted builtin symbol sources. This PR updates the Debug Files settings page to pass the project's platform to the builtin symbol sources API endpoint, enabling platform-based filtering of available symbol sources. ## Changes ### Frontend - **projectDebugFiles/index.tsx**: Pass `project.platform` query parameter to the builtin symbol sources API ## Context This is the **frontend companion** to backend PR #102013 that adds: - Platform restrictions for builtin symbol sources (e.g., Nintendo Switch private servers) - Organization-level access control via `enabledConsolePlatforms` - Automatic default symbol sources for game engines (Unity, Unreal, Godot) ## Implementation The change is minimal - it adds the `platform` query parameter when fetching builtin symbol sources: ```tsx platform: project.platform || undefined, ``` This allows the backend to filter symbol sources based on: 1. Platform match (if source has `platforms` restriction) 2. Organization access (for platform-restricted sources) ## Deployment **Can be merged independently** - This change is backward compatible: - If backend doesn't have filtering yet: Parameter is ignored, no issues - If backend has filtering: Platform-based filtering works immediately --- **Related**: Backend PR #102013 (independent, can merge in any order)
1 parent fc5f5fd commit 6c80168

File tree

1 file changed

+13
-3
lines changed
  • static/app/views/settings/projectDebugFiles

1 file changed

+13
-3
lines changed

static/app/views/settings/projectDebugFiles/index.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ function makeDebugFilesQueryKey({
4848
return [`/projects/${orgSlug}/${projectSlug}/files/dsyms/`, {query}];
4949
}
5050

51-
function makeSymbolSourcesQueryKey({orgSlug}: {orgSlug: string}): ApiQueryKey {
52-
return [`/organizations/${orgSlug}/builtin-symbol-sources/`];
51+
function makeSymbolSourcesQueryKey({
52+
orgSlug,
53+
platform,
54+
}: {
55+
orgSlug: string;
56+
platform?: string;
57+
}): ApiQueryKey {
58+
return [`/organizations/${orgSlug}/builtin-symbol-sources/`, {query: {platform}}];
5359
}
5460

5561
export default function ProjectDebugSymbols() {
@@ -89,7 +95,10 @@ export default function ProjectDebugSymbols() {
8995
isError: isErrorSymbolSources,
9096
refetch: refetchSymbolSources,
9197
} = useApiQuery<BuiltinSymbolSource[] | null>(
92-
makeSymbolSourcesQueryKey({orgSlug: organization.slug}),
98+
makeSymbolSourcesQueryKey({
99+
orgSlug: organization.slug,
100+
platform: project.platform,
101+
}),
93102
{
94103
staleTime: 0,
95104
enabled: hasSymbolSourcesFeatureFlag,
@@ -135,6 +144,7 @@ export default function ProjectDebugSymbols() {
135144
queryClient.invalidateQueries({
136145
queryKey: makeSymbolSourcesQueryKey({
137146
orgSlug: organization.slug,
147+
platform: project.platform,
138148
}),
139149
});
140150
},

0 commit comments

Comments
 (0)