Commit Graph
99 Commits
Author SHA1 Message Date
kawaandClaude Opus 4.6 973b0c7807 docs(phase-09): complete phase execution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:12:05 +02:00
kawaandClaude Opus 4.6 27ddc77ee1 fix(inf-parser): tolerate bare-line sections in real vendor INFs
Real INFs (e.g. Ricoh oemsetup.inf) include [SourceDisksFiles] entries
with bare filename lines (no '='), which strict configparser rejects
with ParsingError, surfacing as a 500 on /drivers/upload.

Pre-process the INF text to rewrite bare lines into synthetic
__bare_N = <line> entries before parsing, and filter those synthetic
keys out of DriverDesc extraction so they cannot leak into driver_names.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:11:45 +02:00
kawa 37a06dac89 docs(09-02): complete playwright-port-autofill plan
- Create 09-02-SUMMARY.md with Playwright e2e evidence for UX-02
- Update STATE.md: decisions, session continuity, progress bar
- Update ROADMAP.md: phase 9 marked complete (3/3 plans with summaries)
- Update REQUIREMENTS.md: UX-02 marked complete
2026-04-13 10:58:51 +02:00
kawa 322fc2050f test(09-02): add Playwright UX-02 port autofill test
- Create tests/e2e/test_port_autofill.py - headless chromium test for PRNT-03
- Verifies IP->port_name auto-derivation via Alpine @input handler at /printers
- Update 09-VALIDATION.md: mark UX-02 tasks green, cite test file as evidence
2026-04-13 10:57:07 +02:00
kawa 4e9bd9b1ab chore(09-02): add Playwright dev deps and e2e package scaffolding
- Add pytest-playwright and playwright to requirements-dev.txt
- Create tests/e2e/__init__.py package marker
- Create tests/e2e/conftest.py with session-scoped live_server fixture
2026-04-13 10:55:49 +02:00
kawa 9902e2a5b8 docs(09-01): complete driver-upload-fix-and-inline-oob plan
- Create 09-01-SUMMARY.md: documents OOB swap fix, file changes, TDD outcomes
- Update STATE.md: advance session, add decisions, update progress (94%)
- Update ROADMAP.md: phase 9 in progress (2/3 summaries)
- Update REQUIREMENTS.md: mark UX-01 complete
2026-04-13 10:53:13 +02:00
kawa 72c6a98578 feat(09-01): add inline driver upload to printer form with OOB refresh
- Add id="printer-form-driver-select" to driver <select> (OOB swap target)
- Add sibling <form hx-post="/drivers/upload"> AFTER printer </form>,
  inside Alpine x-data div — avoids invalid nested form HTML
- Hidden <input name="caller" value="printer_form"> sentinel triggers OOB path
- Add hidden <div id="driver-list"> anchor for HTMX outerHTML swap target
- Create tests/test_printer_form.py with test_printer_form_has_inline_driver_upload
  asserting stable select id, caller sentinel, and non-nested upload form

Full non-e2e suite: 112 passed.
2026-04-13 10:51:46 +02:00
kawa 10ee09a5aa fix(09-01): resolve driver upload 500 and add HTMX OOB refresh path
- Import Form from fastapi for mixed multipart + form field support
- Add caller: str = Form('') parameter to upload_driver handler
- Capture new_driver from Driver.get_or_create() return tuple
- Branch on caller == 'printer_form' to emit OOB-enabled response
- Create partials/driver_upload_with_oob.html with primary driver_list
  include + hx-swap-oob select targeting id=printer-form-driver-select
- New driver is auto-selected via new_driver_id context variable

