Repository navigation
Edit task #132
Description
Description
Allow users to edit an existing task from the Task Detail screen. Tapping an edit button (or icon) navigates to the Edit Task screen, which reuses the same form layout as the Create Task screen but pre-fills all fields with the task's current values.
The Edit Task screen supports editing: title, description, due date, priority, and URL. Location editing is out of scope and handled in a separate ticket.
Saving navigates back to the Task Detail screen with the updated values shown. The user can also discard changes via a back/cancel action.
Depends on #121 (Create task screen — core fields), #122 (Create task screen — due date field), #123 (Create task screen — priority field), #124 (Create task screen — URL field), and #129 (Task detail screen).
Scope
In scope: EditTaskScreen composable, EditTaskViewModel, EditTaskNavigation route, pre-filling all existing task fields (title, description, due date, priority, URL), saving changes to the repository, discarding changes via back/cancel, navigation back to Task Detail, and string resources.
Out of scope: editing location (separate ticket), editing completion status (use "Mark as completed" button), and delete (separate ticket).
Acceptance criteria
- GIVEN the user is on the Task Detail screen
WHEN they tap the edit button
THEN the Edit Task screen is navigated to with all fields pre-filled with the task's current values - GIVEN the Edit Task screen is displayed
WHEN the screen renders
THEN the title, description, due date, priority, and URL fields show the task's current values - GIVEN the user has modified one or more fields on the Edit Task screen
WHEN they tap save
THEN the task is updated in the repository and the user is navigated back to the Task Detail screen - GIVEN the user is on the Edit Task screen
WHEN they press the back button or cancel
THEN no changes are saved and the user is navigated back to the Task Detail screen with original values - GIVEN the user is on the Task Detail screen after saving edits
WHEN the screen renders
THEN the updated field values are displayed - GIVEN user-visible text appears on the Edit Task screen
WHEN the app renders the screen
THEN all visible text comes from string resources
Activity