Skip to content

fix(projects): raise page size to 250 and add page controls - #147

Merged
HazAT merged 11 commits into
masterfrom
fix/uncap-project-list
Aug 18, 2026
Merged

fix(projects): raise page size to 250 and add page controls#147
HazAT merged 11 commits into
masterfrom
fix/uncap-project-list

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The projects page stopped at the first API page (limit max 50), so years with more than 50 projects hid the rest.

This change raises the API max and client page size to 250 so a typical Hackweek year fits in one request. If a result set still has more pages, the UI shows previous/next controls from nextCursor.

Test plan

  • npm run test:app
  • Open the current year projects page after deploy and confirm the full set loads in one request
  • Confirm pagination controls stay hidden under 250 results and work above that

Requested by telkins.

--

View Junior Session [Sentry]

sentry-junior Bot and others added 3 commits August 17, 2026 18:38
The projects page only requested the first API page, so years with more
than 50 projects hid the rest. Walk nextCursor until the full filtered
list is loaded.

Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>
Allow the projects API to return up to 250 items per request so current
Hackweek years fit in one fetch. Keep next/previous controls for any
result set that still returns a next cursor.

Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>
@sentry-junior sentry-junior Bot changed the title fix(projects): load every project page in the year list fix(projects): raise page size to 250 and add page controls Aug 17, 2026
@trevor-e
trevor-e marked this pull request as ready for review August 17, 2026 18:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 561a443. Configure here.

Comment thread src/worker/routes/projects.ts
sentry-junior Bot and others added 4 commits August 17, 2026 20:03
D1 allows at most 100 bound parameters per query. listProjects loads
members with IN (...), so page sizes above 100 failed. Chunk those
lookups and cover the path with a 101-project list test.

Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>
Merge the project pagination work with the latest ballot-aware project list while preserving vote-category badges and page controls. Keep both worker regression cases and make their generated year IDs sort consistently once the suite reaches double-digit cases.
Keep page controls rendered when a later cursor returns no results so users can navigate back. Move focus to the loaded result start only after placeholder data is replaced, and announce loading, completed ranges, and empty pages through the paginator status.\n\nCover empty-page recovery and deferred page transitions to prevent stale placeholder focus regressions.
Clear pending post-pagination focus whenever filters, year changes, or debounced search reset the cursor. This prevents replacement query results from stealing focus from the control that superseded an in-flight page request.

Add a race regression covering a kind filter change while the next page remains pending.

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

One accessibility race still needs fixing before approval.

P2 — src/app/routes/ProjectsPage.tsx search input: paginationRequestPending is cleared only when the 300 ms debounced search calls resetPagination. If a pending page request resolves after the user starts typing but before that debounce fires, the pagination effect focuses the results region and steals focus from the search field mid-entry. Clear the pending page-focus flag synchronously in the search input change path (while keeping the debounced request), and cover the delayed-page/search-input race.

Nonblocking: pagination currently exposes both the global updating… status and paginator loading page… status, causing duplicate screen-reader announcements.

Conflict resolution and the full local verification pipeline otherwise pass.

@sentry-junior

sentry-junior Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the accessibility race in 9b9134a:

  • clear pending pagination focus synchronously when the search input changes
  • keep the 300 ms debounced search request
  • avoid duplicate live-region announcements while pagination is visible
  • add a delayed-page/search-input regression that verifies focus stays in the search box

Checks: npm run test:app (62/62), npm run typecheck, npm run lint, and npm run format:check.

sentry-junior Bot and others added 3 commits August 18, 2026 14:19
The projects page stopped at the first API page, so years with more than
50 projects hid the rest. Raise the API max and client page size to 250,
add previous/next controls when a next cursor exists, batch member
lookups under D1's 100-parameter bind limit, and keep search focus when
a pending page load is superseded.

Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>
Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>
Co-Authored-By: Trevor Elkins <trevor.elkins@sentry.io>

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

JR’s follow-up fixes the remaining search-focus race by clearing pending pagination focus synchronously on input changes, and it removes the duplicate live announcement during paginated fetches.

Quick verification passed: 30 app route tests, 10 project worker tests, TypeScript, focused lint/format, and diff sanity checks. All 13 GitHub checks are green.

@HazAT
HazAT merged commit c5078de into master Aug 18, 2026
13 checks passed
@HazAT
HazAT deleted the fix/uncap-project-list branch August 18, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant