Commit Graph
3 Commits
Author SHA1 Message Date
kawa 7b948b68c3 feat(11-02): UIE-01 edit modal — Edit button per row, Pico dialog, E2E tests
- Create printer_edit_modal.html: native dialog with HTMX PATCH form, Alpine.js portEdited=true
- Update printer_list.html Actions td: include edit modal partial before Delete button
- Create tests/e2e/test_printer_edit.py: modal open/pre-fill and submit/list-update E2E tests
- Fix E2E row targeting to use locator(tr, has=a:has-text) for session-scoped server safety
2026-04-15 11:10:44 +02:00
kawa cad664c0f6 feat(03-02): implement printer detail page with driver info and regenerate placeholder
- Add GET /printers/{printer_id} route to pages.py with LEFT OUTER JOINs on Client and Driver
- Create printer_detail.html full-page template showing all config fields and driver info
- Display "No driver assigned" when driver FK is null
- Add disabled "Regenerate Package" button (Phase 4 placeholder)
- Make printer names in printer_list.html clickable links to detail page
2026-04-10 13:04:52 +02:00
kawa 356c2ee690 feat(03-01): implement printer and client CRUD with HTMX/Alpine.js UI
- imptune/api/printers.py: POST /printers (all form fields, checkbox->bool,
  FK resolution), DELETE /printers/{id}, grouped list renderer with LEFT JOIN
- imptune/api/clients.py: POST /clients with duplicate-name handling
- imptune/api/pages.py: GET /printers and GET /clients page routes
- imptune/main.py: register printers + clients routers; close db on shutdown
- imptune/db/database.py: close existing connection before re-init (test isolation)
- templates: printers.html, clients.html, printer_form.html (Alpine.js port
  auto-derivation), printer_list.html (grouped by client), client_list.html
- tests/conftest.py: close test-thread db connection in fixture teardown
- tests/test_printer_crud.py: updated to use list(select().where()) for DB
  queries (avoids Peewee thread-local cursor caching across test boundaries)

Auto-fix [Rule 1 - Bug]: DB test isolation — Peewee thread-local connections
persisted across tests causing stale DB reads; fixed via conftest teardown and
lifespan db.close() on shutdown.
2026-04-10 12:56:09 +02:00