Conversation
|
|
|
View your CI Pipeline Execution ↗ for commit 6b651fb
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 6b651fb
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit 1720481
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
This PR strengthens the CMS operational safety and user experience by making the Fly.io health check validate database reachability and by adding a minimal global error boundary (“maintenance”) page plus e2e coverage to verify both behaviors.
Changes:
- Update
/api/healthto run a DB connectivity probe (SELECT 1) and return503when unreachable. - Add a minimal
global-error.tsxmaintenance page (no providers/styles) and a dev-only/test/errorroute to trigger it. - Extend Playwright e2e tests for health headers and maintenance page rendering.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/shared/util/payload-types/src/lib/payload-types.ts | Regenerated/normalized Payload generated types formatting. |
| apps/cms/src/app/global-error.tsx | Replaces Next default error UI with a minimal maintenance page. |
| apps/cms/src/app/api/health/route.ts | Adds Payload init + DB query verification; returns 503 on failure. |
| apps/cms/src/app/(site)/test/error/page.tsx | Dev-only route that throws to exercise the global error boundary. |
| apps/cms-e2e/src/site/error-page.spec.ts | Adds e2e coverage for the global error boundary UI. |
| apps/cms-e2e/src/health.spec.ts | Adds response header assertions for the health check endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1720481 to
04bbe55
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
04bbe55 to
cb62df7
Compare
|
✨ Your pull request project is ready for preview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #417 +/- ##
===========================================
- Coverage 64.04% 42.56% -21.48%
===========================================
Files 199 124 -75
Lines 5270 1534 -3736
Branches 716 333 -383
===========================================
- Hits 3375 653 -2722
+ Misses 1856 838 -1018
- Partials 39 43 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
/api/health) now verifies DB connectivity withSELECT 1and returns 503 when unreachable, preventing Fly.io from routing traffic to machines with a broken DBglobal-error.tsxmaintenance page that renders without any providers or styles, shown when an unhandled error escapes the root layout/test/errorroute for e2e verification of the error boundaryCloses COD-378
Test plan
nx e2e cms-e2e— health check and error page specs pass/api/healthreturns 503/test/errorin dev, verify maintenance page renders with logo and digest reference🤖 Generated with Claude Code