Problem
When vendor uploads replacement file on approval-enabled marketplace, current approach moves product to Pending Review. This hides product from customers during approval (sales loss).
Proposed Behavior
Product stays Published with v1 file live. v2 queued for approval invisibly. Vendor keeps earning while admin reviews.
| State |
v1 File |
v2 File |
Product Status |
Customers See |
Sales |
| Vendor uploads v2 |
Live |
Pending |
Published |
v1 works |
Keep earning ✓ |
| Admin approves v2 |
Replaced |
— |
Published |
v2 works |
Keep earning ✓ |
| Admin rejects v2 |
Live |
Deleted |
Published |
v1 works |
Keep earning ✓ |
How File Versioning Works
Track two files: active (customers see) and pending (awaiting approval).
- Vendor uploads → stays pending, old file stays live
- Download check: is file pending? Only admin/vendor/pre-approval customers see it
- Admin approves → pending becomes active, old file archived/deleted
- Admin rejects → pending deleted, old file stays active
What Needs to Build
- File metadata storage: active_file_id, pending_file_id, file_status
- Download endpoint checks if file pending, gates access accordingly
- Approval swap: atomic replace of active file
- Split-order isolation: vendor A's pending doesn't affect vendor B
- Vendor editor shows: active file + pending status
- REST API exposes both states
Old File Handling
Keep for audit trail first year, then auto-delete. Vendor can manually restore if needed.
Timeline
Phase 1 (current PR #3372):
- File holds v1 live during approval
- Discard button (delete v2, keep v1)
- Vendor notifications + docs
Phase 2 (this enhancement):
- Full file versioning system
- Product never goes Pending
Related
Problem
When vendor uploads replacement file on approval-enabled marketplace, current approach moves product to Pending Review. This hides product from customers during approval (sales loss).
Proposed Behavior
Product stays Published with v1 file live. v2 queued for approval invisibly. Vendor keeps earning while admin reviews.
How File Versioning Works
Track two files: active (customers see) and pending (awaiting approval).
What Needs to Build
Old File Handling
Keep for audit trail first year, then auto-delete. Vendor can manually restore if needed.
Timeline
Phase 1 (current PR #3372):
Phase 2 (this enhancement):
Related