Skip to content

fix(attribute-breakdowns): Store breakdown pagination in URL#118233

Merged
nsdeschenes merged 12 commits into
masterfrom
nd/EXP-1018/fix-attribute-breakdown-frontend-pagination
Jun 25, 2026
Merged

fix(attribute-breakdowns): Store breakdown pagination in URL#118233
nsdeschenes merged 12 commits into
masterfrom
nd/EXP-1018/fix-attribute-breakdown-frontend-pagination

Conversation

@nsdeschenes

@nsdeschenes nsdeschenes commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR updates attribute breakdowns to only request the visible page size and use API cursors directly instead of keeping local pages.

Migrate search and pagination state to live in nuqs-backed URL params, and page-level filters reset the breakdown cursor so filter/search changes return to the first page.

Also, migrating the comparison breakdown query hook now uses apiOptions/selectJsonWithHeaders so both body and headers stay available consistently, and regression coverage asserts limit, cursor navigation, and search reset behavior.

Closes EXP-1018

nsdeschenes and others added 4 commits June 22, 2026 15:37
Move attribute breakdown search and cursor state into nuqs so pagination can be linked and reset from page-level filters. Keep the debounced search hook for request updates while clearing the cursor when the search changes.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
Assert that attribute breakdown pagination writes the cursor to the URL and that changing the search clears it while updating the breakdown query parameter.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

EXP-1018

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 23, 2026
Clear the URL-backed breakdown cursor when the Explore spans query, page filters, or debounced breakdown search changes. Also reset the same cursor from the spans search submit path so API pagination cannot reuse a cursor from the previous cohort query.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
Route breakdown cursor and search state through the spans query param context so cohort query changes and page filters clear stale breakdown pagination in the same path as the table cursors.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
nsdeschenes and others added 2 commits June 23, 2026 09:57
Clear the breakdown cursor when the previous pagination link points back to the first page so returning from page two reuses the uncursored first-page query.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>

@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 af53c69. Configure here.

Comment thread static/app/views/explore/hooks/useAttributeBreakdownComparison.tsx
Read ranked attributes and cohort totals from the API response json payload so issue detail attribute comparison renders the returned charts again.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
Leave breakdown cursor and search values undefined when their URL params are absent so non-breakdown pages do not synthesize breakdown state.

Refs EXP-1018
Co-Authored-By: Codex <noreply@openai.com>
@nsdeschenes nsdeschenes marked this pull request as ready for review June 23, 2026 15:04
@nsdeschenes nsdeschenes requested review from a team as code owners June 23, 2026 15:04
Comment thread static/app/views/explore/queryParams/context.tsx

@Abdkhan14 Abdkhan14 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.

@nsdeschenes thanks for this. I'd verify two things:

  • box persistence on refresh
  • back btn navigation to prev box state

@nsdeschenes nsdeschenes merged commit adf50f9 into master Jun 25, 2026
76 checks passed
@nsdeschenes nsdeschenes deleted the nd/EXP-1018/fix-attribute-breakdown-frontend-pagination branch June 25, 2026 16:24
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.

2 participants