7.5 KiB
Source User Journey
Purpose: Define how a user should interact with the UI to create and manage Source records, including page-level transcription context and revision behavior.
Scope: This document describes intended user interaction for the Source UI. It is the UX contract for the Source entity.
Companion schema mapping: schema-mapping.md Companion acceptance criteria: acceptance-criteria.md
1. Overview
A Source represents one page or file unit associated with a Document.
Managing Source records is page-first:
- The user starts from a transcription job flow.
- The user adds one or more source files.
- The system creates Source records linked to the Document and linked to the Job through JobSource.
- The user reviews source lists from a dedicated Sources page.
- The user opens Source detail to review preview, metadata, transcription text, and revision text.
2. User Goal
The user wants to:
- add page files to a Document
- ensure every source is attached to the transcription job context
- keep page order reliable
- review original machine output
- save human revisions per page
- navigate source pages efficiently
3. Page Model
3.1 Source List Surface
A Source list surface should support:
- listing source pages globally or filtered by selected Document or Job
- sorting by page_number
- opening the owning Document or Job context
- opening Source detail for a selected source
3.2 Source Detail Surface
Source detail supports:
- pan/zoom image or PDF preview
- read-only source metadata (page number, names, timestamps)
- read-only original transcription text
- editable revision text with save action
4. Entry Points
Primary entry points:
- from Job workflow, Add sources while creating or configuring a job
- from Job detail, open filtered Sources for the current Job
- from Document detail, open filtered Sources for the current Document
- from global navigation, open all Sources
Current implementation note:
- source interaction occurs in job-create flow and dedicated Sources list/detail flows
5. Create Source Flow
5.1 User Intent
The user wants to attach one or more files to a Document so each page can be processed and reviewed.
5.2 Create from Job Context
- The user starts from a job-creation or job-configuration flow
- The user can upload one or more files, or upload a whole folder
- The system creates Source rows linked to the selected Document
- The system creates JobSource links for the active Job as part of this flow
- Source creation fails if required Document or Job linkage cannot be established
5.3 Source Create Inputs
| UI Label | Schema Field | Input Type | Required | Notes |
|---|---|---|---|---|
| Source files | upload_name/filename/file_path | Multi-file upload or folder upload | Yes | User may select one file, many files, or a folder |
| Processing order | page_number assignment rule | System rule | Yes | If multiple files are uploaded, processing order is alphabetical by original filename |
| Document reference | document_id | Hidden/context | Yes | Comes from selected Document |
| Job reference | JobSource.job_id | Hidden/context | Yes | Required for first-release source creation |
5.4 Filename Strategy
- store original user filename in upload_name
- store persisted filename using UUID plus original extension only, in the form UUID.extension
- this replaces the previous UUID-upload_name.extension pattern
5.5 Ordering Guidance
- multi-file or folder uploads are processed alphabetically by original filename
- UI should show a warning or helper note so users understand that filename conventions control order
Suggested helper text:
- Files are processed alphabetically by original filename. Use leading numbers such as 001, 002, 003 to control page order.
5.6 System-Managed Values at Create
| Schema Field | User Editable | Notes |
|---|---|---|
| id | No | System-generated |
| date_uploaded | No | System-generated |
| raw_transcription | No | Filled later by processing |
| revised_text | No | Initially empty |
| date_revised | No | Initially null |
5.7 Expected Create Result
After successful source create:
- Source is linked to the Document
- Source appears in page order derived from alphabetical upload filename ordering
- Source is linked to the Job through JobSource at create time
- The user can open the owning Document or Job context
5.8 Source Creation Invariant
For first release:
- every new Source must have a Document link (Source.document_id)
- every new Source must have a Job link through JobSource (JobSource.job_id -> JobSource.source_id)
- source creation is treated as part of transcription workflow, not a standalone document-only upload path
6. Read Source Journey
6.1 User Intent
The user wants to view each page file and understand file identity and processing context.
6.2 Read Surface Expectations
The UI should show:
- source lists for current context (all, document-filtered, or job-filtered)
- upload_name as the original user-provided filename
- filename as the stored system filename
- page_number and ordering context
- the owning Document and Job navigation context
- direct action to open Source detail
6.3 Read Empty and Missing States
If source is missing:
- Show clear not found or no source available messaging
If source metadata is partially unavailable:
- Show fallback labels and keep navigation available where possible
7. Update Source Journey
7.1 User Intent
The user primarily tracks page-level source records while preserving raw machine output in the service layer.
7.2 Intended Editable Fields
Editable in first release:
- revised_text in Source detail
Read-only in first release:
- upload_name
- filename
- file_path
- raw_transcription
- page_number
- date_uploaded
- date_revised set by system on revision save
7.3 Revision Save Behavior
On save:
- validate revision text is non-empty after trimming
- persist revised_text
- set date_revised
- show success feedback
- keep user in current source context
7.4 Revision Failure Behavior
If save fails:
- Show clear error feedback
- keep user input where possible
- Allow retry
8. Delete Source Journey
8.1 User Intent
The user may need to remove incorrect or duplicate source files from a Document.
8.2 Guardrails
Delete is allowed when:
- policy allows removal of related processing history
Delete is blocked when:
- policy requires preserving dependent job-source execution records until explicit cleanup
8.3 Delete UX
When blocked:
- explain dependency constraints in a future delete flow
- show cleanup guidance in a future delete flow
When allowed:
- confirm permanent removal in a future delete flow
- remove source in a future delete flow
- return to source list with success state in a future delete flow
9. Relationship to Other Workflows
Source workflow integrates with:
- Document workflow for ownership and page organization
- Job workflow for processing status and outputs
- revision workflow for human correction lifecycle
10. 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
11. Deferred Items
Deferred to future revisions:
- bulk page reordering UX
- multi-file upload progress and resumable upload UX
- revision history versions beyond a single revised_text field
- richer per-page status dashboards
- source delete UI with dependency-aware confirmation