docs: document Phase 24 bug fixes and UI polish in PLAN.md
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -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/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
|
- `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)
|
#### Deployment steps (existing unraid stack)
|
||||||
1. `git pull` on unraid (or however you deploy the server)
|
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`
|
2. Run migration: `docker compose exec db psql -U yarisobd -d yarisobd -f /docker-entrypoint-initdb.d/migrate_phase24.sql`
|
||||||
|
|||||||
Reference in New Issue
Block a user