From c46c135f52090a082660cb06131282796f5cd592 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 23 Aug 2026 17:43:49 +0000 Subject: Remove unused /tabs/conditions partial and route Only the standalone /conditions page was ever meant to exist; the HTMX tab variant was dead weight, reachable only via an unlinked ?tab=conditions query param with no button in the tab bar. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK --- .agent/design.md | 1 - cmd/dashboard/main.go | 1 - internal/handlers/handlers.go | 5 -- internal/handlers/handlers_test.go | 15 ---- web/templates/partials/conditions-tab.html | 125 ----------------------------- 5 files changed, 147 deletions(-) delete mode 100644 web/templates/partials/conditions-tab.html diff --git a/.agent/design.md b/.agent/design.md index 467b44a..47ff403 100644 --- a/.agent/design.md +++ b/.agent/design.md @@ -830,7 +830,6 @@ npx tailwindcss -i web/static/css/input.css -o web/static/css/output.css --watch | GET | `/tabs/planning` | Planning partial | | GET | `/tabs/meals` | Meals partial | | GET | `/tabs/shopping` | Shopping partial | -| GET | `/tabs/conditions` | Conditions partial | | GET | `/conditions` | Live feeds page (public) | | POST | `/complete-atom` | Complete task/card/bug | | POST | `/uncomplete-atom` | Reopen task/card | diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index a84c32d..c88dc45 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -337,7 +337,6 @@ func main() { r.Get("/tabs/meals", h.HandleTabMeals) r.Get("/tabs/timeline", h.HandleTimeline) r.Get("/tabs/shopping", h.HandleTabShopping) - r.Get("/tabs/conditions", h.HandleTabConditions) // Trello card operations r.Post("/cards", h.HandleCreateCard) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index fc66f84..fc75b61 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -1262,11 +1262,6 @@ func mealTypeOrder(mealType string) int { } } -// HandleTabConditions renders the Conditions tab with live feeds -func (h *Handler) HandleTabConditions(w http.ResponseWriter, r *http.Request) { - HTMLResponse(w, h.renderer, "conditions-tab", nil) -} - // HandleConditionsPage renders the standalone Conditions page with live feeds func (h *Handler) HandleConditionsPage(w http.ResponseWriter, r *http.Request) { if err := h.renderer.Render(w, "conditions.html", nil); err != nil { diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index 93afba5..ca24778 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -1320,21 +1320,6 @@ func TestParseFormOr400(t *testing.T) { // Timeline and Conditions Handler Tests // ============================================================================= -func TestHandleTabConditions(t *testing.T) { - h, cleanup := setupTestHandler(t) - defer cleanup() - - req := httptest.NewRequest("GET", "/tabs/conditions", nil) - w := httptest.NewRecorder() - - h.HandleTabConditions(w, req) - - // May return 500 if template not found, but the handler is executed - if w.Code != http.StatusOK && w.Code != http.StatusInternalServerError { - t.Errorf("Expected status 200 or 500, got %d", w.Code) - } -} - func TestHandleConditionsPage(t *testing.T) { h, cleanup := setupTestHandler(t) defer cleanup() diff --git a/web/templates/partials/conditions-tab.html b/web/templates/partials/conditions-tab.html deleted file mode 100644 index caae0e5..0000000 --- a/web/templates/partials/conditions-tab.html +++ /dev/null @@ -1,125 +0,0 @@ -{{define "conditions-tab"}} -
- -
-

- 🌋 Kilauea Webcams - (auto-refresh every 60s) -

-
- -
- - V1cam - West Rim - -
- V1cam - West Rim -
-
- - -
- - V2cam - East Rim - -
- V2cam - East Rim -
-
- - -
- - F1cam - Thermal - -
- F1cam - Thermal -
-
-
- -
- - -
- -
-

- 🌴 Local Weather -

-
-
- -
- -
-
- - -
-

- 🇺🇸 National Weather -

-
-
- -
- -
-
-
-
- - -{{end}} -- cgit v1.2.3