All 13 driver upload tests pass including 4 new OOB contract tests.
Full non-e2e suite: 111 passed.
2026-04-13 10:50:27 +02:00
kawa c6fe284e28 docs(09-03): complete script-download-links plan
- Add 09-03-SUMMARY.md documenting .ps1 routes + detail-page links
- Update STATE.md with decisions and session info
- Update ROADMAP.md phase 9 progress (1/3 summaries)
- Mark UX-03 complete in REQUIREMENTS.md
2026-04-13 10:49:47 +02:00
kawa d1de8395a3 test(09-01): add failing driver upload 500 regression + OOB contract tests
- Add _make_driver_zip_with_cat() helper for .inf + .cat fixture ZIPs
- Add _make_bom_driver_zip() helper for UTF-16 LE BOM encoded INF edge case
- Add test_upload_500_regression (parametrized: plain UTF-8 + BOM variant)
- Add test_upload_returns_oob_when_called_from_form (RED: handler lacks caller param)
- Add test_upload_oob_autoselects_new_driver (RED: no OOB fragment emitted)
- Add test_upload_no_oob_from_standalone_drivers_page

OOB tests fail: handler returns driver_list.html always regardless of caller field.
500 regression tests pass: existing synthetic ZIPs work fine against current handler.
2026-04-13 10:49:34 +02:00
kawa 68a2935af2 feat(09-03): add .ps1 script download routes and detail-page links
- Refactor install/uninstall/detect handlers into shared _*_response() helpers
- Add .ps1 route aliases: /scripts/install.ps1, /scripts/uninstall.ps1, /scripts/detect.ps1
- Add Scripts section to printer_detail.html inside {% if has_driver %} with 3 download links
- All 6 new tests green, full suite 106/106 passing
2026-04-13 10:48:43 +02:00
kawa d3590017e9 test(09-03): add failing .ps1 route and detail-page link tests
- Create tests/test_script_download.py with 5 tests for .ps1 routes (install/uninstall/detect, 404, 422)
- Add test_detail_page_shows_script_links to TestCommandPreview in tests/test_packages.py
- All 6 new tests go RED (routes and template links do not exist yet)
2026-04-13 10:47:09 +02:00
kawa 71c808601c docs(09): create phase plan for UX tech debt closure
Three plans covering UX-01 (driver upload 500 fix + inline HTMX OOB
refresh on printer form), UX-02 (Playwright headless test for PRNT-03
IP->port auto-fill), and UX-03 (.ps1 script download routes + detail
page links). VALIDATION.md finalized with real task IDs and
nyquist_compliant=true. ROADMAP Phase 9 plan list filled in.
2026-04-13 10:29:43 +02:00
kawa 84a350f233 'docs(09):_add_research_validation_strategy' 2026-04-13 10:23:47 +02:00
kawaandClaude Sonnet 4.6 73ea2d7fed docs(09): research phase UX tech debt closure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:22:32 +02:00
kawa 5476160417 docs(09): capture phase context 2026-04-13 10:16:54 +02:00
kawa 57dc82876e docs(08): note driver upload 500 as pre-surfaced Nyquist gap 2026-04-13 10:04:48 +02:00
kawa e5ea4db911 docs(08): capture phase context 2026-04-13 10:02:10 +02:00
kawa d2f66d4b43 docs: create milestone v1.1 roadmap (4 phases) 2026-04-13 09:58:23 +02:00
kawa 30707f9cce docs: define milestone v1.1 requirements 2026-04-13 09:55:31 +02:00
kawa c9a7f70338 docs: start milestone v1.1 hardening and validation 2026-04-13 09:53:04 +02:00
kawaandClaude Opus 4.6 67a1cd66ec chore: complete v1.0 milestone
Archive v1.0 MVP: 7 phases, 13 plans, 27/27 requirements.

- Archive roadmap to milestones/v1.0-ROADMAP.md
- Archive requirements to milestones/v1.0-REQUIREMENTS.md
- Move milestone audit into milestones/
- Create MILESTONES.md with v1.0 entry
- Evolve PROJECT.md: move shipped requirements to Validated,
  update Context with stack/LOC, log Key Decisions with outcomes
- Collapse ROADMAP.md to one-line milestone summary
- Update STATE.md to shipped status
- Back-fill stale requirements-completed frontmatter on
  02-01, 04-01, 05-01, 06-01 SUMMARY.md files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 09:47:37 +02:00
