summaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 21:06:05 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 21:06:05 +0000
commitf0329108dac294be199f53102afafbe1c5c9ab97 (patch)
tree40d4f9dfe0730b270157b924791702e547156466 /web/app.js
parent632ea5a44731af94b6238f330a3b5440906c8ae7 (diff)
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.
Diffstat (limited to 'web/app.js')
-rw-r--r--web/app.js37
1 files changed, 6 insertions, 31 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)