Skip to content

Suggest a new topic (proposedTopic field) - #13

Merged
HumbleBee14 merged 1 commit into
mainfrom
feature/propose-topic
Jul 13, 2026
Merged

Suggest a new topic (proposedTopic field)#13
HumbleBee14 merged 1 commit into
mainfrom
feature/propose-topic

Conversation

@HumbleBee14

Copy link
Copy Markdown
Member

What

Lets writers propose a topic that isn't in the list yet, without breaking the enum-validated build.

  • Topic dropdown gains a + Propose a new topic… option. Selecting it reveals a New topic name input plus a File under for now picker (closest existing topic).
  • The proposed name is written to the post frontmatter as proposedTopic; topicId stays a valid existing topic so the build never fails.
  • A maintainer — or, later, automation — reads proposedTopic straight from the post markdown and either creates the topic (remapping topicId) or leaves it mapped to the closest.

Why this shape

Topics are a build-time z.enum(TOPIC_IDS), so a post's topicId must be a known value. Rather than loosen the enum (losing typo-safety) or fail the build as a signal, the suggestion rides along as structured frontmatter — visible where maintainers actually look, and trivial for a future GitHub-Action/bot to act on.

Files

  • src/content/config.ts — optional proposedTopic schema field
  • src/write/serialize/toMdx.tsPostMeta.proposedTopic + frontmatter emit (+ test)
  • src/write/meta/MetaForm.tsx — dropdown option + reveal inputs
  • src/write/WritePortal.tsxemptyMeta

Rebased onto main after #12. Not merging — for local review.

Topic dropdown gains a 'Propose a new topic' option that reveals a name
input plus a closest-existing fallback picker (keeps the enum build valid).
The suggestion is written to the post frontmatter as proposedTopic for a
maintainer or automation to create the topic or remap topicId.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mlsystems with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b06401
Status: ✅  Deploy successful!
Preview URL: https://99209907.mlsystems.pages.dev
Branch Preview URL: https://feature-propose-topic.mlsystems.pages.dev

View logs

@HumbleBee14
HumbleBee14 merged commit b634188 into main Jul 13, 2026
2 checks passed
@HumbleBee14
HumbleBee14 deleted the feature/propose-topic branch July 13, 2026 11:30
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