From f106d4c801551e86d1c317e92890d621ca8ce0f8 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 12 Feb 2026 13:09:34 -0600 Subject: [PATCH] fix: prevent back-button trap on device show page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit push_patch without replace: true created a history entry loop: /devices/:id → /devices/:id?tab=overview, so hitting back would immediately redirect forward again, trapping the user. --- lib/towerops_web/live/device_live/show.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/towerops_web/live/device_live/show.ex b/lib/towerops_web/live/device_live/show.ex index 32369119..7d96201f 100644 --- a/lib/towerops_web/live/device_live/show.ex +++ b/lib/towerops_web/live/device_live/show.ex @@ -66,7 +66,7 @@ defmodule ToweropsWeb.DeviceLive.Show do {:noreply, socket} else # Redirect to add default tab to URL - {:noreply, push_patch(socket, to: ~p"/devices/#{id}?tab=overview")} + {:noreply, push_patch(socket, to: ~p"/devices/#{id}?tab=overview", replace: true)} end {:error, :not_found} ->