The Add Document modal defaults to "Insurance" document type and pre-fills insurance-specific fields (Bodily Injury, Property Damage, Premium). This creates confusion if the user wants to add a different document type.
Recommendation
Start with no document type selected
Or show generic fields that adapt when a type is chosen
Acceptance Criteria
Add Document modal opens with no document type pre-selected
Insurance-specific fields only appear when "Insurance" type is selected
Form adapts cleanly when switching between document types
Tested on mobile (320px, 768px) and desktop (1920px)
Relates to #162
## Severity: Medium
## Problem
The Add Document modal defaults to "Insurance" document type and pre-fills insurance-specific fields (Bodily Injury, Property Damage, Premium). This creates confusion if the user wants to add a different document type.
## Recommendation
- Start with no document type selected
- Or show generic fields that adapt when a type is chosen
## Acceptance Criteria
- Add Document modal opens with no document type pre-selected
- Insurance-specific fields only appear when "Insurance" type is selected
- Form adapts cleanly when switching between document types
- Tested on mobile (320px, 768px) and desktop (1920px)
Phase: 7 (Document improvements) | Priority: Medium | Depends on: None | Blocks: None
Context
The "Add Document" modal defaults the document type to "Insurance", creating unnecessary bias. Users must manually change the type for non-insurance documents, and insurance-specific fields are shown by default.
Implementation
1. In frontend/src/features/documents/components/DocumentForm.tsx:
Change initial state from documentType: 'insurance' to documentType: '' (empty string)
Add placeholder/prompt in the Select component: "Select a document type"
Insurance-specific fields only render when documentType === 'insurance' (verify this conditional already exists)
Add form validation: require document type selection before submit (reject empty string)
Insurance-specific fields are hidden until Insurance is explicitly selected
Form cannot be submitted without selecting a document type
All document types still work correctly when selected
Verify on mobile (320px, 768px) and desktop (1920px) viewports
Branch
Work on branch issue-162-ux-design-audit-cleanup (shared with all #162 sub-issues)
## Implementation Plan (from #162 -- Milestone 15)
**Phase**: 7 (Document improvements) | **Priority**: Medium | **Depends on**: None | **Blocks**: None
### Context
The "Add Document" modal defaults the document type to "Insurance", creating unnecessary bias. Users must manually change the type for non-insurance documents, and insurance-specific fields are shown by default.
### Implementation
**1. In `frontend/src/features/documents/components/DocumentForm.tsx`:**
- Change initial state from `documentType: 'insurance'` to `documentType: ''` (empty string)
- Add placeholder/prompt in the Select component: "Select a document type"
- Insurance-specific fields only render when `documentType === 'insurance'` (verify this conditional already exists)
- Add form validation: require document type selection before submit (reject empty string)
### Files
- `frontend/src/features/documents/components/DocumentForm.tsx`
### Commit Convention
```
chore: remove Insurance default bias from Add Document modal (refs #175)
```
### Test Criteria
- Modal opens with no document type pre-selected
- "Select a document type" placeholder visible
- Insurance-specific fields are hidden until Insurance is explicitly selected
- Form cannot be submitted without selecting a document type
- All document types still work correctly when selected
- Verify on mobile (320px, 768px) and desktop (1920px) viewports
### Branch
Work on branch `issue-162-ux-design-audit-cleanup` (shared with all #162 sub-issues)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Relates to #162
Severity: Medium
Problem
The Add Document modal defaults to "Insurance" document type and pre-fills insurance-specific fields (Bodily Injury, Property Damage, Premium). This creates confusion if the user wants to add a different document type.
Recommendation
Acceptance Criteria
Implementation Plan (from #162 -- Milestone 15)
Phase: 7 (Document improvements) | Priority: Medium | Depends on: None | Blocks: None
Context
The "Add Document" modal defaults the document type to "Insurance", creating unnecessary bias. Users must manually change the type for non-insurance documents, and insurance-specific fields are shown by default.
Implementation
1. In
frontend/src/features/documents/components/DocumentForm.tsx:documentType: 'insurance'todocumentType: ''(empty string)documentType === 'insurance'(verify this conditional already exists)Files
frontend/src/features/documents/components/DocumentForm.tsxCommit Convention
Test Criteria
Branch
Work on branch
issue-162-ux-design-audit-cleanup(shared with all #162 sub-issues)Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: PASS
Changes
documentTypestate from'insurance'to''(empty string)disabledattributerequiredattribute to the document type selectdocumentType === 'insurance'Verification
daa0cd0Verdict: PASS | Next: Move to status/done