Skip to content

feat(issues): Remove checks for issue view ai title#109704

Merged
scttcper merged 1 commit intomasterfrom
scttcper/ga-issue-view-title-backend
Mar 4, 2026
Merged

feat(issues): Remove checks for issue view ai title#109704
scttcper merged 1 commit intomasterfrom
scttcper/ga-issue-view-title-backend

Conversation

@scttcper
Copy link
Member

@scttcper scttcper commented Mar 2, 2026

feature is GA

@scttcper scttcper requested a review from a team March 2, 2026 20:05
@scttcper scttcper requested a review from a team as a code owner March 2, 2026 20:05
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 2, 2026
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.

manager.add("organizations:invite-members", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=True)
# Enable rate limits for inviting members.
manager.add("organizations:invite-members-rate-limits", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=False)
# Enable AI-generated titles for issue views
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing backend flag breaks frontend feature gate check

High Severity

The organizations:issue-view-ai-title feature flag is removed from the backend, but the frontend in useGenerateIssueViewTitle.tsx still gates the API call on organization.features.includes('issue-view-ai-title'). Since the flag is no longer registered, it will never appear in the organization's feature list, so hasGenerateIssueViewTitleFeature will always be false and the query will never fire. This completely disables AI title generation for all users rather than making it GA.

Additional Locations (1)

Fix in Cursor Fix in Web

Comment on lines 158 to 163
manager.add("organizations:invite-members", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=True)
# Enable rate limits for inviting members.
manager.add("organizations:invite-members-rate-limits", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=False)
# Enable AI-generated titles for issue views
manager.add("organizations:issue-view-ai-title", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
manager.add("organizations:mep-use-default-tags", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable Session Stats down to a minute resolution
manager.add("organizations:minute-resolution-sessions", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: The frontend still checks for the issue-view-ai-title feature flag, which is being removed from the backend, effectively disabling the feature for all users.
Severity: HIGH

Suggested Fix

Remove the feature flag check organization.features.includes('issue-view-ai-title') from the frontend code in static/app/views/issueList/utils/useGenerateIssueViewTitle.tsx. The hasGenerateIssueViewTitleFeature constant should be determined by !organization.hideAiFeatures alone, as the feature is now generally available.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/sentry/features/temporary.py#L158-L163

Potential issue: The pull request removes the backend feature flag
`organizations:issue-view-ai-title` to make the AI title generation feature generally
available. However, the frontend code in `useGenerateIssueViewTitle.tsx` still checks if
`organization.features` includes `issue-view-ai-title`. Because the backend serializer
only sends registered features to the frontend, and this flag is no longer registered,
the check will always evaluate to `false`. This will incorrectly disable the AI title
generation feature for all users, preventing them from accessing it.

Did we get this right? 👍 / 👎 to inform future reviews.

@scttcper scttcper merged commit 692ebde into master Mar 4, 2026
77 checks passed
@scttcper scttcper deleted the scttcper/ga-issue-view-title-backend branch March 4, 2026 17:48
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants