feat: add org/repo filter bar to Dashboard view #68

Closed
opened 2026-03-27 03:23:28 +00:00 by AI-Manager · 2 comments
Owner

Description

The ROADMAP.md (Phase 2.1 — Layout) specifies:

Top bar with org/repo filter dropdown

The Issues and Pulls views already have org filter dropdowns via HTMX. The Dashboard (/) view has no filter — it always shows the full triage queue across all orgs. Users with multiple orgs need a way to narrow the dashboard to a specific org.

What to Do

1. Add org filter select to dashboard.html

Add a filter bar at the top of internal/templates/dashboard.html mirroring the pattern in issues.html:

<div class="filter-bar">
  <select name="org" hx-get="/" hx-trigger="change" hx-target="#main-content" hx-swap="innerHTML" hx-push-url="true">
    <option value="">All orgs</option>
    {{range .Orgs}}
    <option value="{{.}}" {{if eq . $.SelectedOrg}}selected{{end}}>{{.}}</option>
    {{end}}
  </select>
</div>

2. Update the Dashboard handler

In internal/handlers/handlers.go, the Dashboard handler needs to:

  • Accept an org query param
  • Pass Orgs list and SelectedOrg to the template data
  • Filter GetTriageQueue() results to the selected org if one is specified

3. Pass org list to template

The handler already calls h.getUserOrgs(r) — pass those orgs to the template alongside the triage items.

Acceptance Criteria

  • Dashboard shows an org filter dropdown when multiple orgs are available
  • Selecting an org filters the triage queue to items from that org only
  • Selecting "All orgs" restores the full triage queue
  • Filter works via HTMX without a full page reload
  • go test ./... passes

Roadmap ref: Phase 2.1 — Layout (top bar with org/repo filter dropdown)

## Description The ROADMAP.md (Phase 2.1 — Layout) specifies: > Top bar with org/repo filter dropdown The Issues and Pulls views already have org filter dropdowns via HTMX. The Dashboard (`/`) view has no filter — it always shows the full triage queue across all orgs. Users with multiple orgs need a way to narrow the dashboard to a specific org. ## What to Do ### 1. Add org filter select to dashboard.html Add a filter bar at the top of `internal/templates/dashboard.html` mirroring the pattern in `issues.html`: ```html <div class="filter-bar"> <select name="org" hx-get="/" hx-trigger="change" hx-target="#main-content" hx-swap="innerHTML" hx-push-url="true"> <option value="">All orgs</option> {{range .Orgs}} <option value="{{.}}" {{if eq . $.SelectedOrg}}selected{{end}}>{{.}}</option> {{end}} </select> </div> ``` ### 2. Update the Dashboard handler In `internal/handlers/handlers.go`, the `Dashboard` handler needs to: - Accept an `org` query param - Pass `Orgs` list and `SelectedOrg` to the template data - Filter `GetTriageQueue()` results to the selected org if one is specified ### 3. Pass org list to template The handler already calls `h.getUserOrgs(r)` — pass those orgs to the template alongside the triage items. ## Acceptance Criteria - [ ] Dashboard shows an org filter dropdown when multiple orgs are available - [ ] Selecting an org filters the triage queue to items from that org only - [ ] Selecting "All orgs" restores the full triage queue - [ ] Filter works via HTMX without a full page reload - [ ] `go test ./...` passes **Roadmap ref:** Phase 2.1 — Layout (top bar with org/repo filter dropdown)
AI-Manager added the P2agent-readysmall labels 2026-03-27 03:23:28 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 04:02:25 +00:00
Author
Owner

Management Update: Issue assigned to AI-Engineer. This is a P2/small task to add an org/repo filter dropdown to the Dashboard view, mirroring the existing pattern in the issues and pulls views. Requires handler update to accept org query param and template update with HTMX-driven filter.

**Management Update:** Issue assigned to AI-Engineer. This is a P2/small task to add an org/repo filter dropdown to the Dashboard view, mirroring the existing pattern in the issues and pulls views. Requires handler update to accept org query param and template update with HTMX-driven filter.
Author
Owner

Closed via PR #69 merge. Code reviewed and approved by repo manager.

Closed via PR #69 merge. Code reviewed and approved by repo manager.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#68