Skip to content

fix(bounties): restore pagination on IssuesList#1028

Open
blinkeye-lcm wants to merge 5 commits into
entrius:testfrom
blinkeye-lcm:fix/bounties-list-pagination
Open

fix(bounties): restore pagination on IssuesList#1028
blinkeye-lcm wants to merge 5 commits into
entrius:testfrom
blinkeye-lcm:fix/bounties-list-pagination

Conversation

@blinkeye-lcm
Copy link
Copy Markdown
Contributor

Summary

PR #983 removed the page state and <TablePagination> block from IssuesList without a replacement, so every bounty in the merged active/registered/history feed renders into the DOM on first paint. Restores client-side pagination using the existing ISSUES_DEFAULT_LIST_ROWS and ISSUES_DEFAULT_CARD_ROWS constants and the shared TablePagination component. Two small cleanups drop out of the same diff:

  • Promote TablePagination from src/components/miners/ to src/components/common/. The component contains no miner-specific code, and four components across two domains import it after this change: MinerPRsTable, MinerRepositoriesTable, MinerOpenDiscoveryIssuesByRepo, and IssuesList. The new home matches where every other shared table primitive lives. The move uses git mv so blame stays intact.
  • Reset the page through set-state-during-render rather than useEffect when filter, search, sort, or view changes. The stale, clamped page never gets committed, so a one-frame flash never reaches the user on filter switches.

Files touched:

  • src/components/issues/IssuesList.tsx (pagination restored, page reset, import path)
  • src/components/common/TablePagination.tsx (moved from src/components/miners/)
  • src/components/miners/MinerPRsTable.tsx (import path only)
  • src/components/miners/MinerRepositoriesTable.tsx (import path only)
  • src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx (import path only)

Related Issues

Closes #1027

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

Before

/bounties first paint materializes every BountyCard (card view) or <TableRow> (list view) at once. Multi-second layout work and jerky scroll on a feed with a few hundred completed bounties.

before1 before2

After

First paint shows the first 12 cards in card view or 10 rows in list view, with prev/next controls below. Filter, search, sort, and view-mode changes return to page 0 without a visible flash.

after1 after2

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 10, 2026
@ventura-oss
Copy link
Copy Markdown
Contributor

ventura-oss commented May 10, 2026

⚠️ Skipped during review — No CI checks have run on this PR. CI requires maintainer approval for first-time contributors and won't auto-run regardless of new pushes. A maintainer will approve the workflow run when ready to review.

Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

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

Please scope this down to what #1027 asks for.

Keep:

  • Pagination state in IssuesList.tsx with the set-state-during-render reset on filter/search/sort/view/pageSize change.
  • Promotion of TablePagination from src/components/miners/ to src/components/common/ and updated imports in the three existing callers.
  • Rows-per-page <Select> using the existing ISSUES_CARD_ROWS / ISSUES_LIST_ROWS constants.

Drop:

  • The new getDisplayRepositoryName() helper in src/utils/issueStatus.ts and all issue.repositoryFullNamegetDisplayRepositoryName(issue.repositoryFullName) swaps in BountyCard.tsx and IssuesList.tsx (search filter, sort key, chart aggregation, repository column). #1027 doesn't ask for an unknown-repository fallback.
  • The toolbar rendering change that makes inlineToolbar render unconditionally and treats the sidebar portal as additive. Keep the existing usePortal ? <Portal> : inlineToolbar split.

@blinkeye-lcm
Copy link
Copy Markdown
Contributor Author

Hi @anderdc
Thanks for your review. I’ve updated the PR with the requested changes. Could you please take another look when you have a moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounties page renders every bounty on first paint after PR #983 dropped pagination

3 participants