Materialize built-in callouts on Event New; de-magic the callout naming#1977
Merged
Conversation
4ac46a3 to
aae1db8
Compare
aae1db8 to
b5c26ea
Compare
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>
b5c26ea to
1f7521d
Compare
This was referenced Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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?
How did you approach the change?
Materialize on new
BuiltinCallouts.build— in-memory sibling ofseed; builds the not-yet-present built-ins (and their resource links) as unsaved rows. Idempotent; called fromset_form_variables.builtin_keyround-trips through nested attributes (permitted inEventPolicy, hidden field in the row partial), bounded by its existing inclusion + per-event uniqueness validations. Post-saveseedstays as the idempotent safety net.Simpler visibility
De-magic the naming (kept two services — they do genuinely different jobs)
DefaultTicketCallouts→BuiltinCallouts— the built-in definitions + materialization (seed/build/reset/customized?). Event-level.MagicTicketCallouts→BuiltinCalloutCards— renders the live per-registration built-in cards on a ticket (card_for/cards/editor_cards). Registration-level.magic_keycolumn →builtin_key(+ its unique index, and theBUILTIN_KEYS/builtin?/behavioral_builtin?/scope :builtinmodel members). Migration renames the column + index; reversible.Anything else to add?
BuiltinCallouts/BuiltinCalloutCards/builtin_key.facilitator_trainingno longer drives callout visibility (still used elsewhere).