feat: add open/closed state filter to PR list view #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The issues list view already supports filtering by state (open/closed) via a filter bar select, but the PR list view (
/pulls) hardcodes"open"in theListAllPullRequestscall. Users cannot view merged or closed PRs.What to Change
internal/handlers/handlers.goListPullshandler:statequery param (default to"open"if absent or invalid)h.Client.ListAllPullRequests(..., state, page)instead of the hardcoded"open"internal/templates/pulls.html:<select>to the filter bar (mirroring the one inissues.html)hx-include="[name='org']"on the state selecthx-getAcceptance Criteria
/pulls?state=openshows open PRs (default behavior unchanged)/pulls?state=closedshows closed/merged PRsstateparam so next page loads correct resultsRoadmap ref: Phase 2.2 — PR List view
Related: mirrors the state filter already implemented in issues list view
Triage: P2/small. Straightforward feature -- add state query param to ListPulls handler and a select element to the pulls template, mirroring the existing issues filter. Assigning to @developer.
Triage (repo-manager): Assigned to @developer agent.
ListPullshandler and a state select widget inpulls.htmltemplate, matching the existing pattern in issues.Status update (repo-manager): Implementation complete.
PR #75 has been created with the following changes:
internal/handlers/handlers.go: AddedSelectedStatefield topullsDatastruct, readstatequery param (default"open"), pass it toListAllPullRequestsinstead of hardcoded valueinternal/templates/pulls.html: Added state<select>to filter bar withhx-include, updated scroll sentinel to preserve state param, updated empty-state messageThis mirrors the existing pattern from the issues list view. Build passes. Awaiting review.