feat: add HTTP handlers and health endpoint #12
Reference in New Issue
Block a user
Delete Branch "feature/http-handlers"
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?
Summary
Depends on: PR #11 (aggregation layer) -> PR #10 (config/auth)
Closes #4
Routes
/health//issues/pulls/issues/issues/{owner}/{repo}/{index}/labels/pulls/{owner}/{repo}/{index}/reviewTest plan
go test ./internal/handlers/...to verify tests passGenerated with Claude Code
Implement all HTTP handlers using Go 1.22+ stdlib ServeMux with HTMX fragment vs full-page response detection. - internal/handlers/handlers.go: all route handlers - GET /health returns 200 for K8s probes - GET / dashboard with triage queue from aggregation layer - GET /issues lists all issues across orgs - GET /pulls lists all PRs across orgs - POST /issues creates issue via aggregation layer - POST /issues/{owner}/{repo}/{index}/labels assigns labels - POST /pulls/{owner}/{repo}/{index}/review submits PR review - HX-Request header detection for HTMX fragment vs full page - Mobile-first dark theme base layout with bottom navigation - cmd/server/main.go: refactored to use centralized route registration - internal/handlers/handlers_test.go: unit tests for health, dashboard, HTMX detection, input validation Closes leeworks-agents/gitea-mobile#4 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>