Skip to content

Materialize built-in callouts on Event New; de-magic the callout naming#1977

Merged
maebeale merged 1 commit into
mainfrom
maebeale/new-event-builtins-flow
Jul 15, 2026
Merged

Materialize built-in callouts on Event New; de-magic the callout naming#1977
maebeale merged 1 commit into
mainfrom
maebeale/new-event-builtins-flow

Conversation

@maebeale

@maebeale maebeale commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 5 Inspect 🔬 renames two services + a DB column across the callout stack, and changes new-event materialization

What is the goal of this PR and why is this important?

  • On Event New, all eight built-in callouts are materialized as editable rows the admin can publish/unpublish, edit, and restore to default — and reorder among custom callouts. Previously they only materialized on first save, so the new form showed greyed, non-editable previews.
  • Kill the confusing "magic" vocabulary so the callout code is obvious a year from now.

How did you approach the change?

Materialize on new

  • BuiltinCallouts.build — in-memory sibling of seed; builds the not-yet-present built-ins (and their resource links) as unsaved rows. Idempotent; called from set_form_variables.
  • builtin_key round-trips through nested attributes (permitted in EventPolicy, hidden field in the row partial), bounded by its existing inclusion + per-event uniqueness validations. Post-save seed stays as the idempotent safety net.

Simpler visibility

  • Built-ins seed hidden; admins publish what they want and it stays as they set it. No config-based auto-publish.

De-magic the naming (kept two services — they do genuinely different jobs)

  • DefaultTicketCalloutsBuiltinCallouts — the built-in definitions + materialization (seed/build/reset/customized?). Event-level.
  • MagicTicketCalloutsBuiltinCalloutCards — renders the live per-registration built-in cards on a ticket (card_for/cards/editor_cards). Registration-level.
  • magic_key column → builtin_key (+ its unique index, and the BUILTIN_KEYS / builtin? / behavioral_builtin? / scope :builtin model members). Migration renames the column + index; reversible.

Anything else to add?

Copilot AI review requested due to automatic review settings July 14, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale marked this pull request as ready for review July 14, 2026 12:45
Copilot AI review requested due to automatic review settings July 14, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale changed the title Edit built-in ticket callouts on a new event Edit built-in ticket callouts on a new event; drive visibility off published rows Jul 14, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 03:01
@maebeale maebeale force-pushed the maebeale/new-event-builtins-flow branch from 4ac46a3 to aae1db8 Compare July 15, 2026 03:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale force-pushed the maebeale/new-event-builtins-flow branch from aae1db8 to b5c26ea Compare July 15, 2026 04:11
Copilot AI review requested due to automatic review settings July 15, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale changed the title Edit built-in ticket callouts on a new event; drive visibility off published rows Materialize built-in callouts on Event New; rename callout services Jul 15, 2026
On Event New, all eight built-in callouts are materialized as in-memory rows the
admin can publish/unpublish, edit, and restore to default — mixed in order with
custom callouts. builtin_key round-trips through nested attributes so the rows
save with the event; the post-save seed is the idempotent safety net. Built-ins
seed hidden and stay however the admin sets them (no config-based auto-publish).

Renamed the callout stack so the old "magic vs default" split is gone and the two
services are obviously distinct:
  - DefaultTicketCallouts -> BuiltinCallouts (defines the built-ins + materializes
    them onto an event: seed/build/reset/customized)
  - MagicTicketCallouts   -> BuiltinCalloutCards (renders the live per-registration
    built-in cards on a ticket)
  - the magic_key column (+ its unique index, model constants/scope/predicates) ->
    builtin_key, for naming parity

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/new-event-builtins-flow branch from b5c26ea to 1f7521d Compare July 15, 2026 04:29
Copilot AI review requested due to automatic review settings July 15, 2026 04:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale changed the title Materialize built-in callouts on Event New; rename callout services Materialize built-in callouts on Event New; de-magic the callout naming Jul 15, 2026
@maebeale maebeale merged commit e0f01ed into main Jul 15, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/new-event-builtins-flow branch July 15, 2026 04:45
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.

2 participants