fix: html-router modals and add insta snapshot tests.

Avoid nested forms in the scratchpad editor, centralize modal lifecycle in modal.js, return HTMX partials from archive, and add template compile plus layout snapshots.
This commit is contained in:
Per Stark
2026-06-03 20:20:43 +02:00
parent 2a28243213
commit 7b850769c9
29 changed files with 1426 additions and 217 deletions
@@ -19,17 +19,12 @@ hx-swap="outerHTML"
{% endblock %}
{% block primary_actions %}
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2" id="reset_prompt_button">
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2"
data-reset-target="textarea[name=query_system_prompt]">
Reset to Default
</button>
<textarea id="default_prompt_content" style="display:none;">{{ default_query_prompt }}</textarea>
<script>
document.getElementById('reset_prompt_button').addEventListener('click', function () {
const defaultContent = document.getElementById('default_prompt_content').value;
document.querySelector('textarea[name=query_system_prompt]').value = defaultContent;
});
</script>
<button type="submit" class="nb-btn nb-cta w-full sm:w-auto">
<span class="htmx-indicator hidden">