Skip to content

Add share_payload message type and book_feedback input type#594

Merged
hardbyte merged 6 commits intomainfrom
feat/share-payload-and-book-feedback
Feb 27, 2026
Merged

Add share_payload message type and book_feedback input type#594
hardbyte merged 6 commits intomainfrom
feat/share-payload-and-book-feedback

Conversation

@hardbyte
Copy link
Owner

@hardbyte hardbyte commented Feb 26, 2026

Summary

  • Share payload: MessageNodeProcessor resolves share_payload_variable from session state, returning a type: "share_payload" message with structured data (title, subtitle, items, link) for the frontend to render as a shareable card
  • Book feedback: QuestionNodeProcessor supports input_type: "book_feedback" with book_source variable reference — users rate books (like/dislike/read) and structured feedback is stored in session state
  • Recommendation flow v2.0.0: Updated huey-recommendation-flow.json with feedback collection on book display nodes, share payload generation via CEL aggregation, and liked-book condition branching

Companion PRs

  • Admin UI: hardbyte/hueybooks-admin-ui (share payload rendering in test modal)
  • huey-books-app: hardbyte/huey-books-site (book feedback carousel UX)

Test plan

  • Unit tests pass (poetry run pytest app/tests/unit/ -v)
  • Integration tests pass (bash scripts/integration-tests.sh)
  • E2E flow test with recommendation sub-flow returns book_feedback input_request with books
  • Share payload message appears after book feedback submission
  • Condition routing works based on liked book count

Share payload: MessageNodeProcessor resolves share_payload_variable from
session state, returning structured data the frontend can render as a
shareable card.

Book feedback: QuestionNodeProcessor supports input_type "book_feedback"
with a book_source variable reference. Users can rate books (like/dislike/
read) and the structured feedback is stored in session state for downstream
condition routing. Updated recommendation flow to v2.0.0 with feedback
collection, share payload generation, and liked-book branching.
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: f609e16a18

ℹ️ 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".

- Add book_feedback to InteractionCreate.input_type regex pattern so
  clients can submit feedback without getting a 422
- Fix CEL has() macro to use field-path syntax: has(obj.field) not
  has(obj, 'field')
The hardcoded enum of allowed input types required a schema change for
every new flow input type. Replace with a simple identifier pattern so
flow authors can define custom input types without API changes.
Same change as InteractionCreate — flow authors can define custom
question input types without needing API schema changes.
Centralizes the set of known input types in a frozenset so they're
discoverable via IDE autocomplete and OpenAPI examples, while keeping
input_type as an open string for custom types.
The test used "invalid_input_type" which now passes the relaxed
identifier regex. Use "123-INVALID!" which actually violates the
pattern.
@hardbyte hardbyte merged commit 533d9b2 into main Feb 27, 2026
11 checks passed
@hardbyte hardbyte deleted the feat/share-payload-and-book-feedback branch February 27, 2026 18:10
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