Admin: Title Separator field can't be cleared (input falls back to "|")

Closed Beginner friendly
#4,236 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@emdashbot is already working on this.

Since Oct 17, 2026.

  • #4241 by @emdashbot — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in SeoSettings in @emdash-cms/admin and inspect the Title Separator input's value and placeholder. The issue identifies the fallback that restores | when the value is empty. Done when the field can be cleared, a new value can be entered and saved, and the displayed default remains available as a placeholder.

Written by the indexing model from the issue text.

Description

bot:bug bot:in-review
Description

In the admin, Settings > SEO > Title Separator can't be cleared, so it can't be changed by deleting the current value. SeoSettings (@emdash-cms/admin) renders the input with:

value: formData.seo?.titleSeparator || "|"

When the field becomes empty, the || "|" fallback puts | back. Backspace never clears it, and anything typed is appended after it (| becomes |-), which then gets saved. The server side is fine: the schema is titleSeparator: z.string().max(10).optional() and the value is stored as typed.

Suggested fix: value: formData.seo?.titleSeparator ?? "" with placeholder: "|". Note also that the displayed default | differs from getSeoMeta()'s default " | ".

Workaround: select the whole field (Cmd/Ctrl+A) and type the new value over it.

Steps to reproduce
  1. Open the admin, Settings > SEO.
  2. Click in Title Separator (showing |), press Backspace: the field still shows |.
  3. Type -: the field shows |-. Save: the stored separator is |-, and page titles read Page|-Site.
Environment
  • emdash / @emdash-cms/admin 1.1.0 and 1.2.0 (same code in both)
  • Astro 7.3, Cloudflare Workers adapter (D1), reproduced locally with astro dev and in production
  • Chrome on macOS
Screenshots

None: the behaviour is in the code line above and fully described by the steps.

Dominant language
TypeScript
Stars
13.4k
Forks
1.3k
Avg merge
2d 14h
Merged PRs (30d)
365

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emdash-cms/emdash

All issues in emdash-cms/emdash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.