{% load static %}
{% comment %}data-theme="dark" ACTIVATES scitex-ui's dark token set — it is not
decoration. theme.css defines --text-primary / --bg-page / --border-default /
… twice, once under [data-theme="light"] and once under [data-theme="dark"],
and DEFAULTS TO LIGHT when the attribute is absent. Without this every base
component on the page silently resolves light values onto a dark surface, which
is exactly how scitex-ui 0.12.0's context menu rendered near-invisible on
2026-07-28. Dark is also the standing default (the operator's eyes are
sensitive), so this is deliberate, not a preference to be "cleaned up".
{% endcomment %}
{% comment %}
"DM", not "Chat". Operator, 2026-07-29 (TG): 「あと、"chat" となってますが、"DM"
で揃えると良いと思います。」 The browser tab was the last place still saying
Chat — the switcher, the heading and this title now all read DM.
THE ROUTE IS STILL /chat AND STAYS THAT WAY. Renaming a published URL is a
MIGRATION, not a rename: every bookmark the operator has and every agent
reference to /chat would break for a label change. See _page_switcher.html,
which carries the same decision next to the href it does NOT rename.
chat_title.js PREFIXES this string at runtime — "(3) DM — SciTeX Cards v…" —
so the base title lives here, in one place, and that module spells neither the
version nor the word DM.
{% endcomment %}
DM — SciTeX Cards v{{ scitex_cards_version }}
{% comment %}
No favicon link here: scitex-ui's shell supplies the shared SciTeX brand mark
as its default (>=0.7.1). One source, not two copies that drift. Do NOT re-add
a local — if the mark is wrong, fix it in scitex-ui, which
owns the asset.
NB: this MUST be a {% templatetag openblock %} comment {% templatetag closeblock %}
block, not Django's single-hash syntax — that one is single-line only, and a
multi-line hash block leaks its body into the rendered page.
{% endcomment %}
{% comment %}
Operator↔agent DM view — minimal slice (card
fleet-agent-direct-message-board-pane-20260707). Mobile-first: the agent
list is a slide-in drawer on narrow screens, a fixed left column on wide
ones. All behavior lives in static/scitex_cards/chat/ — chat_diff.js (pure
render planning) then chat.js (DOM + network); load order matters, chat.js
reads window.ChatDiff. Line-limit discipline: template <1024 lines, js
<512; this file is layout + CSS.
{% endcomment %}
{% comment %}
Right-click menu comes from scitex-ui — we do NOT ship our own. The operator's
standing rule: anything shareable lives in base and is consumed from there
(「共通化できるものは scitex-ui に入れて消費してください」). We were about to
write a private one; scitex-ui pointed out base has shipped it since 0.11.0.
Two files, in this order, and NO shell adoption is required (scitex-ui
confirmed from the source): theme.css is the TOKEN layer only — context-menu.css
consumes --bg-secondary / --border-default / --text-primary / --text-secondary.
It has hardcoded dark fallbacks, so it renders without theme.css, but then it is
permanently dark regardless of the viewer. Linking the tokens is what makes it
follow the theme.
MINIMUM scitex-ui 0.11.1, not 0.11.0: 0.11.1 adds `font-family: inherit` on
__item. Items are