8.6 KiB
Job User Journey
Purpose: Define how a user should interact with the UI to create and manage a Job record, including document linking, source uploads, processing status, and page-level review.
Scope: This document describes intended user interaction for the Job UI. It is the UX contract for the Job entity.
Companion schema mapping: schema-mapping.md Companion acceptance criteria: acceptance-criteria.md
1. Overview
A Job represents one transcription run for a selected Document and one or more uploaded source files.
Managing a Job is run-first:
- The user opens the Jobs page.
- The user selects Create job.
- The user lands on a Job detail/create surface.
- The user links a Document and uploads one or more source files.
- The user submits for transcription.
- The system creates and processes the Job.
- The user reviews per-source output and saves revisions.
2. User Goal
The user wants to:
- see all jobs in one place
- create a new transcription run intentionally
- attach the run to the correct Document
- upload source file(s) for that run
- submit and monitor processing state
- review and revise page-level outputs
3. Page Model
3.1 Jobs List Page
The Jobs page is the primary UI surface where users manage jobs.
It should support:
- listing all jobs
- searching or filtering jobs
- opening job detail for any row
- starting Create job
- clear empty state when no jobs exist
3.2 Job Detail/Create Page
The Job detail/create page is used for both creating a new Job and viewing an existing Job.
Create mode should include:
- document selection
- source upload controls
- submit for transcription action
Detail mode should include:
- job metadata and status
- per-source processing state
- original transcription output
- revision editor and save actions
4. Entry Points
Primary entry points:
- from Jobs page, Create job
- from Jobs page row selection, open existing Job detail
Current implementation note:
- current code path is upload-first and auto-creates Job records
- intended UX is explicit Create job from the Jobs page
5. Create Job Flow
5.1 User Intent
The user wants to start a transcription run by selecting the right Document and providing source files in one guided flow.
5.2 Create Entry
- user opens the Jobs page
- user selects Create job
- system opens Job detail/create page in create mode
5.3 Create Inputs
| UI Label | Schema Area | Input Type | Required | Notes |
|---|---|---|---|---|
| Document | Job.document_id | Select/search | Yes | Links the run to one Document |
| Source files | Source upload fields | Multi-file upload or folder upload | Yes | User may select one file, many files, or a folder |
| Processing order | Source.page_number assignment rule | System rule | Yes | If multiple files are uploaded, order is alphabetical by original filename |
| Provider | Job.provider | Display or select | No | Visible to user when known; selectable when options are available |
| Model | Job.model | Display or select | No | Visible to user when known; selectable when options are available |
| Prompt | Job.prompt_name | Display or select | No | Visible to user when known; selectable when options are available |
5.4 Source Handling Rules
- each uploaded file becomes a Source linked to the selected Document
- each created Source is linked to the Job through JobSource
- multi-file or folder uploads are processed alphabetically by original filename
- upload_name stores the original filename
- stored filename uses UUID plus original extension in the form UUID.extension
Suggested helper text:
- Files are processed alphabetically by original filename. Use leading numbers such as 001, 002, 003 to control page order.
5.5 Validation Rules
Create submission must be blocked when:
- no Document is selected
- no source file is uploaded
Create submission should provide clear feedback when:
- uploaded files are invalid or unreadable
- persistence fails for Job, Source, or JobSource linkage
5.6 Submission Behavior
On submit:
- validate create inputs
- create Job record linked to selected Document
- create Source records for uploaded files
- create JobSource links for each Source in the Job
- queue processing for transcription
- route user to Job detail mode
Recommended transactional behavior:
- intended create writes should succeed or fail together
- user should not receive false success when required records fail
5.7 Create Success Result
After successful create:
- job appears in Jobs list
- job detail shows selected Document and created source set
- status appears as queued or processing based on execution timing
- user can monitor progress and open page-level review
5.8 Create Failure Result
If create fails:
- show clear error message
- preserve entered selections where possible
- keep retry path available
- do not show false success feedback
6. Read Job Journey
6.1 User Intent
The user wants to quickly understand what the job is, its current status, and which source pages need review.
6.2 Jobs List Expectations
The Jobs list should show, at minimum:
- job identifier
- document context
- current status
- creation or update timestamp
- quick action to open detail
Optional first-release columns if available:
- retry count
- provider/model summary
6.3 Job Detail Expectations
The Job detail should show:
- job status and summary metadata
- selected Document context
- per-source status (pending, transcribed, failed)
- original transcription output per source
- revision editor and latest revised content
6.4 Read Empty and Missing States
If no jobs exist:
- list shows no jobs yet empty state
- list shows Create job action
If a job id is invalid or missing:
- show clear not found state
- do not crash the page
If a job has no source items due to failure:
- show clear warning state
- keep recovery guidance visible
7. Job Status Lifecycle UX
7.1 Status Values
The UI should map to model-backed job states:
- queued
- processing
- transcribed
- completed
- partial_success
- failed
7.2 In-Progress States
When status is queued or processing:
- show active progress state
- keep detail page refresh-safe
- indicate that source-level results may still be arriving
7.3 Terminal States
When status is completed:
- show completion success state
- direct user to revision workflow
When status is partial_success:
- show mixed outcome state
- identify failed pages
- guide user to review available successful pages and retry strategy
When status is failed:
- show failure state with actionable message
- keep navigation and retry guidance available
8. Update Job Journey
8.1 User Intent
The user primarily updates job-related review outcomes by editing revised transcription text per source page.
8.2 First-Release Editable Scope
Editable in first release:
- source-level revised_text through job detail review
Read-only in first release:
- Job.document_id after create
- job status values managed by processing workflow
- provider/model/prompt values may be system-managed, but should remain visible in UI when known
8.3 Update Save Behavior
On revision save:
- validate revised text
- persist revised text for selected source
- update revised timestamp fields by system policy
- show success feedback
On save failure:
- show clear error feedback
- preserve entered text where possible
- allow retry
9. Delete and Retention Policy
9.1 User Intent
The user may need to remove invalid or duplicate jobs safely.
9.2 First-Release Policy
Delete behavior is policy-controlled:
- deletion may be blocked when related JobSource or source history must be retained
- blocked delete must explain constraints and cleanup path
- if allowed, delete requires explicit confirmation
10. Relationship to Other Workflows
Job workflow integrates with:
- Document workflow for ownership context
- Source workflow for uploaded page records and ordering
- Revision workflow for human correction lifecycle
- Worker processing workflow for queued execution and status transitions
11. Relationship to Schema Mapping
The companion schema-mapping document should specify:
- field visibility per CRUD action
- current implementation status
- intended behavior
- gap-to-target items
12. Deferred Items
Deferred to future revisions:
- manual retry controls from job detail
- advanced provider/model/prompt policy controls beyond basic create-time visibility
- advanced bulk actions across multiple jobs
- live streaming progress updates beyond refresh-based updates
- job templates or preset configurations