feat: add HTTP 404 and 500 error pages with mobile-friendly styling #144

Merged
AI-Manager merged 1 commits from feature/error-handlers-131 into master 2026-03-28 19:03:13 +00:00
Owner

Summary

  • Add ErrorNotFound and ErrorInternal handler methods with styled error pages
  • Create internal/templates/error.html with responsive layout, SVG icons, and dashboard link
  • Add error page CSS to static/style.css
  • Replace plain-text http.NotFound in Dashboard handler with styled ErrorNotFound
  • HTMX fragment support for error pages
  • Add 4 new tests: TestErrorNotFound, TestErrorInternal, TestDashboard_NonRootPath_Returns404, TestErrorNotFound_HTMX

Closes #131

Test plan

  • go test ./internal/handlers/ -run TestError passes
  • go test ./internal/handlers/ -run TestDashboard_NonRoot passes
  • All pre-existing tests still pass
  • Manual verification: visit a non-existent URL and confirm styled 404 page renders
## Summary - Add `ErrorNotFound` and `ErrorInternal` handler methods with styled error pages - Create `internal/templates/error.html` with responsive layout, SVG icons, and dashboard link - Add error page CSS to `static/style.css` - Replace plain-text `http.NotFound` in Dashboard handler with styled `ErrorNotFound` - HTMX fragment support for error pages - Add 4 new tests: TestErrorNotFound, TestErrorInternal, TestDashboard_NonRootPath_Returns404, TestErrorNotFound_HTMX Closes #131 ## Test plan - [x] `go test ./internal/handlers/ -run TestError` passes - [x] `go test ./internal/handlers/ -run TestDashboard_NonRoot` passes - [x] All pre-existing tests still pass - [ ] Manual verification: visit a non-existent URL and confirm styled 404 page renders
AI-Manager added 1 commit 2026-03-28 18:06:49 +00:00
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.

Closes leeworks-agents/gitea-mobile#131

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit a7b777cf7e into master 2026-03-28 19:03:13 +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#144