The shared mutation-confirm contract.
Every governed mutation in the admin (audience edit/archive/delete, flag
cleanup, kill switch, rollout advance/hold/rollback, change-request execution)
follows one preview → confirm → audit shape. mutation_confirm/1 is the
confirm step's canonical affordance: an optional scope line, slots for
evidence (blast radius, diffs) and extra fields, optional first-class typed
confirmation, a required reason, and a primary-or-danger submit paired with a
back link.
Standardizing this one component is the highest-leverage consistency win — every confirm screen reads and behaves identically instead of hand-rolling its own form markup.
Summary
Functions
Renders the canonical confirm form: scope → evidence → typed confirmation → extra fields → reason → actions.
Functions
Renders the canonical confirm form: scope → evidence → typed confirmation → extra fields → reason → actions.
Drop governance evidence (blast radius, callouts) into the :evidence slot and
any custom pre-reason inputs into the :extra_fields slot. Prefer the typed
confirmation assigns for production key checks so destructive confirmations
render before the reason field consistently. The reason textarea and the
submit/back actions are always rendered so confirm screens stay visually and
behaviourally uniform.
Attributes
submit_event(:string) (required) - phx-submit event name.submit_label(:string) (required)reason_value(:string) - Defaults to"".reason_label(:string) - Defaults to"Reason (required)".reason_required(:boolean) - Defaults totrue.back_href(:string) - Defaults tonil.back_label(:string) - Defaults to"Back".danger?(:boolean) - Defaults tofalse.aria_label(:string) - Defaults to"Confirm action".disabled?(:boolean) - Defaults tofalse.disabled_reason(:string) - Defaults tonil.unavailable_reason(:string) - Defaults tonil.read_only?(:boolean) - Defaults tofalse.read_only_reason(:string) - Defaults tonil.typed_confirmation_label(:string) - Defaults tonil.typed_confirmation_name(:string) - Defaults to"confirmation".typed_confirmation_value(:string) - Defaults to"".typed_confirmation_required(:boolean) - Defaults tofalse.typed_confirmation_help(:string) - Defaults tonil.scope(:map) - optional %{environment:, tenant:, fingerprint:} context line. Defaults tonil.
Slots
evidence- blast radius / diff / callouts shown above the reason.extra_fields- inputs shown above the reason, e.g. typed confirmation.