From a38abc90ee4fe00bf0fbdf897c5ef93e80e0c256 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 19 Jan 2026 09:54:42 -1000 Subject: Refactor: Add cache key constants and configurable template path Code quality improvements: - Define CacheKey* constants in store package for type safety - Add TemplateDir to config (default: web/templates, env: TEMPLATE_DIR) - Update handlers to use store.CacheKey* instead of hardcoded strings - Update NewTabsHandler to accept templateDir parameter - Use filepath.Join for cross-platform template path construction Co-Authored-By: Claude Opus 4.5 --- internal/handlers/heuristic_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/handlers/heuristic_test.go') diff --git a/internal/handlers/heuristic_test.go b/internal/handlers/heuristic_test.go index f76fdc0..dc8620a 100644 --- a/internal/handlers/heuristic_test.go +++ b/internal/handlers/heuristic_test.go @@ -63,7 +63,7 @@ func TestHandleTasks_Heuristic(t *testing.T) { } // Create Handler - h := NewTabsHandler(db) + h := NewTabsHandler(db, "../../web/templates") // Skip if templates are not loaded if h.templates == nil { -- cgit v1.2.3