15 Commits

Author SHA1 Message Date
iterminate 3b2029d3b8 Add logbook entries, data export page, and JSON import 2026-04-26 20:03:58 -05:00
iterminate 3e75bb3ab4 Add required battery_size to devices, filter install panels by size 2026-04-19 14:48:55 -05:00
iterminate b90ab7b2b6 Add location field to devices with dropdown selector 2026-04-18 15:36:01 -05:00
iterminate d00695cd51 Device detail UI cleanup: battery icon, HA live % unknown state, remove redundant entity row 2026-04-14 01:55:29 -05:00
iterminate a9d0b3fc63 Replace datalist with custom autocomplete dropdown for HA entity field (mobile fix) 2026-04-14 01:38:42 -05:00
iterminate b6a3533fed HA improvements: entity overflow fix, live % fetch on device page, searchable entity dropdown 2026-04-14 01:17:53 -05:00
iterminate 8c06478bca Add optional Home Assistant integration for battery percentage tracking 2026-04-13 20:10:23 -05:00
iterminate 6597fcd4ac Sticky bulk toolbar on dashboard; anchor scroll on device unassign 2026-04-13 07:23:36 -05:00
iterminate 3bc897c1e5 Add device_type field, mobile-friendly improvements, and device filtering
- Device model: add device_type column (String 50, nullable)
- Device add/edit: type select with presets + custom entry
- Device detail: show type in info card; new Edit Device form
- Device list: Type column + client-side filter bar (type + text search)
- Mobile: card-style responsive tables on dashboard and device list,
  form-grid-2col collapse, larger tap targets, stacked form-actions,
  column picker viewport fix, filter bar full-width controls
- Assign page: larger radio touch targets (min-height 44px)
- 3 new acceptance tests for device_type (45 total)
2026-04-12 22:02:29 -05:00
iterminate b7e2d54bd2 Fix unassign from device detail redirecting to dashboard
Pass a 'next' hidden field from the device detail unassign form so the
route redirects back to the device page instead of the dashboard.
2026-04-12 21:11:44 -05:00
iterminate 81e87d2fe2 Add inline assign from dashboard, specific battery picker on device, dynamic install rows
- Dashboard: replace Assign link with device dropdown + arrow button for
  quick inline assignment without leaving the page
- Device detail: replace hardcoded 4-row install form with 1 row + '+ Add
  brand' button that clones rows dynamically
- Device detail: add 'Install Specific Battery' card with dropdown of all
  available batteries (label, brand, size, notes) via new /device/<id>/install-one route
- Tests: 4 new acceptance tests covering dashboard quick-assign and
  install-one, including capacity enforcement on both paths (39 total)
2026-04-12 20:15:29 -05:00
iterminate 47e1059532 Replace datalist autocomplete with select dropdown for brand fields
datalist only shows suggestions when typing, not on click. Switched to
a <select> showing all known brands plus a 'New brand...' option that
reveals a text input for entering a new brand name.
2026-04-12 14:20:03 -05:00
iterminate 709e0d6119 Add brand autocomplete dropdown to battery add and device install forms
Uses HTML datalist populated from distinct brands in the battery table.
Removed autocomplete="off" which suppresses datalist in Chrome/Chromium.
2026-04-12 13:31:19 -05:00
iterminate 1f5234a3e9 Simplify battery management: bulk add, device-level auto-install, mass operations
- Replace single-battery add form with bulk add (brand + count, auto-generated labels)
- Add device-level install form: specify brand+qty pairs, system autoselects available batteries
- Add bulk actions on dashboard: retire, delete, unassign, change brand (checkbox multi-select)
- Keep per-battery assign route for special cases (e.g. known low-capacity battery)
- Remove unique constraint on Battery.label (labels are now auto-generated)
- Add *.snapshot to .gitignore for DB snapshot files
- Rewrite tests: 35 passing (11 new tests for bulk-add, device-install, bulk-actions)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 12:57:10 -05:00
iterminate 6ea3eae981 Initial commit: Flask battery tracker app
- Flask + SQLAlchemy (MariaDB-compatible schema) battery tracking web app
- 40 pre-seeded batteries (Eneloop, BONAI, Energizer NiMH) across 5 devices
- Business rules: block retired assignment, brand-mix warnings, capacity checks
- Mobile-friendly Jinja2 templates with inline CSS
- waitress WSGI server via systemd user service (sbin/install-service.sh)
- SQLite → MariaDB migration script (migrate_to_mariadb.py)
- 26 passing acceptance tests (pytest + Flask test client)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 22:38:16 -05:00