Purpose
Tasks is the shared monitor for long-running and risky operations. It gives users visibility into queued, running, successful, and failed operations without blocking core UI work.
Covered Operations
Required task-backed flows include:
- delete
- move
- copy
- import
- export
- transfer
- deploy
- seed
- migration runs
- large uploads/downloads where progress matters
- PITR load/restore where task state is needed
Task State
Each task should expose:
- status: queued, running, success, failed
- progress
- operation counters
- duration
- retry action when supported
- error details with actionable messages
- logs or details sufficient for troubleshooting
UI Behavior
The task queue appears in the workspace/sidebar and opens the Tasks module for detailed inspection. Users should be able to monitor work while navigating other modules.
Use Tasks as the audit trail for work that is risky, slow, or easy to lose track of during normal navigation. A user should be able to start an import, move to Firestore or Auth, and still see whether the queued operation is waiting, running, complete, failed, or ready for retry.
Task details should make failures actionable. Include the operation name, target project, environment, affected path or resource, completed and failed counters, elapsed duration, and the original error message. When a task represents a destructive or production action, the detail view should make that target context impossible to miss.
Safety
Task visibility does not replace confirmation dialogs. Destructive or production operations still require explicit confirmation before a task is enqueued.
Source Anchors
Sources/FirestructApp/Features/Tasks/UI/TaskMonitorView.swiftSources/FirestructApp/Features/Tasks/Services/AppModel+TaskActions.swiftSources/FirestructApp/Features/Tasks/Model/TaskStore.swiftSources/FirestructCore/TaskOrchestrator.swift