{% if pty_screen_enabled and pty_extra_present %} {# xterm.js renders the read-only live pty-screen view (#534); only loaded when the tap is on AND the optional `pty` extra (pyte) is present — greyed control below when it's missing. #} {% endif %} {% include "_tabler_sprite.html" %} {# Desktop bridge row header (#782 M-2): the badge + status pill + project name shared by the Active-zone and Recent-zone desktop rows. `default_label` is the fallback text before Alpine hydrates ("Running" for live, "Stopped" for ended). #} {% macro desktop_row_head(default_label) %} desktop {{ default_label }} {# Session-shape chips (#779): a project can run one standard bridge plus N interactive sessions, so mark which one this row is — and whether the interactive session is isolated in its own git worktree. #} interactive worktree {% endmacro %} {# Modal scaffold (#782 M-1): the focus-trap / escape / backdrop a11y contract shared by the config-editor and transcript modals. The caller supplies the data-test id, title id, close/trap handler names, and the title content (which may include Alpine bindings). SECURITY: `title_content` is rendered with `| safe` so Alpine bindings survive; callers MUST NEVER pass user-controlled data — only static developer strings + Alpine directives. Backdrop dismissal is gesture-guarded (#1030): a text-selection drag that starts inside the dialog and releases over the backdrop makes the browser synthesize the `click` on their COMMON ANCESTOR — this very div — so a bare `@click.self` closes the modal mid-selection. `bdDown`/`bdUp` record whether the gesture started AND ended on the backdrop itself; only a true backdrop click (both ends) dismisses. Escape and the ✕ button are unaffected. #} {% macro modal_shell(data_test, title_id, close_fn, trap_fn, title_content) %}