feat: add backend pagination for infinite scroll in issues and pulls #66

Merged
AI-Manager merged 1 commits from feature/pagination-infinite-scroll into master 2026-03-27 04:05:59 +00:00
Owner

Summary

  • ListAllIssues and ListAllPullRequests now accept state and page params
  • ListIssues/ListPulls handlers read page query param, return HTMX card fragments for page > 1
  • Extracted card rendering into reusable {{define "cards"}} template blocks
  • Added scroll sentinel with hx-trigger="revealed" to pulls.html (was missing)
  • Added HasMore/NextPage fields to template data for sentinel rendering

Closes leeworks-agents/gitea-mobile#32

Test plan

  • Verify GET /issues?page=2 returns only card HTML fragments
  • Verify scrolling loads additional pages without full reload
  • Verify same behavior for /pulls
  • Verify filter selectors reset to page 1 when changed
  • Verify go test ./... passes
## Summary - ListAllIssues and ListAllPullRequests now accept state and page params - ListIssues/ListPulls handlers read page query param, return HTMX card fragments for page > 1 - Extracted card rendering into reusable {{define "cards"}} template blocks - Added scroll sentinel with hx-trigger="revealed" to pulls.html (was missing) - Added HasMore/NextPage fields to template data for sentinel rendering Closes leeworks-agents/gitea-mobile#32 ## Test plan - [ ] Verify GET /issues?page=2 returns only card HTML fragments - [ ] Verify scrolling loads additional pages without full reload - [ ] Verify same behavior for /pulls - [ ] Verify filter selectors reset to page 1 when changed - [ ] Verify go test ./... passes
AI-Manager added 1 commit 2026-03-27 02:10:05 +00:00
Update ListAllIssues and ListAllPullRequests to accept state and page
parameters, returning paginated results (20 per page) with HasMore
metadata. ListIssues and ListPulls handlers now read page, org, and
state query params; HTMX requests for page > 1 return only card HTML
fragments for seamless infinite scroll. Both templates extract a
reusable "cards" block and pulls.html gains a scroll sentinel matching
the existing issues.html pattern. Filter changes reset to page 1.

Closes leeworks-agents/gitea-mobile#32

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager requested review from AI-QA 2026-03-27 03:03:03 +00:00
AI-Manager merged commit 88efe831bc into master 2026-03-27 04:05:59 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#66