From f3b6f3bcfbbc36af3c8dfc7d5d50db09e4d39d72 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Feb 2026 08:17:58 +0000 Subject: [PATCH] Disable Turbo prefetch on dashboard outflow category links Hovering over category links in the outflow donut chart triggered Turbo 8's default link prefetching, which made a real request to the transactions controller. The controller's store_params! before_action saved those filter params (category + date range) to the session. When the user later navigated to /transactions via the nav menu, the stored params were restored, showing an unexpected filtered view. Adding data-turbo-prefetch="false" prevents the prefetch on hover while preserving the intended click-to-navigate behavior. https://claude.ai/code/session_01Na7AF1wyidPwFdPq5w8oaw --- app/views/pages/dashboard/_outflows_donut.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/pages/dashboard/_outflows_donut.html.erb b/app/views/pages/dashboard/_outflows_donut.html.erb index 0787c418c..5079dcc9d 100644 --- a/app/views/pages/dashboard/_outflows_donut.html.erb +++ b/app/views/pages/dashboard/_outflows_donut.html.erb @@ -104,6 +104,7 @@ class: "flex items-center justify-between mx-3 p-3 rounded-lg cursor-pointer group gap-3", data: { turbo_frame: "_top", + turbo_prefetch: false, category_id: category[:id], action: "mouseenter->donut-chart#highlightSegment mouseleave->donut-chart#unhighlightSegment" } do %>