diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-23 17:43:49 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-23 17:43:49 +0000 |
| commit | c46c135f52090a082660cb06131282796f5cd592 (patch) | |
| tree | 59930d5950aa64f24efcd38fbdd727c2a68d4e26 | |
| parent | 18783b813af946e1e940bfeb1a0bdc1e7ce9f95f (diff) | |
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK
| -rw-r--r-- | .agent/design.md | 1 | ||||
| -rw-r--r-- | cmd/dashboard/main.go | 1 | ||||
| -rw-r--r-- | internal/handlers/handlers.go | 5 | ||||
| -rw-r--r-- | internal/handlers/handlers_test.go | 15 | ||||
| -rw-r--r-- | web/templates/partials/conditions-tab.html | 125 |
5 files changed, 0 insertions, 147 deletions
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"}} -<div class="space-y-6 text-shadow-sm" - hx-get="/tabs/conditions" - hx-trigger="refresh-tasks from:body" - hx-target="#tab-content" - hx-swap="innerHTML"> - <!-- Kilauea Webcams --> - <div> - <h2 class="text-lg font-semibold mb-3 flex items-center gap-2 text-white/90"> - <span>🌋</span> Kilauea Webcams - <span class="text-xs text-white/50 font-normal">(auto-refresh every 60s)</span> - </h2> - <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> - <!-- V1cam - West Halemaʻumaʻu --> - <div class="bg-black/40 backdrop-blur-sm rounded-lg overflow-hidden"> - <a href="https://www.youtube.com/live/HggWKlZv9yk" target="_blank"> - <img id="v1cam" - src="https://volcanoes.usgs.gov/observatories/hvo/cams/V1cam/images/M.jpg" - alt="V1cam - West Rim" - class="w-full aspect-video object-cover hover:opacity-90 transition-opacity" - loading="lazy"> - </a> - <div class="p-2 text-center"> - <span class="text-xs text-white/60">V1cam - West Rim</span> - </div> - </div> - - <!-- V2cam - East Halemaʻumaʻu --> - <div class="bg-black/40 backdrop-blur-sm rounded-lg overflow-hidden"> - <a href="https://www.youtube.com/live/Tz5tPqRRv1Y" target="_blank"> - <img id="v2cam" - src="https://volcanoes.usgs.gov/cams/V2cam/images/M.jpg" - alt="V2cam - East Rim" - class="w-full aspect-video object-cover hover:opacity-90 transition-opacity" - loading="lazy"> - </a> - <div class="p-2 text-center"> - <span class="text-xs text-white/60">V2cam - East Rim</span> - </div> - </div> - - <!-- F1cam - Thermal --> - <div class="bg-black/40 backdrop-blur-sm rounded-lg overflow-hidden"> - <a href="https://www.usgs.gov/observatories/hvo/multimedia/webcams" target="_blank"> - <img id="f1cam" - src="https://volcanoes.usgs.gov/observatories/hvo/cams/F1cam/images/M.jpg" - alt="F1cam - Thermal" - class="w-full aspect-video object-cover hover:opacity-90 transition-opacity" - loading="lazy"> - </a> - <div class="p-2 text-center"> - <span class="text-xs text-white/60">F1cam - Thermal</span> - </div> - </div> - </div> - <div class="mt-2 text-center"> - <a href="https://www.usgs.gov/volcanoes/kilauea/webcams" target="_blank" - class="text-xs text-white/50 hover:text-white/70">View all USGS webcams →</a> - </div> - </div> - - <!-- Weather Maps --> - <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> - <!-- Local Weather (Big Island) --> - <div> - <h2 class="text-lg font-semibold mb-3 flex items-center gap-2 text-white/90"> - <span>🌴</span> Local Weather - </h2> - <div class="bg-black/40 backdrop-blur-sm rounded-lg overflow-hidden"> - <div class="aspect-video"> - <iframe - src="https://embed.windy.com/embed2.html?lat=19.5&lon=-155.5&zoom=6&level=surface&overlay=rain&product=ecmwf&menu=&message=true&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=mph&metricTemp=%C2%B0F&radarRange=-1" - class="w-full h-full" - frameborder="0" - loading="lazy"> - </iframe> - </div> - <div class="p-2 text-center"> - <a href="https://www.windy.com/?19.5,-155.5,6" target="_blank" - class="text-xs text-white/60 hover:text-white/90">Open in Windy →</a> - </div> - </div> - </div> - - <!-- National Weather --> - <div> - <h2 class="text-lg font-semibold mb-3 flex items-center gap-2 text-white/90"> - <span>🇺🇸</span> National Weather - </h2> - <div class="bg-black/40 backdrop-blur-sm rounded-lg overflow-hidden"> - <div class="aspect-video"> - <iframe - src="https://embed.windy.com/embed2.html?lat=39&lon=-98&zoom=2&level=surface&overlay=rain&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=mph&metricTemp=%C2%B0F&radarRange=-1" - class="w-full h-full" - frameborder="0" - loading="lazy"> - </iframe> - </div> - <div class="p-2 text-center"> - <a href="https://www.windy.com/?39,-98,2" target="_blank" - class="text-xs text-white/60 hover:text-white/90">Open in Windy →</a> - </div> - </div> - </div> - </div> -</div> - -<script> -// Auto-refresh webcam images every 60 seconds -(function() { - function refreshCams() { - var cams = ['v1cam', 'v2cam', 'f1cam']; - var ts = Date.now(); - cams.forEach(function(id) { - var img = document.getElementById(id); - if (img) { - var src = img.src.split('?')[0]; - img.src = src + '?t=' + ts; - } - }); - } - setInterval(refreshCams, 60000); -})(); -</script> -{{end}} |
