Skip to content

Align CMS schemas with frontend types#593

Merged
hardbyte merged 1 commit intomainfrom
fix/type-schema-consistency
Feb 25, 2026
Merged

Align CMS schemas with frontend types#593
hardbyte merged 1 commit intomainfrom
fix/type-schema-consistency

Conversation

@hardbyte
Copy link
Owner

Summary

  • ChatThemeColors: add header/headerText fields used by both frontends for the chat header bar
  • JokeContent: replace stale setup/punchline schema with actual question_text/answers structure matching load_jokes.py data
  • InteractionCreate: add phone/url to input_type validation (frontend already sends these)
  • load_jokes.py: use type: "joke" not "question" for CMS content
  • huey-jokes-flow.json: source_config.type: "joke" to match content type

Test plan

  • Unit tests pass (443 tests)
  • Ruff format/lint pass (pre-commit hooks)

- ChatThemeColors: add header/headerText fields used by both frontends
- JokeContent: replace setup/punchline schema with actual question_text/answers structure
- InteractionCreate: add phone/url to input_type validation pattern
- load_jokes.py: use type "joke" (not "question") for CMS content
- huey-jokes-flow.json: source_config type "joke" to match content
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e39375892

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"source": "random",
"source_config": {
"type": "question",
"type": "joke",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve compatibility with previously seeded joke content

Changing the jokes flow filter to "type": "joke" breaks environments that already loaded jokes with the prior loader behavior (scripts/load_jokes.py previously wrote "type": "question"), because runtime lookup is strict (ContentType(content_type_str) in app/services/chat_runtime.py and CMSContent.type == content_type in app/repositories/cms_repository.py). In upgraded deployments without a data migration, this node will stop finding any joke content and the joke loop will fail to present a prompt/options.

Useful? React with 👍 / 👎.

@hardbyte hardbyte merged commit c5af7c4 into main Feb 25, 2026
20 checks passed
@hardbyte hardbyte deleted the fix/type-schema-consistency branch February 25, 2026 07:59
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