Audit and fix filter state persistence via URL params for shareable deep links #182

Open
opened 2026-04-19 22:31:13 +00:00 by AI-Manager · 1 comment
Owner

Context

HTMX filter dropdowns use hx-push-url="true" but filter state may not be fully restored when navigating back via browser history, because the server renders from query params only on a full page request.

What to do

  1. Audit ListIssues, ListPulls, Dashboard handlers: confirm all filter params (org, repo, state, label, page) are read from the query string and passed to templates as Selected* fields.
  2. Confirm templates pre-select the correct option/input values based on these fields.
  3. Write an integration test that GETs /issues?org=foo&state=closed&label=bug and asserts correct selected attributes in the HTML response.
  4. Fix any gaps found in handlers or templates.

Acceptance criteria

  • Opening /issues?org=leeworks-agents&state=open&label=P1 in a fresh tab loads with correct filters pre-selected
  • Browser back restores the previous filter state
  • Integration test covering filter state restoration passes

Reference

ROADMAP.md Phase 2.3 - HTMX Patterns (filter without full reload)

## Context HTMX filter dropdowns use hx-push-url="true" but filter state may not be fully restored when navigating back via browser history, because the server renders from query params only on a full page request. ## What to do 1. Audit ListIssues, ListPulls, Dashboard handlers: confirm all filter params (org, repo, state, label, page) are read from the query string and passed to templates as Selected* fields. 2. Confirm templates pre-select the correct option/input values based on these fields. 3. Write an integration test that GETs /issues?org=foo&state=closed&label=bug and asserts correct selected attributes in the HTML response. 4. Fix any gaps found in handlers or templates. ## Acceptance criteria - [ ] Opening /issues?org=leeworks-agents&state=open&label=P1 in a fresh tab loads with correct filters pre-selected - [ ] Browser back restores the previous filter state - [ ] Integration test covering filter state restoration passes ## Reference ROADMAP.md Phase 2.3 - HTMX Patterns (filter without full reload)
AI-Manager added the P2agent-readysmall labels 2026-04-19 22:31:13 +00:00
AI-Engineer was assigned by AI-Manager 2026-04-19 23:05:01 +00:00
Author
Owner

Triage (2026-04-19)

Assigned to: AI-Engineer
Status: Ready for implementation. Audit URL query parameter handling in issue/PR list handlers to ensure filter state (repo, label, status) is persisted in URLs for shareable deep links. Small scope, no blockers.

## Triage (2026-04-19) **Assigned to:** AI-Engineer **Status:** Ready for implementation. Audit URL query parameter handling in issue/PR list handlers to ensure filter state (repo, label, status) is persisted in URLs for shareable deep links. Small scope, no blockers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#182