From f30143c7b79c6aceff040c2b9e5888fcb04e5e07 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Mon, 10 Aug 2026 05:07:20 -0400 Subject: [PATCH] docs: document Phase 24 bug fixes and UI polish in PLAN.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- PLAN.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PLAN.md b/PLAN.md index 0d5672c..f064876 100644 --- a/PLAN.md +++ b/PLAN.md @@ -1292,6 +1292,17 @@ including two UX polish passes and multiple bug-fix rounds. - `server/docker-compose.yml`: build `context: ..`, `dockerfile: server/Dockerfile`; added `SECRET_KEY` and `DEVICE_NAME` env vars; added `migrate_phase24.sql` mount (for existing deployments) - `server/.env.example`: added `SECRET_KEY`, `DEVICE_NAME` entries with generation instructions +#### Bug fixes and UI polish (post-deploy) +- `/api/trips` was returning a bare array; `history.js` expected `{trips:[...]}` wrapper → fixed +- `formatSpeed(null)`, `formatDistance(null)`, `trip.odo_start_km.toFixed(0)` crashed on null data → null guards added in `static/js/history.js` +- Map tiles loaded grey: server has no offline tile cache → `history.js` now reads `data-tile-url` attribute from `#history-map` div; Pi template uses `/static/vendor/tiles/{z}/{x}/{y}.png`, server template uses OSM `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png` +- Geocode returned `name` key; `history.js` expected `label` → server geocode now returns `label` +- Delete buttons: Bootstrap Modal `.getOrCreate()` was silently failing (async timing) → replaced with synchronous `window.confirm()` defined in `base.html` as `window.confirmDelete` +- Trip row delete button was wrapping to a new line → added `text-nowrap` to cell, removed whitespace between buttons in template +- Sidebar flash on page navigation: `theme.js` was restoring collapsed state with CSS transitions active → added transition suppression (set `transition: none` on sidebar + contentWrapper + toggleBtn before applying state, re-enable after two `requestAnimationFrame` calls) +- Sidebar toggle arrow direction wrong when collapsed: CSS already applies `transform: rotate(180deg)` to `.app-sidebar.collapsed .sidebar-collapse-btn`; the JS was also swapping the icon class (`fa-chevron-left` ↔ `fa-chevron-right`), causing a double-flip → removed JS icon class swap entirely, CSS handles it +- Added `.app-sidebar.collapsed .sidebar-env-badge { display: none }` and `.sidebar-user-text { opacity: 0; width: 0 }` CSS in `base.html` so badge and username hide correctly when sidebar is collapsed + #### Deployment steps (existing unraid stack) 1. `git pull` on unraid (or however you deploy the server) 2. Run migration: `docker compose exec db psql -U yarisobd -d yarisobd -f /docker-entrypoint-initdb.d/migrate_phase24.sql`