{% extends "base.html" %} {% load flow_builder %} {% comment %} The builder's host page (SPEC §16): a mount div, and the React island that replaces its contents. Everything the island needs is a data attribute, so it reverses no URLs of its own. The API URLs carry the workspace segment: SPEC §16 writes them without one, and apps/flows/api.py records why they have one here. The bundle is reached through {% templatetag openblock %} flow_builder_bundle {% templatetag closeblock %} rather than {% templatetag openblock %} static {% templatetag closeblock %}, so a tree that has not run `make frontend` renders the notice below instead of a 500 or a red test — see apps/flows/templatetags/flow_builder.py. {% endcomment %} {% block title %}{{ flow.name }} · Flows · DemandTrail Messaging{% endblock %} {% block extra_head %} {% flow_builder_bundle as builder %} {% if builder %} {% comment %} In the head, not beside the script: a stylesheet discovered in the body is a guaranteed flash of an unstyled canvas. {% endcomment %} {% endif %} {% endblock %} {% comment %} No page header: the builder's own 56px top bar is the header (HANDOFF §3, Flow builder) — back link, the name edited in place, status, save state, undo/redo, Test, problems, Publish, and the downloads behind "…". It lives in the island because every one of those answers changes while the page is open, and a header Django rendered once could only go stale. The page goes full-bleed through base.html's main_pad seam: the canvas is the page, and a padded card around it only took space from it. {% endcomment %} {% block main_pad %}p-0{% endblock %} {% block content %} {% flow_builder_bundle as builder %} {% comment %} The Triggers drawer overlays the canvas rather than sitting beside it, so the mount div's box never changes size and React Flow is never asked to reflow. The body is fetched by htmx on first open and re-fetched on `triggersChanged`. {% endcomment %} {% comment %} Dispatching `triggers-opened` on the way open is what makes the panel's first fetch lazy: most visits to the builder never touch the drawer, and `load once` made every one of them pay for the panel query plus a channel query per ref trigger. {% endcomment %}
Loading the flow builder…
{% if not can_edit %}Read-only: you can look at this flow but not change it.
{% endif %}The flow builder could not load.
Its JavaScript bundle has not been built. Run make frontend and reload,
or rebuild the container image.
Read-only: you can look at this flow but not change it.
{% endif %}