From ab8ac082265ad6a5ca7c9c25a012cd851cbc8e98 Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Tue, 14 Apr 2026 02:25:14 +0200 Subject: [PATCH] fix(tasks): match /lists + /notes create pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two concrete problems the user hit: 1) /tasks overview had no visible "create" button — only an enter-to-submit input hidden behind a decorative Plus icon. 2) /tasks/[id] add-task form had no visible submit button either. Both now mirror the /lists + /notes pattern: /tasks — new "New list" button in the masthead (bg-slate-900 primary style matching "New list" on /lists and "New note" on /notes). Click creates an empty task_list and navigates to /tasks/[id] where the user names it inline via the new big editable title input (autosaves after NAME_SAVE_DEBOUNCE_MS, 500 ms — same hook as /lists/[id] and /notes/[id]). /tasks/[id] — sticky add-task footer gains a filled "+" submit button on the right; clicking it or pressing Enter both fire handleAdd. Input is now wrapped in the same rounded-lg card used on /lists/[id] so the two screens look identical. i18n tasks_new_list = "New list" / "Nueva lista" (en / es). Tests tasks.test.ts helper updated to drive the new button-then-title flow (same shape as lists.test.ts). T-UI-01..03 all pass. just test-all → exit 0, 228 green, 2 skipped. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/messages/en.json | 1 + apps/web/messages/es.json | 1 + apps/web/src/routes/(app)/tasks/+page.svelte | 44 +++++----- .../src/routes/(app)/tasks/[id]/+page.svelte | 82 ++++++++++++++++--- apps/web/tests/e2e/tasks.test.ts | 19 +++-- 5 files changed, 101 insertions(+), 46 deletions(-) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 33ca668..8b3f76c 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -100,6 +100,7 @@ "list_finish_confirm_yes": "Yes, finish", "list_finish_confirm_no": "Keep shopping", "tasks_title": "Tasks", + "tasks_new_list": "New list", "tasks_no_lists": "No task lists yet", "tasks_create_first": "Create your first task list", "tasks_new_list_placeholder": "New task list", diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json index f55b254..0e2fb2e 100644 --- a/apps/web/messages/es.json +++ b/apps/web/messages/es.json @@ -100,6 +100,7 @@ "list_finish_confirm_yes": "Sí, terminar", "list_finish_confirm_no": "Seguir comprando", "tasks_title": "Tareas", + "tasks_new_list": "Nueva lista", "tasks_no_lists": "Sin listas de tareas", "tasks_create_first": "Crea tu primera lista de tareas", "tasks_new_list_placeholder": "Nueva lista de tareas", diff --git a/apps/web/src/routes/(app)/tasks/+page.svelte b/apps/web/src/routes/(app)/tasks/+page.svelte index 3c9293d..904ab75 100644 --- a/apps/web/src/routes/(app)/tasks/+page.svelte +++ b/apps/web/src/routes/(app)/tasks/+page.svelte @@ -1,4 +1,5 @@