From 404aba14619e457a4c49448b5efc2f62568fc869 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 10 Mar 2026 18:50:36 -0400 Subject: [PATCH] Task UX: forward-only advance button, auto edit mode, reload on save MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TaskViewerView: - Add '→ In Progress' / '→ Done' advance button in toolbar (forward-only, hidden when status is already done) - Styled with primary indigo gradient to distinguish from secondary actions TaskEditorView: - showPreview now defaults false; set to true after load only when body has content — empty tasks open directly in Write mode - Save on an existing task now calls window.location.reload() so the preview/edit mode re-evaluates from the freshly persisted body Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/TaskEditorView.vue | 5 +++- frontend/src/views/TaskViewerView.vue | 41 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/TaskEditorView.vue b/frontend/src/views/TaskEditorView.vue index 41ceffa..751a94f 100644 --- a/frontend/src/views/TaskEditorView.vue +++ b/frontend/src/views/TaskEditorView.vue @@ -98,7 +98,7 @@ async function toggleSubTask(sub: SubTask) { toast.show("Failed to update sub-task", "error"); } } -const showPreview = ref(true); +const showPreview = ref(false); const sidebarOpen = ref(true); const editorRef = ref | null>(null); const titleRef = ref(null); @@ -266,6 +266,8 @@ onMounted(async () => { savedProjectId = projectId.value; savedMilestoneId = milestoneId.value; savedParentId = parentId.value; + // Start in preview mode only if the task already has body content + showPreview.value = body.value.trim().length > 0; } loadSubTasks(); } else { @@ -304,6 +306,7 @@ async function save() { savedParentId = parentId.value; dirty.value = false; toast.show("Task saved"); + window.location.reload(); } else { const task = await store.createTask(data); dirty.value = false; diff --git a/frontend/src/views/TaskViewerView.vue b/frontend/src/views/TaskViewerView.vue index 4810b5e..5cee4b6 100644 --- a/frontend/src/views/TaskViewerView.vue +++ b/frontend/src/views/TaskViewerView.vue @@ -111,6 +111,26 @@ function cycleStatus() { ); } +const forwardStatus: Record = { + todo: "in_progress", + in_progress: "done", + done: null, +}; + +const advanceLabel = computed(() => { + const s = store.currentTask?.status as TaskStatus | undefined; + if (!s) return null; + const next = forwardStatus[s]; + if (!next) return null; + return next === "in_progress" ? "→ In Progress" : "→ Done"; +}); + +function advanceStatus() { + if (!store.currentTask) return; + const next = forwardStatus[store.currentTask.status as TaskStatus]; + if (next) store.patchStatus(store.currentTask.id, next); +} + function isOverdue(): boolean { if (!store.currentTask?.due_date || store.currentTask.status === "done") return false; @@ -192,6 +212,13 @@ const subTaskProgress = computed(() => { > Edit +