Skip to content

ref(flags): Remove organizations:dashboards-starred-reordering (backend)#114817

Open
wedamija wants to merge 3 commits intomasterfrom
flag-cleanup/organizations-dashboards-starred-reordering-backend
Open

ref(flags): Remove organizations:dashboards-starred-reordering (backend)#114817
wedamija wants to merge 3 commits intomasterfrom
flag-cleanup/organizations-dashboards-starred-reordering-backend

Conversation

@wedamija
Copy link
Copy Markdown
Member

@wedamija wedamija commented May 4, 2026

The flag scanner classified this as flagpole-disabled. The flag gated new dashboard reordering endpoints and per-user last_visited plumbing.

Removes:

  • OrganizationDashboardsStarredEndpoint + Order endpoint (always 404)
  • URL routes and imports
  • features.has() gates in organization_dashboards and organization_dashboard_details (keeps the disabled/else paths)
  • mostFavorited and user-specific recentlyViewed sort branches
  • Dashboard serializer per-user last_visited annotation
  • Tests that exercised the flag-enabled paths

Frontend changes ship in a separate PR.

The flag scanner classified this as flagpole-disabled. The flag gated
new dashboard reordering endpoints and per-user last_visited plumbing.

Removes:
- OrganizationDashboardsStarredEndpoint + Order endpoint (always 404)
- URL routes and imports
- features.has() gates in organization_dashboards and
  organization_dashboard_details (keeps the disabled/else paths)
- mostFavorited and user-specific recentlyViewed sort branches
- Dashboard serializer per-user last_visited annotation
- Tests that exercised the flag-enabled paths

Frontend changes ship in a separate PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wedamija wedamija requested a review from a team as a code owner May 4, 2026 23:24
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 4, 2026
@getsantry getsantry Bot requested a review from a team as a code owner May 4, 2026 23:28
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🚨 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.40%

Copy link
Copy Markdown
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.

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 2a18f5d. Configure here.


class DashboardListSerializer(Serializer, DashboardFiltersMixin):
def get_attrs(self, item_list, user, **kwargs):
organization = kwargs.get("context", {}).get("organization")
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.

Unnecessary prefetch of removed feature's data

Low Severity

The prefetch_related_objects call still includes "dashboardlastvisited_set__member", but the only code that consumed this prefetched data (the per-user last_visited lookup inside the feature flag check) was removed in this same PR. This causes unnecessary database queries—joining DashboardLastVisited and OrganizationMember—on every dashboard list request, with no code ever reading the results.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2a18f5d. Configure here.

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.

1 participant