From f53b40ac67d43333ba5d5dc4e35ad15bfed36755 Mon Sep 17 00:00:00 2001 From: bboysoul Date: Tue, 8 Sep 2026 10:02:50 +0800 Subject: [PATCH] fix: keep task list open after creation --- frontend/src/App.vue | 1 - frontend/src/style.test.ts | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 3246ce9..4c18962 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -166,7 +166,6 @@ async function submitTaskCompose() { totalTasks.value = nextTotalAfterLocalTaskAdd(totalTasks.value) } taskComposeOpen.value = false - selectTask(task) toast('任务已添加') } catch (reason) { fail(reason) } } diff --git a/frontend/src/style.test.ts b/frontend/src/style.test.ts index 486d6c4..9c6709f 100644 --- a/frontend/src/style.test.ts +++ b/frontend/src/style.test.ts @@ -204,6 +204,12 @@ describe('unified floating add interaction', () => { expect(app).toContain("composeHasTime.value ? composeTime.value : '23:59'") }) + it('keeps the current task list visible after creating a task', () => { + const submitTaskCompose = app.slice(app.indexOf('async function submitTaskCompose()'), app.indexOf('function toggleSidebar()')) + expect(submitTaskCompose).not.toContain('selectTask(task)') + expect(submitTaskCompose).toContain("toast('任务已添加')") + }) + it('lets task create and detail forms configure a repeat rule', () => { expect(app).toContain('const composeRepeat = ref') expect(app).toContain('const selectedTaskRepeat = ref')