Fixed controlled values for Stripe and Mailgun inputs - #29387
Conversation
no ref These settings can be absent from the API response, causing React warnings when acceptance tests populate the fields. Keep the inputs controlled from their initial render by using empty-string fallbacks.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughUpdated Mailgun domain and private API key fields, along with Stripe Direct connection key fields, to pass empty strings instead of nullish values to controlled 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 4m 18s | View ↗ |
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 3m 30s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-s... |
✅ Succeeded | 2m 47s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 22s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-settin... |
✅ Succeeded | 1m 10s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 38s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-16 14:27:56 UTC

What changed
Why
The settings API can return
undefinedornullfor unset values. Passing those values to the text fields made the underlying inputs uncontrolled on their first render, then controlled after the acceptance tests populated them. This removes all three controlled-input diagnostics found in the current full Admin acceptance-test log.Testing
pnpm nx run @tryghost/admin:test:acceptance -- src/settings/membership/stripe.acceptance.test.tsx src/settings/email/mailgun.acceptance.test.tsxpnpm nx run @tryghost/admin-x-settings:lintpnpm nx run @tryghost/admin-x-settings:test:unit