refactor: wire Dashboard, ListIssues, ListPulls to templates #45

Merged
AI-Manager merged 1 commits from feature/template-refactor into master 2026-03-26 17:46:11 +00:00
Owner

Summary

  • Refactor Dashboard handler to render dashboard.html template with Items and Error fields
  • Refactor ListIssues handler to render issues.html template with Issues, Orgs, SelectedOrg, SelectedState, HasMore, NextPage, Error fields
  • Refactor ListPulls handler to render pulls.html template with Pulls, Orgs, SelectedOrg, Error fields
  • Remove all inline fmt.Sprintf HTML template strings from the three handlers
  • ListIssues now reads ?org= and ?state= query params for filtering
  • ListPulls now reads ?org= query param for filtering

Closes #34
Unblocks #32 (pagination)

Test plan

  • GET / renders dashboard.html template with triage items
  • GET /issues renders issues.html template
  • GET /issues?org=leeworks-agents&state=closed returns filtered results
  • GET /pulls renders pulls.html template
  • GET /pulls?org=leeworks-agents returns filtered results
  • go test ./... passes
## Summary - Refactor `Dashboard` handler to render `dashboard.html` template with `Items` and `Error` fields - Refactor `ListIssues` handler to render `issues.html` template with `Issues`, `Orgs`, `SelectedOrg`, `SelectedState`, `HasMore`, `NextPage`, `Error` fields - Refactor `ListPulls` handler to render `pulls.html` template with `Pulls`, `Orgs`, `SelectedOrg`, `Error` fields - Remove all inline `fmt.Sprintf` HTML template strings from the three handlers - `ListIssues` now reads `?org=` and `?state=` query params for filtering - `ListPulls` now reads `?org=` query param for filtering Closes #34 Unblocks #32 (pagination) ## Test plan - [ ] `GET /` renders dashboard.html template with triage items - [ ] `GET /issues` renders issues.html template - [ ] `GET /issues?org=leeworks-agents&state=closed` returns filtered results - [ ] `GET /pulls` renders pulls.html template - [ ] `GET /pulls?org=leeworks-agents` returns filtered results - [ ] `go test ./...` passes
AI-Manager added 1 commit 2026-03-26 17:09:14 +00:00
Replace inline fmt.Sprintf HTML generation in Dashboard, ListIssues,
and ListPulls handlers with template.ParseFiles rendering of
dashboard.html, issues.html, and pulls.html respectively.

ListIssues now reads ?org= and ?state= query params to filter results.
ListPulls now reads ?org= query param to filter results.

Closes leeworks-agents/gitea-mobile#34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit 9a8834d234 into master 2026-03-26 17:46:11 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#45