-
Allow ({toolAllow.length}):
-
- {toolAllow.map((tool: string) => (
-
{tool}
- ))}
+ {editing ? (
+
+
+
+
+ {toolAllow.map((tool: string, i: number) => (
+
+ {tool}
+
+
+ ))}
+
+
+ setNewAllowTool(e.target.value)}
+ onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); addTool('allow', newAllowTool); setNewAllowTool('') } }}
+ placeholder="Add allowed tool name"
+ className="flex-1 bg-surface-1 text-foreground rounded px-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"
+ />
+
+
+
+
+
+
+ {toolDeny.map((tool: string, i: number) => (
+
+ {tool}
+
+
+ ))}
+
+
+ setNewDenyTool(e.target.value)}
+ onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); addTool('deny', newDenyTool); setNewDenyTool('') } }}
+ placeholder="Add denied tool name"
+ className="flex-1 bg-surface-1 text-foreground rounded px-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"
+ />
+
+
- )}
- {toolDeny.length > 0 && (
-
-
Deny ({toolDeny.length}):
-
- {toolDeny.map((tool: string) => (
- {tool}
- ))}
-
-
- )}
- {toolAllow.length === 0 && toolDeny.length === 0 && !toolRawPreview && (
-
No tools configured
- )}
- {toolRawPreview && (
-
- {toolRawPreview}
-
+ ) : (
+ <>
+ {toolAllow.length > 0 && (
+
+
Allow ({toolAllow.length}):
+
+ {toolAllow.map((tool: string) => (
+ {tool}
+ ))}
+
+
+ )}
+ {toolDeny.length > 0 && (
+
+
Deny ({toolDeny.length}):
+
+ {toolDeny.map((tool: string) => (
+ {tool}
+ ))}
+
+
+ )}
+ {toolAllow.length === 0 && toolDeny.length === 0 && !toolRawPreview && (
+
No tools configured
+ )}
+ {toolRawPreview && (
+
+ {toolRawPreview}
+
+ )}
+ >
)}
diff --git a/src/components/panels/task-board-panel.tsx b/src/components/panels/task-board-panel.tsx
index b5d12a6..e7e5990 100644
--- a/src/components/panels/task-board-panel.tsx
+++ b/src/components/panels/task-board-panel.tsx
@@ -3,7 +3,11 @@
import { useState, useEffect, useCallback, useRef } from 'react'
import { useMissionControl } from '@/store'
import { useSmartPoll } from '@/lib/use-smart-poll'
+
import { createClientLogger } from '@/lib/client-logger'
+
+import { useFocusTrap } from '@/lib/use-focus-trap'
+
import { AgentAvatar } from '@/components/ui/agent-avatar'
import { MarkdownRenderer } from '@/components/markdown-renderer'
@@ -271,8 +275,8 @@ export function TaskBoardPanel() {
if (loading) {
return (
-
-
+
)
@@ -301,11 +305,12 @@ export function TaskBoardPanel() {
{/* Error Display */}
{error && (
-
+
{error}
@@ -313,10 +318,12 @@ export function TaskBoardPanel() {
)}
{/* Kanban Board */}
-
+
{statusColumns.map(column => (
handleDragEnter(e, column.key)}
onDragLeave={handleDragLeave}
@@ -337,8 +344,12 @@ export function TaskBoardPanel() {
handleDragStart(e, task)}
onClick={() => setSelectedTask(task)}
+ onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); setSelectedTask(task) } }}
className={`bg-surface-1 rounded-lg p-3 cursor-pointer hover:bg-surface-2 transition-smooth border-l-4 ${priorityColors[task.priority]} ${
draggedTask?.id === task.id ? 'opacity-50' : ''
}`}
@@ -613,12 +624,14 @@ function TaskDetailModal({
)
+ const dialogRef = useFocusTrap(onClose)
+
return (
-
-
+
{ if (e.target === e.currentTarget) onClose() }}>
+
-
{task.title}
+
{task.title}