From bc3d8e63557e6ef012de5a8d793b3ecd0c2ab9a7 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Sun, 17 May 2026 10:24:39 +0200 Subject: [PATCH] fix(17): return TabloOverviewTabFragment on HX-Request for overview tab TabloDetailHandler was always rendering the full page regardless of HX-Request, causing HTMX to swap the entire layout (sidebar, header) into #tab-content instead of just the overview fragment. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- backend/internal/web/handlers_tablos.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/web/handlers_tablos.go b/backend/internal/web/handlers_tablos.go index 2dbaad0..a60ea46 100644 --- a/backend/internal/web/handlers_tablos.go +++ b/backend/internal/web/handlers_tablos.go @@ -218,6 +218,10 @@ func TabloDetailHandler(deps TablosDeps) http.HandlerFunc { sidebarTablos = []sqlc.Tablo{} } w.Header().Set("Content-Type", "text/html; charset=utf-8") + if r.Header.Get("HX-Request") == "true" { + _ = templates.TabloOverviewTabFragment(tablo, csrf.Token(r)).Render(r.Context(), w) + return + } _ = templates.TabloDetailPage(user, csrf.Token(r), "", sidebarTablos, tablo, tasks, nil, templates.EtapeTaskCounts{}, templates.EtapeFilter{}, nil, templates.EventsCalendar{}, templates.DiscussionTabData{}, "overview").Render(r.Context(), w) } }