diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-24 06:20:52 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-24 06:20:52 +0000 |
| commit | 5c659d9046add8c77bd7699961a910505dcb4bc2 (patch) | |
| tree | 8bde9a62d98d2a21f030d4c6cbd3ceecb9a7adf8 /internal/handlers/handlers.go | |
| parent | c46c135f52090a082660cb06131282796f5cd592 (diff) | |
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK
Diffstat (limited to 'internal/handlers/handlers.go')
| -rw-r--r-- | internal/handlers/handlers.go | 31 |
1 files changed, 0 insertions, 31 deletions
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 { |
