generated from john/python-template
UI update planning continued
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
# Person Acceptance Criteria
|
||||
|
||||
Purpose: Define implementation-ready acceptance criteria for Person Create, Read, Update, and Delete workflows.
|
||||
|
||||
Companion documents:
|
||||
- docs/ui/entities/person/user-journey.md
|
||||
- docs/ui/entities/person/schema-mapping.md
|
||||
|
||||
## Scope
|
||||
|
||||
This checklist covers:
|
||||
1. Create flow
|
||||
2. Read flow
|
||||
3. Update flow
|
||||
4. Delete flow
|
||||
|
||||
This checklist does not cover:
|
||||
1. advanced metadata_ editing UX
|
||||
2. structured-name schema migration implementation
|
||||
3. bulk merge or dedup workflow design
|
||||
|
||||
## Create Acceptance Criteria
|
||||
|
||||
### CR-1 Person creation entry
|
||||
1. Given a Person page
|
||||
2. When the user selects Create new person
|
||||
3. Then the user can open a Person create form
|
||||
|
||||
### CR-2 Required field validation
|
||||
1. full_name is required
|
||||
2. Save is blocked when full_name is empty
|
||||
3. Inline feedback is shown for required-field errors
|
||||
|
||||
### CR-3 Optional field handling
|
||||
1. Optional fields may be blank without blocking create
|
||||
2. Date raw and exact fields can coexist
|
||||
3. Exact date remains canonical when both exact and raw are provided
|
||||
|
||||
### CR-4 Successful create outcome
|
||||
1. Given valid input
|
||||
2. When the user saves
|
||||
3. Then the Person record is created
|
||||
4. Then success feedback is shown
|
||||
5. Then the user is routed to Person detail page
|
||||
|
||||
### CR-5 Create failure outcome
|
||||
1. Given backend failure during create
|
||||
2. Then clear error feedback is shown
|
||||
3. Then entered values are retained where possible
|
||||
4. Then no false success feedback is shown
|
||||
|
||||
## Read Acceptance Criteria
|
||||
|
||||
### RD-1 Person detail retrieval
|
||||
1. Given a valid Person id
|
||||
2. When the user opens the Person detail page
|
||||
3. Then the system displays Person metadata for that record only
|
||||
|
||||
### RD-2 Metadata visibility
|
||||
1. The page shows full_name and available optional person fields
|
||||
2. created_at and updated_at are shown as system-managed, read-only values
|
||||
|
||||
### RD-3 Linked documents section
|
||||
1. Given no linked DocumentPerson rows
|
||||
2. Then the page shows a no linked documents yet empty state
|
||||
3. Given linked documents exist
|
||||
4. Then the page shows linked document entries
|
||||
|
||||
### RD-4 Read failure state
|
||||
1. Given a nonexistent Person id
|
||||
2. Then the UI shows a clear not found state without crashing
|
||||
|
||||
## Update Acceptance Criteria
|
||||
|
||||
### UP-1 Edit entry
|
||||
1. Given a loaded Person detail page
|
||||
2. When the user selects Edit person
|
||||
3. Then editable controls are shown for allowed fields only
|
||||
|
||||
### UP-2 Editable fields
|
||||
1. Editable: full_name, display_name, maiden_name, birth/death fields, places, biography, portrait_path
|
||||
2. Not editable: id, created_at, updated_at
|
||||
3. metadata_ remains hidden in first release
|
||||
|
||||
### UP-3 Required validation
|
||||
1. full_name remains required
|
||||
2. Save is blocked with inline feedback when full_name is empty
|
||||
|
||||
### UP-4 Successful save
|
||||
1. Given valid input
|
||||
2. When the user saves
|
||||
3. Then changes persist
|
||||
4. Then success feedback is shown
|
||||
5. Then the user remains on Person detail with refreshed values
|
||||
|
||||
### UP-5 Save failure
|
||||
1. Given backend failure during save
|
||||
2. Then clear error feedback is shown
|
||||
3. Then the user-entered values remain available for retry where possible
|
||||
4. Then no false success feedback is shown
|
||||
|
||||
## Delete Acceptance Criteria
|
||||
|
||||
### DL-1 Delete entry and confirmation
|
||||
1. Given a Person detail page
|
||||
2. When the user selects Delete person
|
||||
3. Then a confirmation dialog appears with permanent-action wording
|
||||
|
||||
### DL-2 Relationship guardrails
|
||||
1. Delete is allowed only when relationship policy allows it
|
||||
2. If linked DocumentPerson rows must be removed first, delete is blocked
|
||||
|
||||
### DL-3 Blocked delete behavior
|
||||
1. When blocked
|
||||
2. Then the UI explains why deletion is blocked
|
||||
3. Then the UI identifies linked-document dependency presence
|
||||
4. Then the UI provides navigation to cleanup paths
|
||||
|
||||
### DL-4 Successful delete
|
||||
1. Given no blocking dependencies
|
||||
2. When the user confirms delete
|
||||
3. Then the Person record is removed
|
||||
4. Then success feedback is shown
|
||||
5. Then the user returns to the Person list page
|
||||
|
||||
### DL-5 Delete failure
|
||||
1. Given backend failure during delete
|
||||
2. Then clear error feedback is shown
|
||||
3. Then the user remains on Person detail with retry path
|
||||
|
||||
## Cross-Criteria Quality Gates
|
||||
|
||||
### QG-1 Separation of intent and implementation
|
||||
1. UX intent remains in user-journey.md
|
||||
2. current versus target implementation mapping remains in schema-mapping.md
|
||||
|
||||
### QG-2 Traceability
|
||||
1. Each accepted behavior maps to at least one future UI action or service call path
|
||||
2. No acceptance criterion contradicts the deferred-item policy
|
||||
|
||||
### QG-3 First-release constraints
|
||||
1. metadata_ remains hidden in first release
|
||||
2. structured name field split remains deferred
|
||||
3. recipient and multi-person role management stays in later revisions
|
||||
@@ -0,0 +1,265 @@
|
||||
# Person Schema-to-UI Mapping
|
||||
|
||||
Purpose: Map the Person schema to the UI, while clearly separating intended target behavior from current implementation.
|
||||
|
||||
Companion document: user-journey.md
|
||||
Acceptance criteria: acceptance-criteria.md
|
||||
|
||||
## 1. Entity Snapshot
|
||||
|
||||
- Table: Person
|
||||
- Primary key: id (UUID)
|
||||
- Related entities: DocumentPerson, Document
|
||||
- Canonical schema references:
|
||||
- src/transcription/db/models.py
|
||||
- docs/schema_v2.md
|
||||
|
||||
## 2. Mapping Rules
|
||||
|
||||
This document uses three lenses:
|
||||
1. Intended behavior: what the UX should support.
|
||||
2. Current behavior: what the code supports today.
|
||||
3. Gap to target: what must change to align implementation with the intended UX.
|
||||
|
||||
## 3. Field Inventory
|
||||
|
||||
| Field | DB Type | Nullable | Default/Auto Value | Intended UI Treatment | Notes |
|
||||
|---|---|---|---|---|---|
|
||||
| id | UUID | No | uuid4() | Hidden, system-managed | Primary key |
|
||||
| full_name | str | No | None | Shown, editable on create and update | Required canonical name |
|
||||
| display_name | str | Yes | None | Shown, editable | Optional |
|
||||
| maiden_name | str | Yes | None | Shown, editable | Optional |
|
||||
| birth_date | date | Yes | None | Shown, editable | Canonical exact date when present |
|
||||
| birth_date_raw | str | Yes | None | Shown, editable | Approximate or unknown date text |
|
||||
| birth_place | str | Yes | None | Shown, editable | Optional |
|
||||
| death_date | date | Yes | None | Shown, editable | Canonical exact date when present |
|
||||
| death_date_raw | str | Yes | None | Shown, editable | Approximate or unknown date text |
|
||||
| death_place | str | Yes | None | Shown, editable | Optional |
|
||||
| biography | str | Yes | None | Shown, editable | Optional narrative |
|
||||
| portrait_path | str | Yes | None | Shown, editable | Optional path |
|
||||
| metadata_ | JSONB/JSON | Yes | None | Hidden in first release | Advanced metadata |
|
||||
| created_at | datetime | No | datetime.now(UTC) | Hidden or read-only | System-managed |
|
||||
| updated_at | datetime | No | datetime.now(UTC) | Hidden or read-only | System-managed |
|
||||
|
||||
## 4. CREATE Mapping
|
||||
|
||||
### 4.1 Intended Create Flow
|
||||
|
||||
Entry point: Person page
|
||||
User action: Create new person
|
||||
Success destination: new Person detail page
|
||||
|
||||
| Field | Intended User Input | Required | Visible | Notes |
|
||||
|---|---|---|---|---|
|
||||
| full_name | Text input | Yes | Yes | Canonical identity field |
|
||||
| display_name | Text input | No | Yes | Optional |
|
||||
| maiden_name | Text input | No | Yes | Optional |
|
||||
| birth_date | Date input | No | Yes | Structured exact date |
|
||||
| birth_date_raw | Text input | No | Yes | Approximate/uncertain date |
|
||||
| birth_place | Text input | No | Yes | Optional |
|
||||
| death_date | Date input | No | Yes | Structured exact date |
|
||||
| death_date_raw | Text input | No | Yes | Approximate/uncertain date |
|
||||
| death_place | Text input | No | Yes | Optional |
|
||||
| biography | Text area | No | Yes | Optional |
|
||||
| portrait_path | Text input | No | Yes | Optional |
|
||||
| metadata_ | None | No | No | Hidden in first release |
|
||||
| created_at | None | No | No | System-generated |
|
||||
| updated_at | None | No | No | Not user-entered |
|
||||
|
||||
Related records during intended create:
|
||||
- No DocumentPerson link is required during Person creation.
|
||||
- Document linking can be done later from Document or Person workflows.
|
||||
|
||||
### 4.2 Current Implementation
|
||||
|
||||
Current entry point: no dedicated Person UI page yet
|
||||
Current user action: none in UI
|
||||
Current backend path: service calls via DocumentService.create_person()
|
||||
|
||||
| Field | Current Value at Create | Source | Visible to User | Evidence |
|
||||
|---|---|---|---|---|
|
||||
| id | Generated UUID | System | No | Person model default factory in src/transcription/db/models.py |
|
||||
| full_name | Caller-provided | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| display_name | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| maiden_name | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| birth_date | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| birth_date_raw | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| birth_place | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| death_date | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| death_date_raw | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| death_place | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| biography | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| portrait_path | Caller-provided or None | Service/API caller | No | create_person() in src/transcription/services/documents.py |
|
||||
| metadata_ | Caller-provided or None | Service/API caller | No | Person model in src/transcription/db/models.py |
|
||||
| created_at | Current UTC timestamp | System | No | Person model default in src/transcription/db/models.py |
|
||||
| updated_at | Current UTC timestamp | System | No | Person model default in src/transcription/db/models.py |
|
||||
|
||||
### 4.3 Gap to Target
|
||||
|
||||
To satisfy the intended Create flow, implementation must add:
|
||||
1. a Person page and dedicated create form
|
||||
2. user-entered controls for Person fields
|
||||
3. create validation and success/failure UX states
|
||||
4. post-submit routing to a Person detail page
|
||||
|
||||
## 5. READ Mapping
|
||||
|
||||
### 5.1 Intended Read Behavior
|
||||
|
||||
On the Person detail page, the user should be able to see:
|
||||
1. Person identity and biographical metadata
|
||||
2. linked Documents (through DocumentPerson)
|
||||
3. empty-state behavior when no linked documents exist
|
||||
|
||||
### 5.2 Current Implementation
|
||||
|
||||
Current Person visibility in the UI is not implemented as a dedicated page.
|
||||
|
||||
| Field | Current Rendering | Visible to User | Notes | Evidence |
|
||||
|---|---|---|---|---|
|
||||
| full_name | Not rendered in dedicated Person UI | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| display_name | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| maiden_name | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| birth_date | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| birth_date_raw | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| birth_place | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| death_date | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| death_date_raw | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| death_place | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| biography | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| portrait_path | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| metadata_ | Not rendered | No | Hidden advanced field | no current UI field |
|
||||
| created_at | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
| updated_at | Not rendered | No | No current Person page | no Person page in src/transcription/ui |
|
||||
|
||||
### 5.3 Gap to Target
|
||||
|
||||
To satisfy the intended Read flow, implementation must add:
|
||||
1. a Person detail page
|
||||
2. metadata rendering for Person fields
|
||||
3. linked Documents section with empty states
|
||||
4. document-link navigation paths
|
||||
|
||||
## 6. UPDATE Mapping
|
||||
|
||||
### 6.1 Intended Update Behavior
|
||||
|
||||
The user should be able to edit Person metadata from the Person detail page or a dedicated edit flow.
|
||||
|
||||
Intended editable fields:
|
||||
- full_name
|
||||
- display_name
|
||||
- maiden_name
|
||||
- birth_date
|
||||
- birth_date_raw
|
||||
- birth_place
|
||||
- death_date
|
||||
- death_date_raw
|
||||
- death_place
|
||||
- biography
|
||||
- portrait_path
|
||||
|
||||
Intended system-managed fields:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
|
||||
Hidden in first release:
|
||||
- metadata_
|
||||
|
||||
### 6.2 Current Implementation
|
||||
|
||||
| Field | Updatable via UI | Updatable via Service | Notes |
|
||||
|---|---|---|---|
|
||||
| id | No | Practically no | Primary key should be treated as immutable |
|
||||
| full_name | No | Yes | DocumentService.update_person() |
|
||||
| display_name | No | Yes | DocumentService.update_person() |
|
||||
| maiden_name | No | Yes | DocumentService.update_person() |
|
||||
| birth_date | No | Yes | DocumentService.update_person() |
|
||||
| birth_date_raw | No | Yes | DocumentService.update_person() |
|
||||
| birth_place | No | Yes | DocumentService.update_person() |
|
||||
| death_date | No | Yes | DocumentService.update_person() |
|
||||
| death_date_raw | No | Yes | DocumentService.update_person() |
|
||||
| death_place | No | Yes | DocumentService.update_person() |
|
||||
| biography | No | Yes | DocumentService.update_person() |
|
||||
| portrait_path | No | Yes | DocumentService.update_person() |
|
||||
| metadata_ | No | Yes | Technically updatable, hidden in first release |
|
||||
| created_at | No | Technically yes | Should remain system-managed |
|
||||
| updated_at | No | Technically yes | Should remain system-managed |
|
||||
|
||||
### 6.3 Gap to Target
|
||||
|
||||
Implementation must add:
|
||||
1. Person edit controls in the UI
|
||||
2. validation and save behavior for Person metadata
|
||||
3. a consistent updated_at update policy for Person edits
|
||||
|
||||
## 7. DELETE Mapping
|
||||
|
||||
### 7.1 Intended Delete Behavior
|
||||
|
||||
The UI should provide a delete action for Person with guardrails.
|
||||
|
||||
Rules:
|
||||
1. Deletion can proceed when relationship policy allows no retained document links.
|
||||
2. If linked DocumentPerson records exist and policy requires cleanup first, deletion is blocked.
|
||||
3. Delete confirmation must make clear that deletion is permanent.
|
||||
|
||||
### 7.2 Current Implementation
|
||||
|
||||
| Action | UI Exposed | Backend Capability | Notes |
|
||||
|---|---|---|---|
|
||||
| Delete Person | No | Yes | DocumentService.delete_person() exists, but no dedicated UI guard flow exists |
|
||||
|
||||
### 7.3 Gap to Target
|
||||
|
||||
Implementation must add:
|
||||
1. a Person delete control in the UI
|
||||
2. relationship-aware pre-delete checks
|
||||
3. user-facing blocked-delete messaging
|
||||
4. confirmation UX for successful delete attempts
|
||||
|
||||
## 8. Hidden and System-Managed Fields
|
||||
|
||||
| Field | Category | Why Hidden or Protected |
|
||||
|---|---|---|
|
||||
| id | System-managed | Internal identifier |
|
||||
| created_at | System-managed | Audit timestamp |
|
||||
| updated_at | System-managed | Audit timestamp |
|
||||
| metadata_ | Hidden in first release | Advanced JSON metadata not needed in initial UI |
|
||||
|
||||
## 9. Structured Name Deferred Note
|
||||
|
||||
Structured name fields are deferred to a future schema revision.
|
||||
|
||||
Current policy:
|
||||
1. full_name remains canonical and required.
|
||||
|
||||
Future revision intent:
|
||||
1. introduce first_name, middle_name, last_name, and optional suffix fields.
|
||||
2. maintain compatibility with existing full_name records during migration.
|
||||
3. define normalization and reconciliation rules when structured and canonical forms differ.
|
||||
|
||||
## 10. Traceability Anchors
|
||||
|
||||
Schema and models:
|
||||
- docs/schema_v2.md
|
||||
- src/transcription/db/models.py
|
||||
|
||||
Current implementation:
|
||||
- src/transcription/services/documents.py
|
||||
- src/transcription/ui (no dedicated Person pages yet)
|
||||
|
||||
Companion UX spec:
|
||||
- docs/ui/entities/person/user-journey.md
|
||||
|
||||
Acceptance checklist:
|
||||
- docs/ui/entities/person/acceptance-criteria.md
|
||||
|
||||
## 11. Acceptance Checklist Summary
|
||||
|
||||
- Every Person schema field appears in the field inventory.
|
||||
- Intended Create behavior matches the companion user journey.
|
||||
- Current Create behavior reflects service-level implementation.
|
||||
- Gaps between intended and current behavior are explicit.
|
||||
- Read, Update, and Delete sections distinguish target behavior from current code.
|
||||
@@ -0,0 +1,289 @@
|
||||
# Person User Journey
|
||||
|
||||
Purpose: Define how a user should interact with the UI to create and manage a Person record, including expected inputs, validation, outcomes, and links to Document relationships.
|
||||
|
||||
Scope: This document describes intended user interaction for the Person UI. It is the UX contract for the Person entity.
|
||||
|
||||
Companion schema mapping: schema-mapping.md
|
||||
Companion acceptance criteria: acceptance-criteria.md
|
||||
|
||||
## 1. Overview
|
||||
|
||||
A Person represents a historical individual who may be associated with one or more Documents.
|
||||
|
||||
Managing a Person is a profile-first workflow:
|
||||
1. The user opens the Person page.
|
||||
2. The user selects Create new person.
|
||||
3. The user enters known biographical fields.
|
||||
4. The system creates the Person record.
|
||||
5. The user can later associate the Person with one or more Documents through DocumentPerson links.
|
||||
|
||||
## 2. User Goal
|
||||
|
||||
The user wants to:
|
||||
1. create and maintain historical person records
|
||||
2. reuse the same Person across multiple Documents
|
||||
3. record both precise and approximate date values where certainty is limited
|
||||
4. link people to documents as author or recipient in future flows
|
||||
|
||||
## 3. Page Model
|
||||
|
||||
### 3.1 Person Page
|
||||
|
||||
The Person page is the general UI surface where users manage people.
|
||||
|
||||
It should support:
|
||||
1. listing or locating existing people
|
||||
2. starting the Create new person flow
|
||||
3. navigating into a specific Person after it exists
|
||||
|
||||
### 3.2 Person Detail Page
|
||||
|
||||
The Person detail page is the page for one specific Person after creation.
|
||||
|
||||
It should show:
|
||||
1. core identity fields
|
||||
2. biographical metadata
|
||||
3. related Documents section
|
||||
4. empty state when no linked documents exist yet
|
||||
|
||||
## 4. Entry Point
|
||||
|
||||
Entry point: Person page
|
||||
|
||||
Primary action: Create new person
|
||||
|
||||
Expected UI affordance:
|
||||
1. a visible action labeled Create new person
|
||||
2. activation opens a dedicated form view, modal, or detail panel
|
||||
|
||||
Preferred first implementation:
|
||||
1. dedicated Person create page or panel
|
||||
2. simple labeled form controls
|
||||
3. text inputs are acceptable for first release
|
||||
|
||||
## 5. Create Person Form
|
||||
|
||||
### 5.1 Required Fields
|
||||
|
||||
| UI Label | Schema Field | Input Type | Required | Notes |
|
||||
|---|---|---|---|---|
|
||||
| Full name | full_name | Text input | Yes | Canonical identity field |
|
||||
|
||||
### 5.2 Optional Name Fields
|
||||
|
||||
| UI Label | Schema Field | Input Type | Required | Notes |
|
||||
|---|---|---|---|---|
|
||||
| Display name | display_name | Text input | No | Friendly or abbreviated display |
|
||||
| Maiden name | maiden_name | Text input | No | Historical alternate surname |
|
||||
|
||||
### 5.3 Birth and Death Date Fields
|
||||
|
||||
| UI Label | Schema Field | Input Type | Required | Notes |
|
||||
|---|---|---|---|---|
|
||||
| Birth date | birth_date | Date input | No | Exact known date |
|
||||
| Birth date (approximate/raw) | birth_date_raw | Text input | No | Approximate or uncertain value |
|
||||
| Death date | death_date | Date input | No | Exact known date |
|
||||
| Death date (approximate/raw) | death_date_raw | Text input | No | Approximate or uncertain value |
|
||||
|
||||
Date handling rule:
|
||||
1. exact and raw values may both be entered
|
||||
2. exact date is canonical when present
|
||||
3. raw date is retained as historical context
|
||||
|
||||
### 5.4 Optional Biographical Fields
|
||||
|
||||
| UI Label | Schema Field | Input Type | Required | Notes |
|
||||
|---|---|---|---|---|
|
||||
| Birth place | birth_place | Text input | No | Free text |
|
||||
| Death place | death_place | Text input | No | Free text |
|
||||
| Biography | biography | Text area | No | Narrative context |
|
||||
| Portrait path | portrait_path | Text input | No | File or resource path |
|
||||
| Metadata | metadata_ | Hidden or advanced JSON editor | No | Prefer hidden in first release |
|
||||
|
||||
### 5.5 System Fields
|
||||
|
||||
| Schema Field | User Editable | Notes |
|
||||
|---|---|---|
|
||||
| id | No | System-generated |
|
||||
| created_at | No | System-generated |
|
||||
| updated_at | No | System-managed |
|
||||
|
||||
## 6. Validation Rules
|
||||
|
||||
### 6.1 Required Validation
|
||||
|
||||
1. full_name is required
|
||||
2. save is blocked when full_name is empty
|
||||
|
||||
### 6.2 Date Validation
|
||||
|
||||
1. birth_date and birth_date_raw may coexist
|
||||
2. death_date and death_date_raw may coexist
|
||||
3. exact date fields are canonical when present
|
||||
4. raw fields remain descriptive context
|
||||
|
||||
### 6.3 Integrity Validation
|
||||
|
||||
1. form accepts unknown values for optional fields
|
||||
2. missing birth or death data does not block creation
|
||||
|
||||
## 7. Submission Behavior
|
||||
|
||||
On submit:
|
||||
1. system validates required fields
|
||||
2. system creates Person record
|
||||
3. system returns user to Person detail page
|
||||
4. system shows success message
|
||||
|
||||
Recommended transactional behavior:
|
||||
1. Person writes are atomic
|
||||
2. no partial save state should be persisted
|
||||
|
||||
## 8. Expected Result After Success
|
||||
|
||||
After successful creation:
|
||||
1. user sees Person detail page for the new record
|
||||
2. full_name is visible in the header or summary
|
||||
3. empty Related Documents section is shown if no links exist
|
||||
4. user can proceed to link this person from Document workflows
|
||||
|
||||
## 9. Expected Result After Failure
|
||||
|
||||
If creation fails:
|
||||
1. show clear error message
|
||||
2. show field-level feedback for validation failures
|
||||
3. preserve entered data where possible
|
||||
4. do not show false success messaging
|
||||
|
||||
## 10. Read Person Journey
|
||||
|
||||
### 10.1 User Intent
|
||||
|
||||
The user wants to open a Person and quickly understand:
|
||||
1. identity and key biography fields
|
||||
2. whether this person is linked to any documents
|
||||
3. what next action to take
|
||||
|
||||
### 10.2 Read Surfaces
|
||||
|
||||
The Person detail page should show:
|
||||
1. full_name and display fields
|
||||
2. birth and death fields
|
||||
3. biography summary
|
||||
4. related documents list or empty state
|
||||
|
||||
### 10.3 Read Empty State
|
||||
|
||||
If no linked documents exist:
|
||||
1. show No linked documents yet
|
||||
2. provide guidance to link from Document workflow
|
||||
|
||||
## 11. Update Person Journey
|
||||
|
||||
### 11.1 User Intent
|
||||
|
||||
The user wants to correct or enrich person metadata over time.
|
||||
|
||||
### 11.2 Editable Fields
|
||||
|
||||
Editable:
|
||||
1. full_name
|
||||
2. display_name
|
||||
3. maiden_name
|
||||
4. birth_date
|
||||
5. birth_date_raw
|
||||
6. birth_place
|
||||
7. death_date
|
||||
8. death_date_raw
|
||||
9. death_place
|
||||
10. biography
|
||||
11. portrait_path
|
||||
|
||||
System-managed:
|
||||
1. id
|
||||
2. created_at
|
||||
3. updated_at
|
||||
4. metadata_ can remain hidden in first release
|
||||
|
||||
### 11.3 Update Save Behavior
|
||||
|
||||
On save:
|
||||
1. validate required fields
|
||||
2. persist updates
|
||||
3. refresh updated_at by system policy
|
||||
4. show confirmation
|
||||
5. keep user on Person detail page
|
||||
|
||||
### 11.4 Update Failure Behavior
|
||||
|
||||
1. show clear error feedback
|
||||
2. preserve form state where possible
|
||||
3. allow retry
|
||||
|
||||
## 12. Delete Person Journey
|
||||
|
||||
### 12.1 User Intent
|
||||
|
||||
The user wants to remove incorrect or duplicate person records safely.
|
||||
|
||||
### 12.2 Delete Guardrails
|
||||
|
||||
Delete is allowed when:
|
||||
1. Person has no required retained relationships
|
||||
|
||||
Delete is blocked when:
|
||||
1. Person is linked to one or more Documents via DocumentPerson and unlink policy requires cleanup first
|
||||
|
||||
### 12.3 Blocked Delete UX
|
||||
|
||||
1. explain that linked Document relationships exist
|
||||
2. show link count or list
|
||||
3. provide cleanup path
|
||||
|
||||
### 12.4 Allowed Delete UX
|
||||
|
||||
1. show confirmation dialog
|
||||
2. confirm permanent action
|
||||
3. delete Person
|
||||
4. return to Person list with success message
|
||||
|
||||
## 13. Relationship to Other Workflows
|
||||
|
||||
This Person workflow integrates with:
|
||||
1. Document create and update workflows through person lookup and linking
|
||||
2. DocumentPerson mapping for role assignments
|
||||
3. future recipient and multi-person enhancements
|
||||
|
||||
## 14. Relationship to Schema Mapping
|
||||
|
||||
The companion schema-mapping document should specify:
|
||||
1. field visibility per CRUD action
|
||||
2. current implementation status
|
||||
3. intended behavior
|
||||
4. gap-to-target items
|
||||
|
||||
## 15. Deferred Items
|
||||
|
||||
Deferred to future revisions:
|
||||
1. advanced metadata_ editing UI
|
||||
2. multi-person role editing in the Person UI itself
|
||||
3. richer relationship timeline views
|
||||
4. bulk merge or dedup workflows
|
||||
5. structured name fields migration (first_name, middle_name, last_name, optional suffix)
|
||||
|
||||
### 15.1 Structured Name Fields Migration Note
|
||||
|
||||
For now, `full_name` remains the canonical required name field.
|
||||
|
||||
Future revision intent:
|
||||
1. introduce structured fields such as first_name, middle_name, last_name, and optional suffix
|
||||
2. keep full_name during transition for backward compatibility and historical formatting
|
||||
3. define normalization and formatting rules for display and sorting
|
||||
4. update search and dedup workflows to use both structured and canonical forms during migration
|
||||
|
||||
Migration considerations:
|
||||
1. schema migration and backfill strategy for existing Person records
|
||||
2. validation updates for create and update forms
|
||||
3. compatibility for existing APIs and UI components that currently rely on full_name
|
||||
4. clear precedence and reconciliation rules when structured fields and full_name differ
|
||||
Reference in New Issue
Block a user