-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Title: Break reporting.py into rendering, artifact, naming, and diff services
Type: refactor
Severity: medium
Area: backend / reporting / report lifecycle
Description:
reporting.py has become a broad backend module that mixes XML parsing, asset extraction, diff generation, HTML/PDF rendering, persisted artifact metadata, customer naming normalization, saved-scan lookup, and task-oriented helper behavior. That concentration increases regression risk in a core subsystem that already affects history, reports, downloads, and exports.
Evidence:
/Users/techmore/projects/NmapUI/nmapui/reporting.pyis roughly 1400+ lines- it contains multiple distinct responsibilities including:
- report artifact path resolution
- customer identity normalization
- XML asset parsing and diff summarization
- scan metadata persistence
- HTML/PDF conversion helpers
- saved-scan lookup and PDF regeneration paths
Proposed Fix:
Split reporting into smaller backend services with stable interfaces.
Implementation Notes:
- likely extraction candidates:
report_artifacts.pyreport_rendering.pyreport_diffs.pyreport_identity.py
- keep a thin orchestration layer for workflows so task code does not import internals directly
- add targeted module tests before moving logic to preserve current runtime behavior
Related Issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels