# TASK.md — v0.4.1: App Filtering + Bugfixes > Version bump: **v0.4.1** > Scope: UI feature + configuration fixes --- ## Overview Three items: 1. **Feature**: App filtering on the Alkalmazások (Stacks) page with clickable stat cards on the Vezérlőpult (Dashboard) page 2. **Bugfix**: felhom.demo-felhom.eu returns 404 — docker-compose.yml on demo node needs syncing 3. **Config**: Enable backup on demo node so the backup UI section appears --- ## Task 1: App Filtering ### Concept **Alkalmazások page** gets filter tabs at the top: ``` [ Mind (51) ] [ Futó (4) ] [ Leállítva (0) ] [ Telepíthető (47) ] ``` **Vezérlőpult page** stat cards become clickable — clicking navigates to the Alkalmazások page with the corresponding filter pre-selected: - Click "4 Futó alkalmazás" → `/stacks?filter=running` - Click "0 Leállítva" → `/stacks?filter=stopped` - Click "51 Összes alkalmazás" → `/stacks` (no filter = show all) ### Implementation: 100% client-side No server/handler changes needed. All filtering is done via JavaScript show/hide on existing DOM elements. ### Changes to `stacks.html` Add filter bar between the page header and the stack grid: ```html
``` Add `data-filter-state` attribute to each stack card in the `{{range .Stacks}}` loop: ```html
``` Where `filterCategory` is a new template function that maps states to filter categories: - `running` → states: running, starting, unhealthy, restarting (has containers, is "up") - `stopped` → states: stopped, exited (deployed but not running) - `available` → state: not_deployed (never deployed) ### New template function: `filterCategory` Add to `funcmap.go`: ```go "filterCategory": func(state stacks.ContainerState, deployed bool) string { switch state { case stacks.StateRunning, stacks.StateStarting, stacks.StateUnhealthy, stacks.StateRestarting: return "running" case stacks.StateStopped, stacks.StateExited, stacks.StatePaused: return "stopped" default: if deployed { return "stopped" // deployed but unknown state → treat as stopped } return "available" } }, ``` ### JavaScript for stacks.html Add a `