Skip to content

feat: generate readable slugs for new newsletters - #33

Closed
leeclissett wants to merge 1 commit into
LeonMusCoden:masterfrom
leeclissett:feat/pretty-default-newsletter-slugs
Closed

leeclissett wants to merge 1 commit into
LeonMusCoden:masterfrom
leeclissett:feat/pretty-default-newsletter-slugs

Conversation

@leeclissett

Copy link
Copy Markdown

Summary

Generate a readable, URL-safe slug from a newsletter's name when no custom URL is supplied.

This applies to both newsletters registered through the UI and newsletters automatically detected from incoming email.

Generated slugs:

  • are lowercase and URL-safe
  • normalize common accented Latin characters
  • use numeric suffixes when a slug is already taken
  • retry safely if concurrent creations choose the same slug
  • avoid the reserved /feeds/all route and existing feed identifiers

Explicit custom URLs continue to use the existing sanitization behavior.

Compatibility

Existing newsletters are not migrated or backfilled, so current feed URLs remain unchanged. Renaming a newsletter also leaves its existing slug unchanged. Names that cannot produce a safe ASCII slug continue to fall back to the newsletter ID.

Test coverage

Coverage includes:

  • omitted and blank manual slugs
  • auto-detected newsletters
  • punctuation, accents, apostrophes, and Unicode separators
  • duplicate and concurrent generated slugs
  • reserved feed routes and identifier collisions
  • explicit custom-slug conflicts
  • update stability
  • legacy repeated-hyphen slugs
  • ID fallback for non-slugifiable names

Verification

  • Backend: 85 tests passed
  • Frontend: 51 tests passed
  • Backend and frontend lint clean

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