Step 3: Create web UI error page for namespace maintenance mode
## Summary Create a user-facing error page displayed when a user visits a web route belonging to a TLG in maintenance mode. For API/JSON requests, return a structured 503 response. > **POC approach:** This will be part of a single POC MR (does not need to merge to master). Maintenance mode will be toggled via Rails console. ## Dependencies - **Depends on**: Step 1 (#591688) — state machine transitions - **Parallel with**: Step 2 (#591689) and Step 4 (#591691) - Integrates into Step 2's middleware for rendering responses ## Context Parent issue: https://gitlab.com/gitlab-org/gitlab/-/issues/590009 The existing `app/views/errors/service_unavailable.html.haml` (503 page) serves as the template for this work. The EE `ReadOnly::Controller` already returns a `service_unavailable_maintenance_response` with 503 + `Retry-After` header for instance-level maintenance. ## Tasks - [ ] Create `app/views/errors/namespace_maintenance.html.haml` modeled on `service_unavailable.html.haml` - Use existing 503 illustration (`illustrations/error/error-503-lg.svg`) - Message: "This group is temporarily in maintenance mode. Please try again later." (or similar) - Include group name in the message if available - [ ] In the namespace read-only middleware (Step 2), render this page for non-JSON web requests - [ ] For JSON/API requests, return `{ "message": "Group is in read-only maintenance mode" }` with status 503 and `Retry-After: 900` header - [ ] Add i18n strings to locale files - [ ] Add specs for both HTML and JSON response paths ## Key Files - `app/views/errors/service_unavailable.html.haml` (reference template) - `app/views/errors/access_denied.html.haml` (reference for message pattern) - `ee/lib/ee/gitlab/middleware/read_only/controller.rb` (reference: `service_unavailable_maintenance_response`) ## Effort Estimate Small (1 day)
task