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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): pass task type when unblocking tasks from insights banner
Adam Eivydbd9194cdec8
diff --git a/client/src/components/cos/ActionableInsightsBanner.jsx b/client/src/components/cos/ActionableInsightsBanner.jsxindex e2c290d7af..30e49d6417 100644--- a/client/src/components/cos/ActionableInsightsBanner.jsx+++ b/client/src/components/cos/ActionableInsightsBanner.jsx@@ -93,8 +93,8 @@ export default function ActionableInsightsBanner({ onTaskUnblocked }) {}};- const handleUnblockTask = async (taskId) => {- const result = await api.updateCosTask(taskId, { status: 'pending' }).catch(err => {+ const handleUnblockTask = async (taskId, taskType) => {+ const result = await api.updateCosTask(taskId, { status: 'pending', type: taskType }).catch(err => {toast.error(err.message);return null;});@@ -177,7 +177,7 @@ export default function ActionableInsightsBanner({ onTaskUnblocked }) {{task.description}</span><button- onClick={() => handleUnblockTask(task.id)}+ onClick={() => handleUnblockTask(task.id, task.taskType)}className="flex items-center gap-1 px-2 py-1 text-xs font-medium bg-port-success/20 hover:bg-port-success/30 text-port-success rounded transition-colors shrink-0 min-h-[28px]"title="Unblock and move to pending">diff --git a/server/routes/cos.js b/server/routes/cos.jsindex 1f65ee7ea2..5c911ae00b 100644--- a/server/routes/cos.js+++ b/server/routes/cos.js@@ -1229,11 +1229,8 @@ router.get('/actionable-insights', asyncHandler(async (req, res) => {const blockedCount = blockedUser.length + blockedCos.length;if (blockedCount > 0) {const firstBlocked = blockedUser[0] || blockedCos[0];- const blockedTasks = [...blockedUser, ...blockedCos].map(t => ({- id: t.id,- description: t.description?.substring(0, 80) || 'Unknown task',- blocker: t.metadata?.blocker || null- }));+ const toBlockedTask = (taskType) => (t) => ({ id: t.id, description: t.description?.substring(0, 80) || 'Unknown task', blocker: t.metadata?.blocker || null, taskType });+ const blockedTasks = [...blockedUser.map(toBlockedTask('user')), ...blockedCos.map(toBlockedTask('internal'))];insights.push({type: 'blocked',priority: 'high',