From 5c659d9046add8c77bd7699961a910505dcb4bc2 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 24 Aug 2026 06:20:52 +0000 Subject: Remove confirmed-orphaned routes, handlers, and templates From the sitemap audit: /tabs/meals (same dead-tab pattern as the removed /tabs/conditions, only reachable via ?tab=meals with no nav button), /partials/lists (superseded by inline .Lists rendering in trello-board.html), /shopping/toggle and /shopping/mode/{store}/toggle (superseded by the one-way complete/filter model), plus the orphaned trello-boards.html and error-banner.html templates that nothing rendered or included. Rewrote the meals grouping test to exercise groupMeals() directly since that logic is still live via the timeline. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK --- internal/handlers/handlers.go | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'internal/handlers/handlers.go') diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index fc75b61..69e1c65 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -787,23 +787,6 @@ func (h *Handler) HandleUnifiedAdd(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } -// HandleGetListsOptions returns HTML options for lists in a given board -func (h *Handler) HandleGetListsOptions(w http.ResponseWriter, r *http.Request) { - boardID := r.URL.Query().Get("board_id") - if boardID == "" { - JSONError(w, http.StatusBadRequest, "board_id is required", nil) - return - } - - lists, err := h.trelloClient.GetLists(r.Context(), boardID) - if err != nil { - JSONError(w, http.StatusInternalServerError, "Failed to fetch lists", err) - return - } - - HTMLResponse(w, h.renderer, "lists-options", lists) -} - // taskDetailData is what the "task-detail" template renders (the modal // opened from any tab's task card). Recurrence fields are doot-native only. type taskDetailData struct { @@ -1234,20 +1217,6 @@ type CombinedMeal struct { Meals []models.Meal // original meal records } -// HandleTabMeals renders the Meals tab (PlanToEat) -func (h *Handler) HandleTabMeals(w http.ResponseWriter, r *http.Request) { - startDate := config.Today() - endDate := startDate.AddDate(0, 0, 7) - - meals, err := h.store.GetMeals(startDate, endDate) - if err != nil { - JSONError(w, http.StatusInternalServerError, "Failed to fetch meals", err) - return - } - - HTMLResponse(w, h.renderer, "meals-tab", struct{ Meals []CombinedMeal }{groupMeals(meals)}) -} - // mealTypeOrder returns sort order for meal types func mealTypeOrder(mealType string) int { switch mealType { -- cgit v1.2.3