{% extends "base.html" %} {% comment %} The sequence editor: status, ordered steps and the subscriber panel. Two regions, each with its own HTMX endpoint and its own refresh event, because they change for different reasons — adding a step must not re-render a subscriber list somebody is scrolling, and subscribing a contact changes the per-step counts, which is why subscriber mutations fire both events. {% endcomment %} {% block title %}{{ sequence.name }} · Sequences · DemandTrail Messaging{% endblock %} {% comment %} The editor bar (HANDOFF §2.3): a way back, the sequence's name and state, and one action that says what it does. The status used to be a select beside a "Save status" button — three words to read before anything happened. Now a draft offers "Activate sequence", the one orange control on the page; a live one offers to go back to draft (which stops new subscribers and leaves the people already on it where they are); an archived one offers to come back. Archiving sits behind the same rule as every other destructive action: a red text link, away from the primary. The status endpoint answers with a toast; the page reloads on success so the bar shows the state it is now in. {% endcomment %} {% block page_header %}
Sequences

{{ sequence.name }}

{% if sequence.status == "active" %}{% include "components/status_pill.html" with tone="success" label="Active" %} {% elif sequence.status == "archived" %}Archived {% else %}{% include "components/status_pill.html" with tone="neutral" label="Draft" %}{% endif %} {% if can_edit %}
{% if sequence.status == "draft" %}
{% csrf_token %}
{% csrf_token %}
{% elif sequence.status == "active" %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %}
{% endif %}

Steps run in order. Each waits its delay from the moment the previous step actually ran, then opens inside its send window.

{% endblock %} {% block content %} {% comment %} One column on a phone, two from `md` up — a fixed two-column grid put the subscriber panel in a 300px gutter on every narrow screen. Layout utilities rather than a component class, which is the split ground rule 9 draws: the design system owns component properties, utilities own layout. {% endcomment %}
{% include "campaigns/_steps.html" %}

Loading subscribers…

{% endblock %}