Covers tech stack, project structure, local development with nix develop
and air live reload, environment variables, testing, container build, and
deployment pointer to Talos repo manifests.
Closesleeworks-agents/gitea-mobile#148
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 4 new integration-style unit tests for GetTriageQueue using mock
HTTP servers: full integration test verifying issue filtering (assigned
vs unassigned), PR inclusion, and priority sorting; empty orgs test;
all-assigned test (expect empty queue); and label extraction test
verifying multi-label items are correctly populated.
Closesleeworks-agents/gitea-mobile#117
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add comprehensive integration test suite using httptest with a mock
Gitea API server. Tests cover GET and POST handlers for dashboard,
issues, pulls, issue/PR detail, create issue, state changes, comments,
labels, assignees, reviews, and settings. Both regular and HTMX
request paths are tested. Includes TestMain to set working directory
to project root for template loading.
Covers issues: #140#139#138#137#136#135#134#133#124#118#113#111#110
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add automatic retry logic to doRequest for HTTP 429 responses. Uses
Retry-After header when present, otherwise exponential backoff
(1s, 2s, 4s). Respects context cancellation during waits. Defaults
to 3 max retries with 1s base delay. Includes 7 new tests covering
retry success, exhaustion, Retry-After header, context cancellation,
non-429 errors, and backoff calculation.
Closesleeworks-agents/gitea-mobile#132
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add ErrorNotFound and ErrorInternal handler methods that render styled
error pages using the error.html template, with proper status codes,
responsive layout, SVG icons, and HTMX fragment support. Replace the
plain-text http.NotFound call in Dashboard with the new styled handler.
Closesleeworks-agents/gitea-mobile#131
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add four test functions using httptest.NewServer:
- TestApplyLabel: verifies POST request path, auth header, label IDs
in body, and cache invalidation after success
- TestApplyLabel_Error: verifies 404 error propagation
- TestSubmitReview: verifies POST path, event/body fields, and cache
invalidation after success
- TestSubmitReview_Error: verifies 422 error propagation
Closesleeworks-agents/gitea-mobile#127
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the large inline HTML template from settings.go into a separate
file at internal/templates/settings.html, matching the project convention
used by all other handlers. The template is now loaded at render time
via template.ParseFiles, consistent with dashboard, issues, etc.
Closesleeworks-agents/gitea-mobile#126
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update Auth middleware to accept a fallbackToken parameter. When no
per-user cookie token is present and GITEA_TOKEN is set in the
environment, the middleware uses the env token instead of redirecting
to /settings. Cookie tokens still take precedence over the fallback.
Add three new unit tests covering: fallback used when no cookie,
cookie takes precedence over fallback, and redirect when neither is set.
Closesleeworks-agents/gitea-mobile#125
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add comprehensive unit tests using mock HTTP servers for four key
aggregation methods in the Gitea client. Tests cover correct API
integration, caching behavior, sorting, state filtering, repo
filtering, pagination, and label handling.
Closesleeworks-agents/gitea-mobile#122Closesleeworks-agents/gitea-mobile#121
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add grid layout at >= 640px breakpoint for #issue-list and #pull-list
containers, matching the existing .card-grid tablet behavior. Cards
render in a 2-column grid on tablet while maintaining single-column
on mobile.
Closesleeworks-agents/gitea-mobile#105
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The aggregation layer uses sync.RWMutex and errgroup for concurrent
API fan-out. Enable the Go race detector in CI to catch data races
early.
Closesleeworks-agents/gitea-mobile#103
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add per-PR review state aggregation by fetching reviews concurrently
via the existing semaphore pattern. Display review status (approved,
changes requested, awaiting) and merge status (ready/conflicts) as
compact badges in each PR card row.
- Add ReviewState field to PullRequest struct
- Add GetPullReviewState() and EnrichPullsWithReviewState() to client
- Call enrichment in ListPulls handler after fetching PRs
- Update pulls template with review and merge badges
- Add CSS for .review-badge and .merge-badge classes
Closesleeworks-agents/gitea-mobile#97
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace plain-text assignee login with a circular avatar image using
the existing .avatar CSS class. Includes title attribute for
accessibility. Unassigned issues show no avatar.
Closesleeworks-agents/gitea-mobile#98
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add POST /pulls/{owner}/{repo}/{index}/state handler that reuses the
existing SetIssueState Gitea API call (PRs share the issues state
endpoint). The PR detail template now shows a Close PR / Reopen PR
button with HTMX for seamless state toggling without full page reload.
Also fixes the state badge to use the correct CSS class when a PR is
closed.
Closesleeworks-agents/gitea-mobile#91
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The project uses only Go stdlib with zero external dependencies, so go.sum
does not exist. The Dockerfile COPY instruction fails when go.sum is missing.
Closesleeworks-agents/gitea-mobile#89
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the plain <select> with an HTML5 <input> + <datalist> pair so
users can type to filter repositories. Add debounced input handler for
label loading, change event for direct datalist selection, and client-side
validation that the entered value is a known repository.
Closesleeworks-agents/gitea-mobile#87
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a repo dropdown to the filter bar that appears when an org is
selected. The dropdown lists all repos in the selected org and
filters issues/pulls to the chosen repo. Changing the org resets
the repo filter. Infinite scroll preserves the repo filter.
Closesleeworks-agents/gitea-mobile#83
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a label text input to the filter bar on both issues and pulls
list views. The filter is passed through to the Gitea API's native
labels query parameter for server-side filtering. Infinite scroll
preserves the label filter across page loads.
Closesleeworks-agents/gitea-mobile#82
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fetch and display PR comments in the pull request detail page,
using the same Gitea issue comments API endpoint. Shows author,
timestamp, and body for each comment, with a friendly empty state
when no comments exist.
Closesleeworks-agents/gitea-mobile#81
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirror the existing issues state filter pattern: read state query param
(default "open"), pass it to ListAllPullRequests instead of hardcoded
"open", and add a state select widget to the pulls filter bar with
proper hx-include for HTMX partial reloads and infinite scroll.
Closesleeworks-agents/gitea-mobile#72
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add the ability to assign users to issues from the mobile app:
- New ListCollaborators client method fetches repo collaborators
- New AssignIssue client method sets assignees via PATCH API
- New POST /issues/{owner}/{repo}/{index}/assignees handler
- Assignee dropdown populated with repo collaborators in issue detail
- HTMX inline response confirms assignment without page reload
Closesleeworks-agents/gitea-mobile#50
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add dynamic label selection when creating a new issue:
- New GET /issues/new/labels endpoint returns label checkboxes for a repo
- When a repo is selected, labels are fetched via HTMX and displayed as
checkboxes with colored label badges
- CreateIssue handler now parses label_ids from form and passes them to
the Gitea API
- Shows "No labels available" message when repo has no labels
Closesleeworks-agents/gitea-mobile#67
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add an org filter select to the dashboard that allows users to narrow
the triage queue to a specific organization. The filter uses HTMX to
update the view without a full page reload, mirroring the pattern
already used in the issues and pulls views.
Closesleeworks-agents/gitea-mobile#68
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update ListAllIssues and ListAllPullRequests to accept state and page
parameters, returning paginated results (20 per page) with HasMore
metadata. ListIssues and ListPulls handlers now read page, org, and
state query params; HTMX requests for page > 1 return only card HTML
fragments for seamless infinite scroll. Both templates extract a
reusable "cards" block and pulls.html gains a scroll sentinel matching
the existing issues.html pattern. Filter changes reset to page 1.
Closesleeworks-agents/gitea-mobile#32
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>