Skip to content

feat(pr iteration): add github app permission nudge to autofix drawer#119059

Merged
joseph-sentry merged 9 commits into
masterfrom
joey--github-app-nudge-fe
Jul 6, 2026
Merged

feat(pr iteration): add github app permission nudge to autofix drawer#119059
joseph-sentry merged 9 commits into
masterfrom
joey--github-app-nudge-fe

Conversation

@joseph-sentry

@joseph-sentry joseph-sentry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

deps on #119052

creates a alert at the top of the autofix drawer if autofix endpoint returns github_app_permission warnings

on clicking "update permissions" button, it will open a modal to confirm

if there are multiple installations clicking the button in the modal will take the
user to the github configuration page (in a future change we'll add buttons to update permissions for each installation on that page)

if there's only one installation to update, clicking the button will take the user directly to the github update permissions page


alert in autofix drawer

image

modal after clicking "update permissions"

image

logic for commenting on autofix PRs during PR iteration
when tool calls fail potentially due to out of date github app
permissions

logic for passing "warnings" back from group ai autofix GET endpoint
specifically for failed tool calls potentially due to out of date github app
permissions
@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

@alexsohn1126 alexsohn1126 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i only looked at the frontend files (assuming other python files are for #119052), everything looks good other than a couple of pointers!

Comment on lines +152 to +157
const WarningsWrapper = styled('div')`
padding: ${p => p.theme.space.md} 24px 0;
display: flex;
flex-direction: column;
gap: ${p => p.theme.space.md};
`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For this I think you can use <Alert.Container> or just use <Flex gap="md" [...]>

Comment on lines +193 to +196
const configurationUrl = `/settings/${organization.slug}/integrations/github/?tab=configurations`;

return (
<LinkButton href={configurationUrl} variant="primary" size="xs">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in devenvs we have the org slug after the domain name but in SaaS we have it in the domain name (e.g. my-org.sentry.io)

i asked claude and seems like changing LinkButton href=[...] to LinkButton to=[...] works? worth double-checking 👀

@joseph-sentry joseph-sentry marked this pull request as ready for review July 6, 2026 16:43
@joseph-sentry joseph-sentry requested review from a team as code owners July 6, 2026 16:43
Comment thread static/app/components/events/autofix/v3/drawer.tsx
Comment thread static/app/components/events/autofix/v3/drawer.tsx
Comment thread static/app/components/events/autofix/v3/drawer.tsx
Comment thread static/app/components/events/autofix/v3/drawer.tsx Outdated
Comment thread static/app/components/events/autofix/v3/drawer.tsx Outdated
Comment thread static/app/components/events/autofix/v3/drawer.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e88e2ca. Configure here.

});

if (!warnings.length || isDismissed) {
return null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dismissal hides subsequent permission warnings

Medium Severity

AutofixWarnings stores dismissal for seven days under a fixed key per org and issue, and returns nothing whenever isDismissed is true. After the user dismisses once, later github_app_permissions warnings from polling (extra repos or a new failure after warnings cleared) stay hidden until expiry, so the nudge can miss active permission problems.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e88e2ca. Configure here.

@joseph-sentry joseph-sentry merged commit ab36dbf into master Jul 6, 2026
78 checks passed
@joseph-sentry joseph-sentry deleted the joey--github-app-nudge-fe branch July 6, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants