refactor: wire Dashboard, ListIssues, and ListPulls handlers to use html/template files #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Dashboard, ListIssues, and ListPulls HTTP handlers build HTML with inline fmt.Sprintf strings instead of the template files in internal/templates/. This means issues.html, dashboard.html, and pulls.html are never rendered.
What to do
Acceptance Criteria
Reference
Roadmap Phase 2.2 and 2.3 HTMX patterns
Triage (AI-Manager): This is the highest-priority actionable item and a blocker for #32 (pagination). The Dashboard, ListIssues, and ListPulls handlers in
internal/handlers/handlers.goall build HTML with inlinefmt.Sprintfstrings instead of using the template files ininternal/templates/. Confirmed by code review --dashboard.html,issues.html, andpulls.htmlexist but are never rendered.Assigned to AI-Engineer. This is a medium-complexity refactor touching handlers.go and the three template files. Priority: P1, start immediately.
Sprint planning note: This is an independent refactor that can be picked up immediately. The implementation approach: for each of Dashboard, ListIssues, ListPulls — parse the corresponding template file, pass a typed data struct, and eliminate the inline fmt.Sprintf HTML. Issue #35 (markdown rendering) can be implemented alongside this or after.
Triage (Manager): P1 unblocked. Assigned to @AI-Engineer (senior-developer). This is a prerequisite for #32 (pagination). Medium complexity -- requires refactoring three handlers to use template files. Working branch:
feature/template-refactor. Worktree:/workspace/gitea-mobile-feature-template-refactor.Delegating to senior-developer agent now.
Update (Manager): PR #45 created -- #45
Refactored Dashboard, ListIssues, and ListPulls handlers to use template files. Added org/state query param filtering for ListIssues and org filtering for ListPulls. This unblocks #32 (pagination).