kawa 63c935e860 docs(phase-07): complete phase execution 2026-04-13 09:01:45 +02:00
kawa 14293a8443 docs(07-01): complete dashboard and navigation polish plan
- SUMMARY.md documents /packages route, dashboard live queries, 99 tests green
- STATE.md advanced to 7/7 phases complete (100%)
- ROADMAP.md marks Phase 7 and plan 07-01 complete
2026-04-13 09:00:01 +02:00
kawa 91910ad97d feat(07-01): wire dashboard data and add /packages listing page
- Dashboard queries 5 most recent Printer records and 5 most recent driver-assigned ones
- New /packages route lists printers with drivers, with intunewin/ninja download links
- packages.html template extends base.html with Pico grid table
- Dashboard printer/package items now link to detail pages
- Quick action buttons wired to real routes (removed aria-disabled)
2026-04-13 08:58:13 +02:00
kawa 8cf47f5c89 test(07-01): add failing tests for /packages route and dashboard data
- test_packages_returns_200 asserts /packages returns 200
- test_dashboard_shows_recent_printers verifies recent printers rendered
- test_dashboard_shows_recent_packages verifies only driver-assigned printers shown
2026-04-13 08:57:20 +02:00
kawaandClaude Opus 4.6 c402bff54a docs(07): create phase plan for dashboard and navigation polish
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:05:37 +02:00
kawa 56578c8e9f docs(phase-07): add validation strategy 2026-04-10 17:03:46 +02:00
kawa 3e3d4860aa docs(phase-07): research dashboard and navigation polish phase 2026-04-10 17:02:49 +02:00
kawaandClaude Opus 4.6 9ba8743144 docs(phase-06): complete phase execution and verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:24:21 +02:00
kawa 906f3ca101 docs(06-01): complete wire-icon-intunewin plan
- SUMMARY.md: icon lookup + copy into .intunewin staging
- STATE.md: advanced to 06-01 complete, 100% progress, PKG-04 decision recorded
- ROADMAP.md: phase 06 marked Complete (1/1 plans)
- REQUIREMENTS.md: PKG-04 marked complete
2026-04-10 16:22:22 +02:00
kawa 6310be5e76 feat(06-01): wire icon into .intunewin staging before build
- Add shutil import and Icon import to packages.py
- After driver extraction, look up Icon record for printer
- If found and file exists on disk, copy to tmpdir/icon.png
- Missing icon (no DB record or missing file) silently skipped — export still succeeds
- PKG-04 requirement satisfied
2026-04-10 16:21:34 +02:00
kawa 2723cc8974 test(06-01): add failing test for icon inclusion in .intunewin export
- test_intunewin_includes_icon: uploads PNG icon, asserts icon.png in staged files
- test_intunewin_without_icon_succeeds: baseline no-icon export passes (already green)
2026-04-10 16:21:04 +02:00
kawaandClaude Opus 4.6 9f3d35b72f docs(06): create phase plan for wiring icon into intunewin export
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:41:05 +02:00
kawa 9912378563 docs(06): add research and validation strategy 2026-04-10 15:39:22 +02:00
kawaandClaude Sonnet 4.6 ba106eecbe docs(06): research phase — wire icon into .intunewin export
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:38:22 +02:00
kawaandClaude Opus 4.6 a6d8e15210 docs(roadmap): add gap closure phases 6-7
Phase 6 wires icon into .intunewin export (closes PKG-04).
Phase 7 fixes dashboard empty state and /packages 404 nav link.
PKG-04 reset to Pending in REQUIREMENTS.md traceability table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:32:52 +02:00
kawaandClaude Opus 4.6 624b3f0090 docs(phase-05): complete phase execution and verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:11:11 +02:00
kawa fba03b5241 docs(05-02): complete icon upload and export UI plan
- Create 05-02-SUMMARY.md with full execution details
- Update STATE.md progress to 100%, add 4 key decisions, record metrics
- Update ROADMAP.md phase 5 status to Complete
- Mark requirements PKG-04 and PKG-05 complete
2026-04-10 15:08:02 +02:00
kawa f96ea6fec9 feat(05-02): printer detail page with export buttons and command preview
- Update printer_detail() to pass install_cmd, uninstall_cmd, has_driver, has_icon to template
- Rewrite printer_detail.html with Intune Commands, Export, and Icon sections
- Show command strings with Alpine.js copy-to-clipboard buttons (install-cmd, uninstall-cmd)
- Show NinjaRMM ZIP and .intunewin download links when driver assigned
- Add HTMX icon upload form with #icon-status swap target
- Remove disabled placeholder Regenerate Package button
- Add TestCommandPreview class (4 tests) to test_packages.py
- All 94 tests pass
2026-04-10 15:06:45 +02:00
kawa f9e13ba96f feat(05-02): icon upload endpoint with validation
- Create imptune/api/icons.py with POST /printers/{printer_id}/icon
- Validate PNG format, 256x256 dimensions, 750KB max size
- Store icons SHA256-addressed under cfg.DATA_DIR/icons/
- Replace existing Icon record on re-upload
- Register icons.router in main.py with ICONS_DIR makedirs
- Patch cfg.ICONS_DIR in conftest.py for tests
- All 6 icon upload tests pass
2026-04-10 15:05:36 +02:00
kawa dd6cedfed9 feat(05-01): implement NinjaRMM ZIP and intunewin package export endpoints
- GET /printers/{id}/packages/ninja: in-memory ZIP with install.ps1 + driver files in named subfolder
- GET /printers/{id}/packages/intunewin: temp dir build of .intunewin via build_intunewin()
- _get_printer_and_driver() helper validates printer, driver, inf, desc
- Driver ZIP file existence check before processing (RESEARCH pitfall 3)
- TemporaryDirectory context manager for auto-cleanup (RESEARCH pitfall 1)
- Router registered in main.py after scripts router
- All 9 package tests pass, 84 total tests green
2026-04-10 15:05:29 +02:00
kawa d8ce223b38 test(05-02): add failing tests for icon upload endpoint
- Add test_icon_upload.py with 6 TDD RED tests for PKG-04
- Add Pillow>=10.0 to requirements.txt
- Add ICONS_DIR to imptune/config.py
2026-04-10 15:04:38 +02:00
kawa a31c71e11f test(05-01): add failing tests for NinjaRMM ZIP and intunewin package export endpoints
- TestNinjaDownload: 5 tests covering ZIP response, install.ps1, driver files, 404, 422
- TestIntunewinDownload: 4 tests covering .intunewin response, structure, 404, 422
- Fixtures: driver_zip_bytes, setup_printer_with_driver, printer_no_driver
2026-04-10 15:04:11 +02:00
kawaandClaude Opus 4.6 f2d12e53d9 docs(05): create phase 5 package export plans
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:53:31 +02:00
kawaandClaude Opus 4.6 cf7adecb06 docs(phase-5): add research and validation strategy
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:48:18 +02:00
kawaandClaude Sonnet 4.6 ec6c150585 docs(phase-05): research package export domain
Cover .intunewin assembly (wiring Phase 1 spike), NinjaRMM ZIP builder,
icon upload/validation, and Alpine.js clipboard preview patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:47:12 +02:00
kawaandClaude Opus 4.6 55dc7f5e09 docs(phase-04): complete phase execution and verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:40:54 +02:00
kawa ed0f0a0607 docs(04-02): complete uninstall+detect templates and script API endpoints plan
- 04-02-SUMMARY.md: TDD execution, 3 commits, 6 files, 75 tests green
- STATE.md: advanced to 04-02 complete, added 3 new decisions
- ROADMAP.md: phase 4 marked complete (2/2 plans done)
- REQUIREMENTS.md: SCRPT-02 and SCRPT-03 marked complete
2026-04-10 13:37:53 +02:00
kawa b7b0d1b4a5 feat(04-02): add script download API endpoints and router registration
- imptune/api/scripts.py: GET /printers/{id}/scripts/{install,uninstall,detect}
- 404 for missing printer, 422 for missing driver/INF/driver_desc
- Content-Disposition attachment header on all responses
- imptune/main.py: register scripts.router
- 5 integration tests covering all endpoint cases (200/404/422)
2026-04-10 13:36:07 +02:00