From f0329108dac294be199f53102afafbe1c5c9ab97 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 8 Mar 2026 21:06:05 +0000 Subject: fix(web): resolve merge conflicts and fix tab navigation - Remove unresolved merge markers in app.js. - Set 'tasks' as the default active tab and panel on boot. - Synchronize initial HTML state with JS tab switching logic. - Fix broken Draft with AI button handler from bad merge. --- web/app.js | 37 ++++++------------------------------- web/index.html | 8 ++++---- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/web/app.js b/web/app.js index e935ff0..6da2f0e 100644 --- a/web/app.js +++ b/web/app.js @@ -2016,7 +2016,7 @@ if (typeof document !== 'undefined') document.addEventListener('DOMContentLoaded handleStartNextTask(this); }); - switchTab('running'); + switchTab('tasks'); startPolling(); connectWebSocket(); @@ -2092,43 +2092,18 @@ if (typeof document !== 'undefined') document.addEventListener('DOMContentLoaded const f = document.getElementById('task-form'); if (result.name) f.querySelector('[name="name"]').value = result.name; -<<<<<<< HEAD if (result.agent && result.agent.instructions) f.querySelector('[name="instructions"]').value = result.agent.instructions; - if (result.agent && result.agent.working_dir) { + if (result.agent && (result.agent.project_dir || result.agent.working_dir)) { + const pDir = result.agent.project_dir || result.agent.working_dir; const pSel = document.getElementById('project-select'); - const exists = [...pSel.options].some(o => o.value === result.agent.working_dir); -||||||| cad057f - if (result.claude && result.claude.instructions) - f.querySelector('[name="instructions"]').value = result.claude.instructions; - if (result.claude && result.claude.working_dir) { - const sel = document.getElementById('project-select'); - const exists = [...sel.options].some(o => o.value === result.claude.working_dir); -======= - if (result.claude && result.claude.instructions) - f.querySelector('[name="instructions"]').value = result.claude.instructions; - if (result.claude && result.claude.project_dir) { - const sel = document.getElementById('project-select'); - const exists = [...sel.options].some(o => o.value === result.claude.project_dir); ->>>>>>> master + const exists = [...pSel.options].some(o => o.value === pDir); if (exists) { -<<<<<<< HEAD - pSel.value = result.agent.working_dir; -||||||| cad057f - sel.value = result.claude.working_dir; -======= - sel.value = result.claude.project_dir; ->>>>>>> master + pSel.value = pDir; } else { pSel.value = '__new__'; document.getElementById('new-project-row').hidden = false; -<<<<<<< HEAD - document.getElementById('new-project-input').value = result.agent.working_dir; -||||||| cad057f - document.getElementById('new-project-input').value = result.claude.working_dir; -======= - document.getElementById('new-project-input').value = result.claude.project_dir; ->>>>>>> master + document.getElementById('new-project-input').value = pDir; } } if (result.agent && result.agent.model) diff --git a/web/index.html b/web/index.html index a2800b0..ae6c6d2 100644 --- a/web/index.html +++ b/web/index.html @@ -15,13 +15,13 @@
-