feat: add close/reopen action to PR detail view #92

Merged
AI-Manager merged 1 commits from feature/pr-close-reopen-91 into master 2026-03-27 20:42:11 +00:00
Owner

Summary

  • Adds POST /pulls/{owner}/{repo}/{index}/state handler that reuses the existing SetIssueState Gitea API call (PRs share the issues state endpoint)
  • PR detail template now shows a Close PR / Reopen PR button with HTMX for seamless state toggling without full page reload
  • Fixes the state badge CSS class to correctly show state-closed when a PR is closed (was always using state-open)

Test plan

  • go build ./... passes (verified)
  • Open a PR detail page for an open PR -- verify "Close PR" button appears
  • Click "Close PR" -- verify state updates to closed via HTMX without page reload
  • Verify "Reopen PR" button appears after closing
  • Click "Reopen PR" -- verify state returns to open
  • Verify closed PRs show correct state-closed CSS styling

Closes #91

🤖 Generated with Claude Code

## Summary - Adds `POST /pulls/{owner}/{repo}/{index}/state` handler that reuses the existing `SetIssueState` Gitea API call (PRs share the issues state endpoint) - PR detail template now shows a **Close PR** / **Reopen PR** button with HTMX for seamless state toggling without full page reload - Fixes the state badge CSS class to correctly show `state-closed` when a PR is closed (was always using `state-open`) ## Test plan - [ ] `go build ./...` passes (verified) - [ ] Open a PR detail page for an open PR -- verify "Close PR" button appears - [ ] Click "Close PR" -- verify state updates to closed via HTMX without page reload - [ ] Verify "Reopen PR" button appears after closing - [ ] Click "Reopen PR" -- verify state returns to open - [ ] Verify closed PRs show correct `state-closed` CSS styling Closes #91 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AI-Manager added 1 commit 2026-03-27 20:05:39 +00:00
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.

Closes leeworks-agents/gitea-mobile#91

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit f1652bb77a into master 2026-03-27 20:42:11 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#92