Files
jobtrackingapp/docs/ui-modernisation/JOB_EXPORT_LIFETIME.md
T

2.9 KiB
Raw Blame History

Job export and CSV conversion session lifetime

Baseline214eb25f; source/test/verifier2a02e102 on codex/a3-ui-10.

Job imports already capture their initiating session and stop queued work after unmount/account invalidation. Export downloads and local CSV conversion lacked that boundary. A delayed response/read could therefore download and announce data after its panel/session had ended. The same existing guard now serves all three paths, preserving the import busy flag, create allow-list and partial-failure handling. Delayed feedback uses the current UI language.

Verification

  • RED:11 failures/three passes across14 new lifetime cases. Failures reproduced late export/conversion downloads and feedback, invalidated starts and stale-language errors.
  • PASSED:35 cases/four suites:14 new export cases plus existing job import, Settings import lifetime and picker activation. Tests cover successful JSON/CSV/conversion, unmount, changed session context, invalidation event, stale rejection, already-invalidated starts and live EN→NB failure feedback. Counts overlap earlier import evidence.
  • PASSED:production build/TypeScript and scoped ESLint.
  • PASSED:12 actual exported-app configurations at390/768/1440 ×EN/NB ×light/dark;36 native browser downloads and12 accessibility scans. JSON/CSV match the synthetic response bytes exactly, including CSV UTF-8 BOM/CRLF/Unicode. Converted JSON retains its synthetic occupation/company Unicode values. Gzip artifacts preserve native bytes with raw/compressed receipts.
  • Each configuration additionally probes a held export and held File.text conversion across a real React Router SPA unmount. Neither produces an extra download during the bounded250ms quiet window after response/read completion. These probes complement deterministic unit promise checks; they are not exhaustive scheduling or native-device proof.
  • Zero page exceptions, API writes or unavailable fixture reads. Every API response/file is synthetic; external traffic including fonts is blocked. The single pilot overlaps the final matrix. Mobile Bokmål dark controls were visually inspected.

Evidence: evidence/job-export-lifetime/; source/evidence/export bindings: JOB_EXPORT_SOURCE_MANIFEST.json. The unknown-route SPA destination is a controlled unmount probe, not a product journey acceptance claim.

Preservation and remaining gates

Export URL, filenames/MIME, includeDeleted=false, CSV BOM, conversion schema and download mechanism are unchanged. No backend/API, dependency, migration, physical CV/PDF or real private-data export occurred. An already-delivered download cannot be revoked; this guard suppresses later UI delivery, not a completed server request. Pending duplicate download clicks and broader real-service/session/security acceptance remain separate.

Rollback: revert2a02e102, rebuild and run affected import/export checks. Final A3/Phase10, native/human, integrated security/recovery and release decisions remain open.