Fix inconsistent line endings across all project files for cross-environment consistency. Add complete unit test suite covering core utilities, API routes, and server services. Add Playwright E2E test setup with smoke, auth, and agent API tests. Update all project configuration files to match standardized formatting. Fix MCP API error handling to properly propagate HTTP status codes and use correct JSON-RPC error codes. Add VSCode workspace configuration, extensions, and example MCP config files. Update .gitignore to exclude new test and build artifacts.
1.2 KiB
1.2 KiB
Order Items Naming Standard (PocketBase)
Goal
Use one consistent, driver-oriented naming convention in order_items with drv_* prefixes.
Recommended Canonical Fields
item_status(global item lifecycle)drv_status(driver/collection lifecycle)drv_id(relation to driver/user table)drv_assigned_atdrv_collected_atdrv_problem_flagdrv_problem_typedrv_problem_notes
Transition Mapping
During migration, support these aliases in API:
driver_status->drv_statusdriver->drv_idproblem_flag->drv_problem_flagproblem_type->drv_problem_typeproblem_notes->drv_problem_notes
Safe Migration Plan
- Add new
drv_*fields (keep old fields temporarily). - Backfill new fields from existing values.
- Update UI and automation writes to new fields only.
- Keep read-compat for old fields for 1-2 release cycles.
- Remove deprecated fields once no writers remain.
Minimal State Model
item_status:pending,processing,po_generated,ready_delivery,delivered,cancelleddrv_status:unassigned,assigned,en_route,collected,failed
Keep item lifecycle and driver lifecycle separate to avoid status collisions.