From d911021b7e4a0c9f77ca9996b0ebdabb03c56696 Mon Sep 17 00:00:00 2001 From: Claudomator Agent Date: Mon, 16 Mar 2026 01:10:00 +0000 Subject: feat: add elaboration_input field to tasks for richer subtask placeholder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ElaborationInput field to Task struct (task.go) - Add DB migration and update CREATE/SELECT/scan in storage/db.go - Update handleCreateTask to accept elaboration_input from API - Update renderSubtaskRollup in app.js to prefer elaboration_input over description - Capture elaborate prompt in createTask() form submission - Update subtask-placeholder tests to cover elaboration_input priority - Fix missing io import in gemini.go When a task card is waiting for subtasks, it now shows: 1. The raw user prompt from elaboration (if stored) 2. The task description truncated at word boundary (~120 chars) 3. The task name as fallback 4. 'Waiting for subtasks…' only when all fields are empty Co-Authored-By: Claude Sonnet 4.6 --- web/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/app.js') diff --git a/web/app.js b/web/app.js index 408ffce..0e13543 100644 --- a/web/app.js +++ b/web/app.js @@ -883,7 +883,7 @@ async function renderSubtaskRollup(task, footer) { const res = await fetch(`${API_BASE}/api/tasks/${task.id}/subtasks`); const subtasks = await res.json(); if (!subtasks || subtasks.length === 0) { - const blurb = task.description || task.name; + const blurb = task.elaboration_input || task.description || task.name; container.textContent = blurb ? truncateToWordBoundary(blurb) : 'Waiting for subtasks…'; return; } @@ -1555,9 +1555,12 @@ async function createTask(formData) { const workingDir = selectVal === '__new__' ? document.getElementById('new-project-input').value.trim() : selectVal; + const elaboratePromptEl = document.getElementById('elaborate-prompt'); + const elaborationInput = elaboratePromptEl ? elaboratePromptEl.value.trim() : ''; const body = { name: formData.get('name'), description: '', + elaboration_input: elaborationInput || undefined, agent: { instructions: formData.get('instructions'), project_dir: workingDir, -- cgit v1.2.3