# TASK.md — v0.13.0 UI Polish Fixes **Version:** v0.13.0 **Type:** UI polish — 8 independent fixes **Files likely affected:** `dashboard.html`, `backups.html`, `deploy.html`, `monitoring.html`, `style.css`, `handlers.go`, `alerts.go` Read `CLAUDE.md`, `controller/README.md`, and `CONTEXT.md` before starting. --- ## Fix 1: Dashboard backup card missing border **Problem:** The "Biztonsági mentés" card on the Vezérlőpult page has no visible border/box, unlike all other sections on the page (stats-grid, system-info-card, stack-list). It looks out of place. **Solution:** The `.backup-status-card` in `dashboard.html` needs the same card styling as `.system-info-card` — a border, background, and border-radius consistent with the dark card style used throughout the UI. **Where:** - `style.css`: Check if `.backup-status-card` already has card-like styling. If not, add `border: 1px solid var(--border)`, `background: var(--card-bg)`, `border-radius: 12px`, `padding` — match whatever `.system-info-card` or `.monitor-card` uses. --- ## Fix 2: Show auto-generated env values on deploy page **Problem:** When an app is already deployed, auto-generated values (Domain, DB password, etc.) only show a label + "✓ Automatikusan generálva" green badge. The actual values are hidden. Users need to see what was generated (e.g., to configure DNS, or to log into the app's DB). **Solution:** Show the actual values in read-only fields. Passwords should be masked by default with a show/hide toggle (eye icon button), like the restic password on the backup page. Non-secret values (like Domain) should be shown in plain text. **Where:** - `deploy.html`: In the "Automatikusan generált értékek" section, replace the simple badge-only display with actual field values. For each auto field: - If the field type is `password` or the key contains `PASSWORD`/`SECRET`/`KEY`: render a read-only `` with a toggle-visibility button (eye icon). Use the same pattern as the restic password field in `backups.html` ("Megjelenítés" / "Elrejtés" toggle button). - Otherwise (domain, non-secret values): render a read-only `` showing the value, plus a "Másolás" (copy) button. - Keep the "✓ Automatikusan generálva" badge too, but next to the field, not replacing it. - `handlers.go` (`deployHandler`): The auto field values need to be passed to the template. Currently `AutoFields` comes from `meta.AutoGeneratedFields()`. Check if the values are already populated from `app.yaml` for deployed apps. If not, read them from the stack's `.env` file or `app.yaml` `env_values` map. The values must be available in the template data. - `style.css`: Add styling for the auto-field display (read-only input + button group), keeping it consistent with the rest of the deploy form. **Important:** Only show values for already-deployed apps. For new deployments (not yet deployed), keep the current behavior (just show the badge, since values haven't been generated yet). --- ## Fix 3: Temperature value not visible enough on dashboard **Problem:** The temperature display in the system info card blends into the heading text. The small colored dot + number isn't prominent enough. **Solution:** Make the temperature more visually distinct: - Increase the font size of the temperature value (make it match the other metric values like memory/CPU percentages) - Add a background pill/badge around the temperature value with a subtle color matching the status (green/yellow/red background with low opacity) - Keep the colored dot but make it slightly larger **Where:** - `dashboard.html`: The temperature is in the `.system-info-item` for "HŐMÉRSÉKLET". Ensure the value part (`{{fmtTemp ...}}°C`) has a dedicated class for styling. - `style.css`: Add/modify the temperature display class. Consider a colored background pill like: `background: rgba(35,134,54,0.15); padding: 2px 8px; border-radius: 4px;` (with color varying by temp status). The dot should be ~10-12px instead of 8px. --- ## Fix 4: Rework dashboard backup section — remove button, show compact info + warnings **Problem:** After the backup architecture overhaul, having a "Mentés most" button on the dashboard is unnecessary — backups run automatically on schedule. The dashboard should show a compact status summary with potential warnings, linking to the detailed backup page for settings and manual triggers. **Solution:** Replace the current backup card content with a compact summary: - **Status line:** "Utolsó mentés:" + timestamp (colored green if recent, yellow if >24h old, red if >48h or failed) — keep this - **DB line:** "Adatbázisok:" + count — keep this - **NEW — Tier 2 status line:** Show count of apps with Tier 2 configured vs total deployed apps. E.g., "2. mentés: 3 / 5 alkalmazás". If zero configured, show a yellow warning: "⚠ Nincs 2. mentés beállítva" - **NEW — Warnings:** If any cross-drive backup has failed status, show a compact red warning line - **Remove** the "Mentés most" button entirely - **Remove** the "Tároló méret" line (that detail belongs on the backup page) - The card title "Biztonsági mentés" should remain a clickable link to `/backups` **Where:** - `dashboard.html`: Modify the `.backup-status-card` content. Remove `triggerBackup()` JS function and the button. Add Tier 2 summary line. - `handlers.go` (`dashboardHandler`): Add data for Tier 2 summary. You can derive this from the cross-drive configs: count apps with `Enabled: true` in their cross-drive settings, and count those with last status "ok" vs "error". Pass something like `CrossDriveTotal`, `CrossDriveConfigured`, `CrossDriveOK`, `CrossDriveFailed` to the template. - `style.css`: Minor adjustments if needed for the warning line styling. --- ## Fix 5: HDD warning banner — only on Vezérlőpult and Rendszermonitor **Problem:** The yellow "Az adattároló nem külön meghajtón van" warning banner appears on ALL pages via `layout.html`. This is overkill for pages like Alkalmazások or Beállítások, and it cannot be dismissed. **Solution:** Show this specific warning only on the Vezérlőpult (dashboard) and Rendszermonitor (monitoring) pages, positioned under the system drive usage bar rather than at the very top. **Implementation approach:** The alert system already supports filtering via `GetAlerts(excludeIDs ...string)`. The disk/HDD-related warnings come from `report.Warnings` and get hashed IDs like `"health-XXXXXXXX"`. 1. In `alerts.go` `Refresh()`: Tag disk-related warnings with a stable, recognizable ID prefix. When generating alerts from `report.Warnings`, check if the warning text contains HDD/disk keywords (like "adattároló", "meghajtó", "nem külön meghajtón") and give those a stable ID like `"disk-not-separate"` instead of the hash-based `"health-XXXXXXXX"`. 2. Also add a `PageOnly []string` field to the `Alert` struct so the layout can conditionally render them. **Recommended approach:** Add a `PageOnly []string` field to `Alert`. In `Refresh()`, set `PageOnly: []string{"dashboard", "monitoring"}` for disk warnings. In `layout.html`, wrap each alert render with a page check: ```html {{range .Alerts}} {{if or (not .PageOnly) (pageMatch .PageOnly $.Page)}}
{{end}} {{end}} ``` Add a `pageMatch` template function in `funcmap.go` that checks if a string is in a slice. The `.Page` value is already set by `baseData()`. **Where:** - `alerts.go`: Add `PageOnly []string` to `Alert` struct. In `Refresh()`, set `PageOnly: []string{"dashboard", "monitoring"}` for disk-related warnings (detect by checking if the warning message contains "meghajtó" or "adattároló" keywords, or better: use a dedicated health-check category if available). - `layout.html`: Add the `pageMatch` filter around alert rendering. - `funcmap.go`: Add `"pageMatch"` template function. --- ## Fix 6: Move Tárhely section higher on Rendszermonitor page **Problem:** The storage (Tárhely) section is the very last section on the monitoring page, below all CPU/memory/temperature charts. Storage is basic system info that should be visible without scrolling past graphs. **Solution:** Move the Tárhely section to be right after "Rendszer áttekintés" — before "Távoli monitoring" and before all the charts. **Where:** - `monitoring.html`: Cut the entire `` block (the `.monitor-card` with `