Skip to content

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Feb 12, 2026

No description provided.

@ryan953 ryan953 requested review from a team as code owners February 12, 2026 01:09
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 12, 2026
ConfigStore.set('user', UserFixture({isSuperuser: true}));

const provider = {slug: 'github'};
const configUrl = `/api/0/organizations/${org.slug}/integrations/?provider_key=${provider.slug}&includeConfig=0`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the /api/0 prefix isn't needed.

We'll add the baseUrl if it's missing: https://github.com/getsentry/sentry/blob/master/static/app/api.tsx#L190-L215

Copy link
Member Author

@ryan953 ryan953 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was returning undefined for payload type, and complaining about having a TApiPath in the query.

The problem seemed to be that we were setting queryKey: [path] in the case when skipToken is used. So i changed it up, when we have skipToken we'll still try to generate the ApiUrl with getApiUrl(), which now accepts a skipToken as well, and will return the unmodified path. So at least we can pass the correct type into queryKey. Also we'll set enabled: false now, in addition to passing queryFn: skipToken

meta: EventsMetaType;
}>(
[
`/api/0/organizations/${organization.slug}/spans-samples/`,
Copy link
Member Author

@ryan953 ryan953 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix /api/0 is auto-added. not needed here


const appSizeQuery: UseApiQueryResult<AppSizeApiResponse, RequestError> =
useApiQuery<AppSizeApiResponse>(
// @ts-expect-error TODO(ryan953): Invalid useApiQuery path (should be organization prefix?)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +32 to 33
// @ts-expect-error TODO(ryan953): Invalid useApiQuery path
`/projects/${organization.slug}/pullrequest-details/${params.repoOrg}/${params.repoName}/${params.prId}/`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @rbro112

take a look at this url

Comment on lines +38 to 39
// @ts-expect-error TODO(ryan953): Invalid useApiQuery path
`/organizations/${orgSlug}/seer/explorer-chat/${runId ? `${runId}/` : ''}`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @aliu39 take a look at this url. when runId is undefined i think we should be hitting /explorer-update/$runId/ or /explorer-chat/$runId (and this one is missing the trailing slash in urls.py)

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant