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
feat(cos): add blocked reason capture to task cards
Adam Eivybce0c15234e9
diff --git a/.changelog/v0.10.x.md b/.changelog/v0.10.x.mdindex 1fdcf2cfbe..cfe15b5ba4 100644--- a/.changelog/v0.10.x.md+++ b/.changelog/v0.10.x.md@@ -196,6 +196,14 @@ This release introduces a structured changelog documentation system for creating- **256K Context Window**: Supports long documents with native multimodal capabilities (text, images, video, PDFs)- **Setup**: Get a free NVIDIA API key at https://build.nvidia.com and add it to the provider configuration+### Chief of Staff - Task Blocked Reason+- **Blocker Capture**: When marking a task as blocked, a modal prompts for the reason (e.g., "Waiting for API access", "Needs design review")+- **Visual Blocker Display**: Blocked tasks show their blocker reason in a highlighted red box below the task description+- **Quick Block Action**: New "Mark as Blocked" button (ban icon) in task action buttons for pending/active tasks+- **Status Toggle**: Clicking a blocked task's status icon clears the blocked state and returns it to pending+- **Metadata Persistence**: Blocker reasons are stored in task metadata and serialized to TASKS.md as `- Blocker: <reason>`+- **Auto-Clear on Unblock**: Blocker metadata is automatically cleared when a task moves out of blocked status+### Brain Links - Quick URL Capture with GitHub Clone- **Links Tab in Brain**: New "Links" tab in the Brain feature for quickly saving URLs for later reference- **Quick-Add Form**: Paste any URL and it's automatically saved - GitHub repos are detected and tagged automaticallydiff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsxindex 40e8b8040b..88ae2782bb 100644--- a/client/src/components/cos/tabs/TaskItem.jsx+++ b/client/src/components/cos/tabs/TaskItem.jsx@@ -1,4 +1,4 @@-import { useState, useMemo } from 'react';+import { useState, useMemo, useRef, useEffect } from 'react';import {Clock,Activity,@@ -12,7 +12,8 @@ import {Timer,Paperclip,FileText,- ExternalLink+ ExternalLink,+ AlertCircle} from 'lucide-react';import toast from 'react-hot-toast';import * as api from '../../../services/api';@@ -87,6 +88,16 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,model: task.metadata?.model || '',provider: task.metadata?.provider || ''});+ const [showBlockedModal, setShowBlockedModal] = useState(false);+ const [blockedReason, setBlockedReason] = useState('');+ const blockedInputRef = useRef(null);++ // Focus input when modal opens+ useEffect(() => {+ if (showBlockedModal && blockedInputRef.current) {+ blockedInputRef.current.focus();+ }+ }, [showBlockedModal]);// Get models for selected provider in edit modeconst editProvider = providers?.find(p => p.id === editData.provider);@@ -123,12 +134,27 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,return null;}, [durations, task.description, task.status]);- const handleStatusChange = async (newStatus) => {- await api.updateCosTask(task.id, { status: newStatus }).catch(err => toast.error(err.message));+ const handleStatusChange = async (newStatus, blockedReasonText = '') => {+ const updates = { status: newStatus };+ if (newStatus === 'blocked' && blockedReasonText) {+ updates.blockedReason = blockedReasonText;+ }+ await api.updateCosTask(task.id, updates).catch(err => toast.error(err.message));toast.success(`Task marked as ${newStatus}`);onRefresh();};+ const handleMarkBlocked = () => {+ setBlockedReason(task.metadata?.blocker || '');+ setShowBlockedModal(true);+ };++ const handleConfirmBlocked = async () => {+ await handleStatusChange('blocked', blockedReason.trim());+ setShowBlockedModal(false);+ setBlockedReason('');+ };+const handleSave = async () => {await api.updateCosTask(task.id, editData).catch(err => toast.error(err.message));toast.success('Task updated');@@ -166,9 +192,18 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,</button>)}<button- onClick={() => handleStatusChange(task.status === 'completed' ? 'pending' : 'completed')}+ onClick={() => {+ if (task.status === 'blocked') {+ // Clicking blocked status clears it back to pending+ handleStatusChange('pending');+ } else if (task.status === 'completed') {+ handleStatusChange('pending');+ } else {+ handleStatusChange('completed');+ }+ }}className="mt-0.5 hover:scale-110 transition-transform"- aria-label={`Status: ${task.status}. Click to mark as ${task.status === 'completed' ? 'pending' : 'completed'}`}+ aria-label={`Status: ${task.status}. Click to mark as ${task.status === 'completed' || task.status === 'blocked' ? 'pending' : 'completed'}`}>{statusIcons[task.status]}</button>@@ -291,6 +326,13 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,))}</div>)}+ {/* Blocker reason display */}+ {task.status === 'blocked' && task.metadata?.blocker && (+ <div className="flex items-start gap-2 mt-2 px-2 py-1.5 bg-port-error/10 border border-port-error/20 rounded text-sm">+ <AlertCircle size={14} className="text-port-error flex-shrink-0 mt-0.5" aria-hidden="true" />+ <span className="text-port-error/90">{task.metadata.blocker}</span>+ </div>+ )}</>)}</div>@@ -299,6 +341,17 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,<div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">{!editing && (<>+ {/* Mark as Blocked button - only show for non-blocked, non-completed tasks */}+ {task.status !== 'blocked' && task.status !== 'completed' && (+ <button+ onClick={handleMarkBlocked}+ className="p-1 text-gray-500 hover:text-port-error transition-colors"+ title="Mark as blocked"+ aria-label="Mark task as blocked"+ >+ <Ban size={14} aria-hidden="true" />+ </button>+ )}<buttononClick={() => setEditing(true)}className="p-1 text-gray-500 hover:text-white transition-colors"@@ -319,6 +372,52 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,)}</div></div>++ {/* Blocked Reason Modal */}+ {showBlockedModal && (+ <div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50" onClick={() => setShowBlockedModal(false)}>+ <div+ className="bg-port-card border border-port-border rounded-lg p-4 w-full max-w-md mx-4"+ onClick={e => e.stopPropagation()}+ role="dialog"+ aria-labelledby="blocked-modal-title"+ >+ <h3 id="blocked-modal-title" className="text-white font-medium mb-3 flex items-center gap-2">+ <Ban size={18} className="text-port-error" aria-hidden="true" />+ Mark Task as Blocked+ </h3>+ <p className="text-sm text-gray-400 mb-3">+ What's blocking this task? This helps track dependencies and unblock work.+ </p>+ <input+ ref={blockedInputRef}+ type="text"+ value={blockedReason}+ onChange={e => setBlockedReason(e.target.value)}+ onKeyDown={e => {+ if (e.key === 'Enter') handleConfirmBlocked();+ if (e.key === 'Escape') setShowBlockedModal(false);+ }}+ placeholder="e.g., Waiting for API access, Needs design review..."+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm mb-4"+ />+ <div className="flex justify-end gap-2">+ <button+ onClick={() => setShowBlockedModal(false)}+ className="px-3 py-1.5 text-sm text-gray-400 hover:text-white transition-colors"+ >+ Cancel+ </button>+ <button+ onClick={handleConfirmBlocked}+ className="px-3 py-1.5 bg-port-error/20 hover:bg-port-error/30 text-port-error rounded-lg text-sm transition-colors min-h-[40px]"+ >+ Mark Blocked+ </button>+ </div>+ </div>+ </div>+ )}</div>);}diff --git a/server/routes/cos.js b/server/routes/cos.jsindex 841f82ea2f..ea0bd329ae 100644--- a/server/routes/cos.js+++ b/server/routes/cos.js@@ -123,7 +123,7 @@ router.post('/tasks', asyncHandler(async (req, res) => {// PUT /api/cos/tasks/:id - Update a taskrouter.put('/tasks/:id', asyncHandler(async (req, res) => {const { id } = req.params;- const { description, priority, status, context, model, provider, app, type = 'user' } = req.body;+ const { description, priority, status, context, model, provider, app, blockedReason, type = 'user' } = req.body;const updates = {};if (description !== undefined) updates.description = description;@@ -134,6 +134,14 @@ router.put('/tasks/:id', asyncHandler(async (req, res) => {if (provider !== undefined) updates.provider = provider;if (app !== undefined) updates.app = app;+ // Handle blocker metadata - set when marking as blocked, clear when unblocking+ if (status === 'blocked' && blockedReason) {+ updates.metadata = { blocker: blockedReason };+ } else if (status && status !== 'blocked') {+ // Clear blocker when moving out of blocked status+ updates.metadata = { blocker: undefined };+ }+const result = await cos.updateTask(id, updates, type);if (result?.error) {throw new ServerError(result.error, { status: 404, code: 'NOT_FOUND' });