ADR-002: Fire-and-Forget Upload Initiation

Prev Next

Context

Uploads are initiated from feature modules that exist within specific routes and UI lifecycles.
If modules are responsible for tracking upload progress or handling retries and failures, upload behavior becomes tightly coupled to component lifetimes, leading to:

  • duplicated progress UI
  • broken uploads on navigation or reload
  • inconsistent retry and cancel behavior
  • unclear ownership of upload lifecycle

Feature modules should express intent (what to upload), not process (how the upload proceeds).

Decision

Upload initiation is fire-and-forget from the perspective of feature modules.

Feature modules:

  • call UploadEngine.start({...})
  • do not retain references to upload state
  • do not subscribe to upload events
  • do not render progress or lifecycle UI

All upload lifecycle management is delegated entirely to the UploadEngine and the global upload UI.

Consequences

  • Feature modules remain simple and declarative
  • Uploads are not tied to route or component lifetimes
  • Upload behavior is consistent across the system
  • Upload lifecycle can continue uninterrupted across navigation and reloads
  • Ownership boundaries between features and infrastructure are explicit

Notes

  • This decision enforces a clear separation between intent (feature modules) and execution (UploadEngine).
  • Any feature-level progress UI or upload lifecycle handling is considered a violation of this ADR.