Add an optional priority field to tasks so users can mark important work and sort by urgency.
User story
As a user, I want to assign a priority to a task (Low/Medium/High) so I can focus on what matters most.
Requirements / Acceptance criteria
Tasks support priority with allowed values: low, medium, high (default: medium).
API includes priority in responses and accepts it on create/update.
Validation: reject invalid priority values with 400 { "error": "..." }.
UI lets users set priority when creating/editing a task and displays it in the list.
Sorting: default list order remains unchanged, but add an option to sort by priority (high → low).
Persistence: priority is stored in SQLite and survives restarts.
Tests: add/adjust E2E coverage for create/update/display and invalid priority handling.
Notes
Keep backwards compatibility: existing tasks get medium automatically.
Add an optional priority field to tasks so users can mark important work and sort by urgency.
User story
As a user, I want to assign a priority to a task (Low/Medium/High) so I can focus on what matters most.
Requirements / Acceptance criteria
Tasks support priority with allowed values: low, medium, high (default: medium).
API includes priority in responses and accepts it on create/update.
Validation: reject invalid priority values with 400 { "error": "..." }.
UI lets users set priority when creating/editing a task and displays it in the list.
Sorting: default list order remains unchanged, but add an option to sort by priority (high → low).
Persistence: priority is stored in SQLite and survives restarts.
Tests: add/adjust E2E coverage for create/update/display and invalid priority handling.
Notes
Keep backwards compatibility: existing tasks get medium automatically.