.ps1-suffixed route aliases for install, uninstall, detect scripts
Scripts section in printer_detail.html with 3 direct download links
Integration tests for the 3 new .ps1 routes and template links
phase-10-rtval
phase-11-rollout
added
patterns
Shared handler helpers (_install_response, _uninstall_response, _detect_response) to avoid logic duplication between extensionless and .ps1 route aliases
created
modified
tests/test_script_download.py
imptune/api/scripts.py
imptune/templates/printer_detail.html
tests/test_packages.py
Added .ps1 routes as aliases (not renames) to preserve backward compatibility of existing extensionless routes
Scripts section placed inside {% if has_driver %} guard, before Export section
Shared _*_response() helper pattern to avoid code duplication across route aliases
Route alias pattern: shared _*_response() helper called by both the extensionless and .ps1 route handlers
UX-03
18min
2026-04-13
Phase 9 Plan 03: Script Download Links Summary
Three .ps1 route aliases (install/uninstall/detect) + Scripts section on printer detail page, closing UX-03 with direct individual script downloads
Performance
Duration: 18 min
Started: 2026-04-13T08:46:27Z
Completed: 2026-04-13T09:04:00Z
Tasks: 2 (TDD: RED then GREEN)
Files modified: 4
Accomplishments
Added .ps1-suffixed route aliases for all three script endpoints via shared _*_response() helpers
Added Scripts section to printer_detail.html inside the {% if has_driver %} guard with 3 direct download anchor links
6 new tests: 5 in test_script_download.py covering all .ps1 routes (200, 404, 422), 1 in test_packages.py::TestCommandPreview for template link presence
Full non-e2e suite: 106/106 passing with no regressions
imptune/templates/printer_detail.html - Added Scripts section with 3 download links before Export section
Decisions Made
.ps1 routes implemented as aliases (not renames) to preserve backward compatibility — existing extensionless routes remain functional
Scripts section inserted inside existing {% if has_driver %} guard per plan spec (no scripts without a driver)
Shared _install_response(), _uninstall_response(), _detect_response() helpers avoid logic duplication between the two URL shapes
Deviations from Plan
None — plan executed exactly as written.
Issues Encountered
During a git stash probe to check a pre-existing test failure, a stash from a previous 09-01 session was inadvertently popped into tests/test_driver_upload.py. The file was restored to its committed state via git checkout -- before committing. The pre-existing test failure (test_upload_returns_oob_when_called_from_form) is out-of-scope for 09-03 and belongs to the 09-01 plan scope.
User Setup Required
None — no external service configuration required.
Next Phase Readiness
UX-03 closed: technician can download each script individually from the printer detail page