{# Shared "describe your change" chat panel for digital-twin pages. This markup was duplicated verbatim across four twin.html templates (boundary_canvas, data_canvas, observability_canvas, security_canvas). The copies differed on exactly two lines — the hint and the placeholder — while every element id, inline style and handler was identical. A fifth canvas adding a twin page would have copied it again. Element ids are deliberately unchanged (chatInput, chatSpinner, chatExplanation, chatExplanationText, chatError): the per-canvas scripts and the existing Playwright specs address them by id, so renaming here would break callers for no gain. Context (all optional, sensible defaults): chat_title section heading default "DESCRIBE YOUR CHANGE" chat_hint one-line explanation shown under the heading chat_placeholder textarea placeholder text chat_button submit button label default "Generate JSON" chat_bare omit the bordered wrapper and heading; the host already provides framing. network/twin.html needs this — its copy sits inside a tab pane with its own heading, which is the only structural difference among the five copies and the reason it would otherwise have been left duplicated. Usage: {% with chat_hint="Describe the schema change in plain English.", chat_placeholder="e.g. Add a fulfillment timestamp to orders..." %} {% include "includes/_twin_chat_panel.html" %} {% endwith %} #} {% if not chat_bare %}
{{ chat_title | default("DESCRIBE YOUR CHANGE") }} {% endif %}

{{ chat_hint | default("Describe the change in plain English — AI generates the JSON.") }}

{% if not chat_bare %}
{% endif %}