The vendored static/vendor/htmx.min.js turned out to be a 33-byte placeholder, so the hx-get/hx-target/hx-trigger attributes on the overlay file tree's folder buttons were inert: clicks rotated the chevron (own JS) but never fetched. Switch the lazy-load to a ~30-line plain-JS handler in static/js/file-tree.js that fetches button.dataset.filesUrl on first expand and dedupes via dataset.loaded. Update the spec/plan to match. Route + partial contracts unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
874 B
HTML
22 lines
874 B
HTML
{% if entry.kind == 'dir' %}
|
||
<li class="file-tree-row file-tree-row-dir">
|
||
<button type="button"
|
||
class="file-tree-toggle"
|
||
aria-expanded="false"
|
||
data-files-url="/overlays/{{ overlay.id }}/files?path={{ entry.rel|urlencode }}">
|
||
<span class="chevron" aria-hidden="true">›</span>{{ entry.name }}/
|
||
</button>
|
||
<div class="file-tree-children" hidden></div>
|
||
</li>
|
||
{% else %}
|
||
<li class="file-tree-row file-tree-row-file">
|
||
{% if entry.broken %}
|
||
<span>{{ entry.name }}</span>
|
||
<span class="file-tree-badge file-tree-badge-warn">broken link</span>
|
||
{% else %}
|
||
<a href="/overlays/{{ overlay.id }}/files/download?path={{ entry.rel|urlencode }}">{{ entry.name }}</a>
|
||
{% if entry.is_symlink %}<span class="file-tree-badge">link</span>{% endif %}
|
||
<span class="muted">{{ entry.size_human }}</span>
|
||
{% endif %}
|
||
</li>
|
||
{% endif %}
|