Skip to content

fix: register email settings API route (#151)#247

Open
NaeemHaque wants to merge 3 commits intoemdash-cms:mainfrom
NaeemHaque:fix/email-settings-empty-151
Open

fix: register email settings API route (#151)#247
NaeemHaque wants to merge 3 commits intoemdash-cms:mainfrom
NaeemHaque:fix/email-settings-empty-151

Conversation

@NaeemHaque
Copy link
Copy Markdown

Description:

The email settings route file existed but was never registered via injectRoute(), causing the endpoint to return 404 and the admin page to render an empty pipeline
container. Adds error state to the admin UI so fetch failures are visible instead of silently swallowed.

What does this PR do?

The /_emdash/api/settings/email API route file (packages/core/src/astro/routes/api/settings/email.ts) existed but was never registered in
packages/core/src/astro/integration/routes.ts via injectRoute(). This caused the endpoint to return 404, and the admin Email Settings page silently swallowed the error
— showing just the "Email Pipeline" heading with an empty body.

This PR:

  1. Registers the missing email settings route in routes.ts
  2. Adds fetch error handling to the EmailSettings component so failures display a visible error banner instead of an empty container

Closes #151

Type of change

  • Bug fix
  • Feature (requires approved Discussion)
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm --silent lint:json | jq '.diagnostics | length' returns 0
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code

Screenshots / test output

Test output:
✓ tests/unit/api/email-settings-route.test.ts (1 test) 9ms

 The email settings route file existed but was never registered via injectRoute(), causing the endpoint to return 404 and the admin page to render an empty pipeline container. Adds error state to the admin UI so fetch failures are visible instead of silently swallowed.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 4, 2026

🦋 Changeset detected

Latest commit: c28bb01

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
emdash Patch
@emdash-cms/admin Patch
@emdash-cms/cloudflare Patch
@emdash-cms/plugin-ai-moderation Patch
@emdash-cms/plugin-atproto Patch
@emdash-cms/plugin-audit-log Patch
@emdash-cms/plugin-color Patch
@emdash-cms/plugin-embeds Patch
@emdash-cms/plugin-forms Patch
@emdash-cms/plugin-webhook-notifier Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@NaeemHaque
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Email Settings Empty

1 participant