Add SetIssueState client method and handler for toggling issue state
between open and closed via PATCH API. Add AddComment client method
wrapping PostComment. Register new routes POST /issues/{owner}/{repo}/{index}/state
and POST /issues/{owner}/{repo}/{index}/comments. Update issue_detail.html
template with comment form (HTMX inline append) and close/reopen button
(HTMX inline swap of state badge).
Closesleeworks-agents/gitea-mobile#29
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add CloseIssue (PATCH state=closed) and PostComment (POST comment body)
methods to the Gitea client with cache invalidation. Add corresponding
handler routes POST /issues/{owner}/{repo}/{index}/close and
POST /issues/{owner}/{repo}/{index}/comment with HTMX support.
Include unit tests for both client methods.
Closesleeworks-agents/gitea-mobile#36
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add core aggregation layer wrapping the Gitea API for fan-out
concurrent fetching across repos and organizations with caching.
- internal/gitea/client.go: Gitea API client with aggregation
- ListOrgs/ListOrgRepos/ListOrgsAndRepos for org enumeration
- ListAllIssues: concurrent fetch across repos via goroutines with semaphore (5)
- ListAllPullRequests: same pattern for PRs
- GetTriageQueue: unassigned issues + open PRs, sorted by priority
- CreateIssue, ApplyLabel, SubmitReview: write operations with cache invalidation
- In-memory cache with 30s TTL using sync.RWMutex
- internal/gitea/client_test.go: unit tests for caching, priority scoring,
API calls with httptest server, and triage queue sorting
Closesleeworks-agents/gitea-mobile#3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>