From b69d2d5fc8779f43b1ac789605318488efc91361 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 23 Jan 2026 21:42:51 -1000 Subject: Fix uncomplete: add HX-Reswap header to prevent empty swap The uncomplete response was returning an empty body, causing HTMX to swap the element with nothing before the refresh-tasks trigger fired. Added HX-Reswap: none header to preserve the element while the refresh event propagates. Also fixed TestGetCardsByDateRange test data to include all required columns (list_id, list_name, url). Co-Authored-By: Claude Opus 4.5 --- internal/store/sqlite_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/store') diff --git a/internal/store/sqlite_test.go b/internal/store/sqlite_test.go index 7027cbe..5719e24 100644 --- a/internal/store/sqlite_test.go +++ b/internal/store/sqlite_test.go @@ -543,13 +543,13 @@ func TestGetCardsByDateRange(t *testing.T) { // Create cards _, err = store.db.Exec(` - INSERT INTO cards (id, name, board_id, due_date) - VALUES - (?, ?, ?, ?), - (?, ?, ?, ?) - `, - "card1", "Card 1", "board1", now, - "card2", "Card 2", "board1", tomorrow) + INSERT INTO cards (id, name, board_id, list_id, list_name, due_date, url) + VALUES + (?, ?, ?, ?, ?, ?, ?), + (?, ?, ?, ?, ?, ?, ?) + `, + "card1", "Card 1", "board1", "list1", "To Do", now, "https://trello.com/c/card1", + "card2", "Card 2", "board1", "list1", "To Do", tomorrow, "https://trello.com/c/card2") if err != nil { t.Fatalf("Failed to insert cards: %v", err) } -- cgit v1.2.3