From 2509dde6aa372a505b186657706f4d21bd391807 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 12 Aug 2026 23:35:47 +0000 Subject: Add task title editing/deletion, timeline click-to-open, widget app launch Task-detail modal was description-only with no delete affordance; HandleUpdateTask now saves the title too and a Delete button hits a new DELETE /tasks/{id} route backed by store.DeleteNativeTask, which repairs chain_position/unlocks the successor when the deleted task belongs to a chain. Timeline tab task/card/gtask rows now open the same detail modal as the Tasks tab. Android widget's "TODAY" header is now a tap target that launches DashboardActivity, since nothing previously opened the full app from the widget. --- internal/store/native_tasks_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'internal/store/native_tasks_test.go') diff --git a/internal/store/native_tasks_test.go b/internal/store/native_tasks_test.go index d82576e..9a7e55f 100644 --- a/internal/store/native_tasks_test.go +++ b/internal/store/native_tasks_test.go @@ -698,3 +698,23 @@ func TestCreateNextIteration_CarriesEstimatedMinutesForward(t *testing.T) { t.Errorf("EstimatedMinutes = %d, want 60 (carried forward)", next.EstimatedMinutes) } } + +func TestDeleteNativeTask_PlainTask_Removed(t *testing.T) { + s := newNativeTasksTestStore(t) + + if err := s.DeleteNativeTask("real-1"); err != nil { + t.Fatalf("DeleteNativeTask: %v", err) + } + + if _, err := s.GetNativeTaskByID("real-1"); !errors.Is(err, ErrNativeTaskNotFound) { + t.Errorf("err = %v, want ErrNativeTaskNotFound", err) + } +} + +func TestDeleteNativeTask_UnknownID_ReturnsErrNotFound(t *testing.T) { + s := newNativeTasksTestStore(t) + + if err := s.DeleteNativeTask("does-not-exist"); !errors.Is(err, ErrNativeTaskNotFound) { + t.Errorf("err = %v, want ErrNativeTaskNotFound", err) + } +} -- cgit v1.2.3