Add RenderMarkdown method to gitea client that calls POST /api/v1/markdown
to convert raw markdown text to safe HTML. Wire it into IssueDetail and
PullDetail handlers to render body content as formatted markdown.
Falls back gracefully to plain text if the API call fails.
Templates updated to use RenderedBody (template.HTML) with fallback
to raw Issue.Body/Pull.Body when rendering fails.
Closesleeworks-agents/gitea-mobile#35
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 GET /issues/{owner}/{repo}/{index} and GET /pulls/{owner}/{repo}/{index}
routes that fetch individual issues/PRs from the Gitea API and render them
using the existing issue_detail.html and pull_detail.html templates.
New client methods:
- GetIssue: fetch a single issue by owner/repo/index
- GetPull: fetch a single pull request by owner/repo/index
- GetIssueComments: fetch comments for an issue
- GetRepoLabels: fetch available labels for a repository
Both handlers support HTMX fragment responses and full-page rendering,
consistent with the existing handler pattern.
Closesleeworks-agents/gitea-mobile#24
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>
- Initialize go.mod with gitea.leeworks.dev/0xwheatyz/gitea-mobile
- Create directory structure: cmd/server/, internal/{config,gitea,handlers,middleware,templates}/, static/
- Add minimal HTTP server with /health and / endpoints
- Add flake.nix with Go toolchain, gopls, and air for live reload
Closesleeworks-agents/gitea-mobile#1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>