Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: release review — correct warning log level, store runner workspacePath, guard task action toasts

Adam Eivy8726a8893cf7
diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsx
index c2a9a525f0..640928e6ff 100644
--- a/client/src/components/cos/tabs/TaskItem.jsx
+++ b/client/src/components/cos/tabs/TaskItem.jsx
@@ -158,7 +158,8 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
if (newStatus === 'blocked' && blockedReasonText) {
updates.blockedReason = blockedReasonText;
}
- await api.updateCosTask(task.id, updates).catch(err => toast.error(err.message));
+ const result = await api.updateCosTask(task.id, updates).catch(err => { toast.error(err.message); return null; });
+ if (!result) return;
toast.success(`Task marked as ${newStatus}`);
onRefresh();
};
@@ -175,7 +176,8 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
};
const handleSave = async () => {
- await api.updateCosTask(task.id, editData).catch(err => toast.error(err.message));
+ const result = await api.updateCosTask(task.id, editData).catch(err => { toast.error(err.message); return null; });
+ if (!result) return;
toast.success('Task updated');
setEditing(false);
onRefresh();
@@ -183,7 +185,8 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
const handleDelete = async () => {
const taskType = isSystem ? 'internal' : 'user';
- await api.deleteCosTask(task.id, taskType).catch(err => toast.error(err.message));
+ const result = await api.deleteCosTask(task.id, taskType).catch(err => { toast.error(err.message); return null; });
+ if (!result) return;
toast.success('Task deleted');
onRefresh();
};
diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.js
index e51c22570d..63f8fd0ffe 100644
--- a/server/services/subAgentSpawner.js
+++ b/server/services/subAgentSpawner.js
@@ -1294,7 +1294,7 @@ export async function spawnAgentForTask(task) {
const laneResult = await waitForLane(laneName, agentId, { timeoutMs: 30000, metadata: { taskId: task.id } });
if (!laneResult.success) {
spawningTasks.delete(task.id);
- emitLog('warning', `Lane ${laneName} unavailable for task ${task.id}, deferring`, { taskId: task.id, lane: laneName });
+ emitLog('warn', `Lane ${laneName} unavailable for task ${task.id}, deferring`, { taskId: task.id, lane: laneName });
cosEvents.emit('agent:deferred', { taskId: task.id, reason: 'lane-capacity', lane: laneName });
return null;
}
@@ -1302,7 +1302,7 @@ export async function spawnAgentForTask(task) {
const laneResult = acquire(laneName, agentId, { taskId: task.id });
if (!laneResult.success) {
spawningTasks.delete(task.id);
- emitLog('warning', `Failed to acquire lane ${laneName}: ${laneResult.error}`, { taskId: task.id });
+ emitLog('warn', `Failed to acquire lane ${laneName}: ${laneResult.error}`, { taskId: task.id });
return null;
}
}
@@ -1337,7 +1337,7 @@ export async function spawnAgentForTask(task) {
const providerAvailable = isProviderAvailable(provider.id);
if (!providerAvailable) {
const status = getProviderStatus(provider.id);
- emitLog('warning', `Provider ${provider.id} unavailable: ${status.message}`, {
+ emitLog('warn', `Provider ${provider.id} unavailable: ${status.message}`, {
taskId: task.id,
providerId: provider.id,
reason: status.reason
@@ -1379,7 +1379,7 @@ export async function spawnAgentForTask(task) {
emitLog('info', `Using user-specified provider: ${userProviderId}`, { taskId: task.id });
provider = userProvider;
} else {
- emitLog('warning', `User-specified provider "${userProviderId}" not found, using active provider`, { taskId: task.id });
+ emitLog('warn', `User-specified provider "${userProviderId}" not found, using active provider`, { taskId: task.id });
}
}
@@ -1391,7 +1391,7 @@ export async function spawnAgentForTask(task) {
if (selectedModel && provider.models && provider.models.length > 0) {
const modelIsValid = provider.models.includes(selectedModel);
if (!modelIsValid) {
- emitLog('warning', `Model "${selectedModel}" not valid for provider "${provider.id}", falling back to provider default`, {
+ emitLog('warn', `Model "${selectedModel}" not valid for provider "${provider.id}", falling back to provider default`, {
taskId: task.id,
requestedModel: selectedModel,
providerId: provider.id,
@@ -1438,7 +1438,7 @@ export async function spawnAgentForTask(task) {
if (!isReadOnly) {
// Pull latest from git before starting work (scripted — no LLM needed)
const pullResult = await git.ensureLatest(workspacePath).catch(err => {
- emitLog('warning', `⚠️ Pre-task git pull failed for ${workspacePath}: ${err.message}`, { taskId: task.id, workspace: workspacePath });
+ emitLog('warn', `⚠️ Pre-task git pull failed for ${workspacePath}: ${err.message}`, { taskId: task.id, workspace: workspacePath });
return { success: false, error: err.message };
});
@@ -1447,7 +1447,7 @@ export async function spawnAgentForTask(task) {
} else if (pullResult.conflict) {
// Git conflict detected — create a high-priority task for an agent to resolve it,
// then defer the original task so it retries after the conflict is fixed.
- emitLog('warning', `🔀 Git conflict in ${workspacePath} (branch: ${pullResult.branch}): ${pullResult.error}`, {
+ emitLog('warn', `🔀 Git conflict in ${workspacePath} (branch: ${pullResult.branch}): ${pullResult.error}`, {
taskId: task.id, workspace: workspacePath, branch: pullResult.branch
});
@@ -1464,7 +1464,7 @@ export async function spawnAgentForTask(task) {
+ `Resolve the conflict, commit, and push so the blocked task can proceed.`,
position: 'top'
}, 'internal').catch(err => {
- emitLog('warning', `Failed to create conflict resolution task: ${err.message}`, { taskId: task.id });
+ emitLog('warn', `Failed to create conflict resolution task: ${err.message}`, { taskId: task.id });
});
// Return the original task to pending so it retries after the conflict is resolved
@@ -1478,7 +1478,7 @@ export async function spawnAgentForTask(task) {
});
} else if (!pullResult.success) {
// Non-conflict failure (network error, etc.) — log warning but proceed
- emitLog('warning', `⚠️ Pre-task git pull error: ${pullResult.error}`, { taskId: task.id, workspace: workspacePath });
+ emitLog('warn', `⚠️ Pre-task git pull error: ${pullResult.error}`, { taskId: task.id, workspace: workspacePath });
}
// JIRA integration: create ticket + feature branch if app has JIRA enabled and task opted in
@@ -1735,7 +1735,7 @@ async function waitForRunnerStability() {
await new Promise(resolve => setTimeout(resolve, checkIntervalMs));
}
- emitLog('warning', 'Runner stability check timed out, proceeding anyway', {});
+ emitLog('warn', 'Runner stability check timed out, proceeding anyway', {});
return false;
}
@@ -1757,7 +1757,8 @@ async function spawnViaRunner(agentId, task, prompt, workspacePath, model, provi
startedAt: Date.now(),
initializationTimeout: null,
executionId,
- laneName
+ laneName,
+ workspacePath
};
runnerAgents.set(agentId, agentInfo);