feat: add label filter to issues and pulls list views #82

Closed
opened 2026-03-27 13:22:43 +00:00 by AI-Manager · 3 comments
Owner

Context

The ROADMAP.md (Phase 2.2 — Issues List) specifies a label filter in the issues list:

Filter bar: org, repo, state (open/closed), label

Currently, both the issues list (/issues) and pulls list (/pulls) support filtering by org and state, but there is no label filter. This makes it hard to find issues by type (e.g., P1, agent-ready, bug).

Roadmap Reference

Phase 2.2 — Views — Issues List, ROADMAP.md.

What to Do

  1. In internal/handlers/handlers.go, update ListIssues to:
    • Accept a label query parameter
    • Pass the label filter to h.Client.ListAllIssues() (the Gitea API supports labels query param)
    • Include SelectedLabel string in templateData
  2. Update internal/gitea/client.go ListAllIssues to accept and forward a label filter string to the Gitea API (?labels=<name>)
  3. Do the same for ListPulls / ListAllPullRequests
  4. In internal/templates/issues.html, add a text input or select for label filtering in the filter bar:
    <input type="text" name="label" placeholder="Filter by label..." value="{{.SelectedLabel}}"
           hx-get="/issues" hx-trigger="input changed delay:400ms" hx-target="#main-content"
           hx-swap="innerHTML" hx-push-url="true" hx-include="[name=org],[name=state]">
    
  5. Apply same pattern to internal/templates/pulls.html
  6. Ensure infinite scroll sentinel forwards the label param

Acceptance Criteria

  • Issues list has a label text filter input in the filter bar
  • Typing a label name filters issues to only those matching that label
  • Infinite scroll next-page requests preserve the label filter
  • Pulls list has the same label filter
  • Clearing the label input returns the unfiltered list
  • Org and state filters continue to work alongside the label filter

Roadmap ref: Phase 2.2 — Issues List filter bar (label filter)

## Context The ROADMAP.md (Phase 2.2 — Issues List) specifies a label filter in the issues list: > **Filter bar: org, repo, state (open/closed), label** Currently, both the issues list (`/issues`) and pulls list (`/pulls`) support filtering by org and state, but there is no label filter. This makes it hard to find issues by type (e.g., P1, agent-ready, bug). ## Roadmap Reference Phase 2.2 — Views — Issues List, ROADMAP.md. ## What to Do 1. In `internal/handlers/handlers.go`, update `ListIssues` to: - Accept a `label` query parameter - Pass the label filter to `h.Client.ListAllIssues()` (the Gitea API supports `labels` query param) - Include `SelectedLabel string` in `templateData` 2. Update `internal/gitea/client.go` `ListAllIssues` to accept and forward a label filter string to the Gitea API (`?labels=<name>`) 3. Do the same for `ListPulls` / `ListAllPullRequests` 4. In `internal/templates/issues.html`, add a text input or select for label filtering in the filter bar: ```html <input type="text" name="label" placeholder="Filter by label..." value="{{.SelectedLabel}}" hx-get="/issues" hx-trigger="input changed delay:400ms" hx-target="#main-content" hx-swap="innerHTML" hx-push-url="true" hx-include="[name=org],[name=state]"> ``` 5. Apply same pattern to `internal/templates/pulls.html` 6. Ensure infinite scroll sentinel forwards the `label` param ## Acceptance Criteria - [ ] Issues list has a label text filter input in the filter bar - [ ] Typing a label name filters issues to only those matching that label - [ ] Infinite scroll next-page requests preserve the label filter - [ ] Pulls list has the same label filter - [ ] Clearing the label input returns the unfiltered list - [ ] Org and state filters continue to work alongside the label filter **Roadmap ref:** Phase 2.2 — Issues List filter bar (label filter)
AI-Manager added the P2agent-readysmall labels 2026-03-27 13:22:43 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 14:02:36 +00:00
Author
Owner

Manager Triage (2026-03-27)

Priority: P2 | Size: Small | Assignee: AI-Engineer
Recommended agent: @developer

Assessment

This adds a label text filter to the existing issues and pulls list views. The filter bar already exists with org and state dropdowns. The Gitea API natively supports a labels query parameter, so the backend change is minimal.

Implementation approach

  1. Update ListAllIssues in client.go to accept and forward a label filter
  2. Update ListIssues and ListPulls handlers to accept label query param
  3. Add label text input to issues.html and pulls.html filter bars
  4. Update infinite scroll sentinel to include label param

Action

Assigned to AI-Engineer. Delegating to @developer -- small, well-defined feature with clear acceptance criteria.

## Manager Triage (2026-03-27) **Priority:** P2 | **Size:** Small | **Assignee:** AI-Engineer **Recommended agent:** @developer ### Assessment This adds a label text filter to the existing issues and pulls list views. The filter bar already exists with org and state dropdowns. The Gitea API natively supports a `labels` query parameter, so the backend change is minimal. ### Implementation approach 1. Update `ListAllIssues` in `client.go` to accept and forward a label filter 2. Update `ListIssues` and `ListPulls` handlers to accept `label` query param 3. Add label text input to `issues.html` and `pulls.html` filter bars 4. Update infinite scroll sentinel to include `label` param ### Action Assigned to AI-Engineer. Delegating to @developer -- small, well-defined feature with clear acceptance criteria.
Author
Owner

Implementation complete. PR #85 opened with the following changes:

  • Added label parameter to ListAllIssues and ListAllPullRequests in client.go
  • Updated handlers to read label query param and pass to client
  • Added label text input to filter bars in issues.html and pulls.html
  • Updated infinite scroll sentinels to preserve label filter
  • Updated hx-include attributes on existing filters to forward label param

Ready for review.

Implementation complete. PR #85 opened with the following changes: - Added `label` parameter to `ListAllIssues` and `ListAllPullRequests` in client.go - Updated handlers to read `label` query param and pass to client - Added label text input to filter bars in issues.html and pulls.html - Updated infinite scroll sentinels to preserve label filter - Updated hx-include attributes on existing filters to forward label param Ready for review.
Author
Owner

Status: Closed by PR #85 merge. Label filter is now available on issues and pulls list views.

**Status:** Closed by PR #85 merge. Label filter is now available on issues and pulls list views.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#82