From ed3470124e93995074596f209b19c91244533f43 Mon Sep 17 00:00:00 2001 From: Chuck Smith Date: Mon, 25 May 2026 11:40:09 -0400 Subject: [PATCH] =?UTF-8?q?Add=20Turbo=20Frame=20for=20job=20filter=20?= =?UTF-8?q?=E2=80=94=20partial=20page=20reload=20without=20full=20refresh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wraps the filter form and results table in a so selecting a queue, priority, period, or submitting a search reloads only that region. requestSubmit() replaces form.submit() on select onChange so Turbo intercepts the event rather than bypassing it. data-turbo-action="advance" keeps the browser URL in sync. Turbo JS loaded from esm.sh in the engine layout since the engine renders its own . Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 1 + app/views/layouts/solid_stack_web/application.html.erb | 1 + app/views/solid_stack_web/jobs/index.html.erb | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc99b58..f5ca589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Job filtering — filter the jobs list by queue name, job class (substring), priority, and time period (1h / 24h / 7d / all) via query-param driven scopes; active filters are preserved across status tabs +- Job filter Turbo Frame — filter form and results table wrapped in a `` so applying filters reloads only the table without a full page refresh; `data-turbo-action="advance"` keeps the URL in sync; Turbo JS loaded from esm.sh CDN in the engine layout ## [0.1.0] - 2026-05-24 diff --git a/app/views/layouts/solid_stack_web/application.html.erb b/app/views/layouts/solid_stack_web/application.html.erb index 7b9b998..b34694c 100644 --- a/app/views/layouts/solid_stack_web/application.html.erb +++ b/app/views/layouts/solid_stack_web/application.html.erb @@ -7,6 +7,7 @@ <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= inline_styles %> +
diff --git a/app/views/solid_stack_web/jobs/index.html.erb b/app/views/solid_stack_web/jobs/index.html.erb index c9938eb..e61a5f6 100644 --- a/app/views/solid_stack_web/jobs/index.html.erb +++ b/app/views/solid_stack_web/jobs/index.html.erb @@ -9,13 +9,14 @@ <% end %> +
<%= hidden_field_tag :status, @status %> <%= hidden_field_tag :period, @period %> <% if @queue_options.size > 1 %> - <% @queue_options.each do |q| %> @@ -23,7 +24,7 @@ <% end %> <% if @priority_options.size > 1 %> - <% @priority_options.each do |p| %> @@ -84,4 +85,5 @@ <% else %> <%= render "empty" %> <% end %> - \ No newline at end of file + + \ No newline at end of file