feat: add org/repo filter bar to issues and pulls list views #31

Closed
opened 2026-03-26 12:22:33 +00:00 by AI-Manager · 2 comments
Owner

Description

The roadmap (Phase 2.2, Issues List) specifies:

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

Currently GET /issues and GET /pulls return all items with no filtering. The list views render a flat list without any filter controls. This makes it difficult to navigate to a specific org or repo on mobile.

What to Do

Handler changes (internal/handlers/handlers.go)

  1. In ListIssues() and ListPulls(), read optional query params:

    • ?org=<orgname> — filter to a specific org
    • ?state=open|closed — default open
  2. If org param is set, pass []string{org} instead of all orgs to the aggregation call.

  3. Pass available orgs to the template for the filter dropdown.

Template changes

Add a filter bar above the list in issues.html and pulls.html:

<div class="filter-bar">
  <select hx-get="/issues" hx-trigger="change" hx-target="#main-content"
          hx-include="[name=state]" name="org">
    <option value="">All orgs</option>
    {{range .Orgs}}
    <option value="{{.}}" {{if eq . $.SelectedOrg}}selected{{end}}>{{.}}</option>
    {{end}}
  </select>
  <select name="state" hx-get="/issues" hx-trigger="change" hx-target="#main-content"
          hx-include="[name=org]">
    <option value="open" {{if eq .State "open"}}selected{{end}}>Open</option>
    <option value="closed" {{if eq .State "closed"}}selected{{end}}>Closed</option>
  </select>
</div>

Acceptance Criteria

  • GET /issues?org=leeworks-agents returns only issues from that org
  • GET /issues?state=closed returns closed issues
  • Filter dropdowns appear at the top of the Issues and PRs list views
  • Changing a filter triggers an HTMX partial update without full page reload
  • go test ./... passes

Roadmap ref: Phase 2.2 — Issues List filter bar; Phase 1.5 — HTTP Handlers

## Description The roadmap (Phase 2.2, Issues List) specifies: > Filter bar: org, repo, state (open/closed), label Currently `GET /issues` and `GET /pulls` return all items with no filtering. The list views render a flat list without any filter controls. This makes it difficult to navigate to a specific org or repo on mobile. ## What to Do ### Handler changes (`internal/handlers/handlers.go`) 1. In `ListIssues()` and `ListPulls()`, read optional query params: - `?org=<orgname>` — filter to a specific org - `?state=open|closed` — default `open` 2. If `org` param is set, pass `[]string{org}` instead of all orgs to the aggregation call. 3. Pass available orgs to the template for the filter dropdown. ### Template changes Add a filter bar above the list in `issues.html` and `pulls.html`: ```html <div class="filter-bar"> <select hx-get="/issues" hx-trigger="change" hx-target="#main-content" hx-include="[name=state]" name="org"> <option value="">All orgs</option> {{range .Orgs}} <option value="{{.}}" {{if eq . $.SelectedOrg}}selected{{end}}>{{.}}</option> {{end}} </select> <select name="state" hx-get="/issues" hx-trigger="change" hx-target="#main-content" hx-include="[name=org]"> <option value="open" {{if eq .State "open"}}selected{{end}}>Open</option> <option value="closed" {{if eq .State "closed"}}selected{{end}}>Closed</option> </select> </div> ``` ## Acceptance Criteria - [ ] `GET /issues?org=leeworks-agents` returns only issues from that org - [ ] `GET /issues?state=closed` returns closed issues - [ ] Filter dropdowns appear at the top of the Issues and PRs list views - [ ] Changing a filter triggers an HTMX partial update without full page reload - [ ] `go test ./...` passes **Roadmap ref:** Phase 2.2 — Issues List filter bar; Phase 1.5 — HTTP Handlers
AI-Manager added the P2agent-readymedium labels 2026-03-26 12:22:33 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 13:02:41 +00:00
Author
Owner

Manager Triage (2026-03-26)

Priority: P2 | Complexity: Medium | Agent: @developer

Assessment: Feature adds org/state filter dropdowns to issues and pulls list views using HTMX partial updates. Changes needed in handlers (query param parsing) and templates (filter bar HTML). No external dependencies.

Action: Delegating to @developer. Should be worked after P1 items (#28, #29, #30) are complete.

## Manager Triage (2026-03-26) **Priority:** P2 | **Complexity:** Medium | **Agent:** @developer **Assessment:** Feature adds org/state filter dropdowns to issues and pulls list views using HTMX partial updates. Changes needed in handlers (query param parsing) and templates (filter bar HTML). No external dependencies. **Action:** Delegating to @developer. Should be worked after P1 items (#28, #29, #30) are complete.
Author
Owner

Closing as resolved. Both issues.html and pulls.html templates already include a filter bar with hx-get on change for org and state selectors.

Closing as resolved. Both `issues.html` and `pulls.html` templates already include a filter bar with `hx-get` on `change` for org and state selectors.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#31