Skip to content

Changed settings to use local error boundary - #29379

Merged
9larsons merged 1 commit into
mainfrom
codex/migrate-error-boundary
Jul 16, 2026
Merged

Changed settings to use local error boundary#29379
9larsons merged 1 commit into
mainfrom
codex/migrate-error-boundary

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • Switched the final admin-x-settings withErrorBoundary consumer to the existing app-local implementation.
  • Removed the now-unused duplicate HOC implementation and public export from admin-x-design-system.
  • Kept ErrorBoundary and ErrorBoundaryProps because Koenig still uses the component internally.

Why

admin-x-settings already owns the identical error-boundary behavior. Removing the final legacy HOC dependency reduces the admin-x-design-system surface while preserving runtime behavior.

Validation

  • Independent agent review: no findings
  • admin-x-settings unit tests: 203 passed
  • admin-x-design-system unit tests: 23 passed
  • Focused ESLint and TypeScript checks
  • git diff --check

Manual testing

  • Open Settings → Membership → Custom fields with the feature flag enabled and disabled.
  • Confirm the custom-field list renders.
  • Confirm Add/Edit custom-field modals open.
  • Optionally force a child render error and confirm the fallback banner appears and Sentry capture still fires.

no ref

The settings app already owns the shared error-boundary behavior, so keeping a duplicate design-system HOC left an unnecessary legacy dependency.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4379ffd3-cc39-4a80-9bd0-980b0796c6e5

📥 Commits

Reviewing files that changed from the base of the PR and between d9fa24e and 333ff21.

📒 Files selected for processing (3)
  • apps/admin-x-design-system/src/global/error-boundary.tsx
  • apps/admin-x-design-system/src/index.ts
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx

Walkthrough

The design system removes the withErrorBoundary higher-order component and its public re-export, leaving the default ErrorBoundary export unchanged. The custom fields settings component updates its imports to obtain withErrorBoundary from a local module while separately importing Button and consolidating related hooks and utilities.

Possibly related PRs

  • TryGhost/Ghost#29354: Updates settings components to use a local withErrorBoundary import after its removal from the design system.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/migrate-error-boundary

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 16, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 333ff21

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 7m 4s View ↗
nx run @tryghost/admin:test:acceptance ✅ Succeeded 2m 46s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 2m 23s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 20s View ↗
nx run-many -t lint -p @tryghost/admin-x-design... ✅ Succeeded 1m 14s View ↗
nx run @tryghost/admin:build ✅ Succeeded 37s 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 12:50:17 UTC

@9larsons
9larsons marked this pull request as ready for review July 16, 2026 13:08
@9larsons
9larsons merged commit 56bfb58 into main Jul 16, 2026
42 of 43 checks passed
@9larsons
9larsons deleted the codex/migrate-error-boundary branch July 16, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant