The CI workflow previously only triggered on push to master, meaning PRs
were not tested before merge. Add pull_request trigger for the test job
while restricting the Docker build+push job to push events only.
Closesleeworks-agents/gitea-mobile#204
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The triage queue is served at / (the dashboard), not a separate /triage
route. Update Step 7 and the expected results summary table to reference
the correct route, consistent with ROADMAP.md and handlers.go.
Closesleeworks-agents/gitea-mobile#157
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `go vet ./...` step that runs before `go test -race ./...` in the
CI pipeline. This catches format string errors, unreachable code, and
other static analysis issues early.
Verified locally: `go vet ./...` exits 0 with no warnings.
Closesleeworks-agents/gitea-mobile#154
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add accent color overrides for light mode (better contrast on white bg)
- Add light-mode-specific styles for messages, buttons, type badges
- Document why CSS is ~12KB vs the original ~5KB target (all rules active)
- safe-area-inset and tablet breakpoint already verified present
Closesleeworks-agents/gitea-mobile#119
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Configures air to build ./cmd/server, watch .go/.html/.css/.js files
under the project tree, and auto-restart on changes. Excludes test
files and vendor directories.
Closesleeworks-agents/gitea-mobile#109
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>