feat(issues): Remove checks for issue view ai title#109704
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)
| 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) |
There was a problem hiding this comment.
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.


feature is GA