{/* Header */}

Multi-Agent Assignment Console

-

+

+ + Manage and auto-route tickets to the appropriate team members. + Decentralized workload routing engine. Smart match collaborators based on specialties, availability, and balance ratios.

@@ -121,308 +135,334 @@ export function AssignmentConsole() {
- {/* Simulator Panel */} - {showSimulator && ( -
-
-

- Inbox Mail Feed Simulator -

-

- Simulate new support tickets/email threads landing in the team inbox to verify routing - behavior. -

-
- - {/* Presets */} -
-

Click a preset mail to inject:

-
- {presets.map((preset, index) => ( - - ))} -
-
- -
-

- Or create a custom email message: -

-
-
- - setSender(e.target.value)} - className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" - /> + {isInitializing ? ( +
+
+

Loading console state...

+
+ ) : ( + <> + {/* Simulator Panel */} + {showSimulator && ( +
+
+

+ Inbox Mail Feed Simulator +

+

+ Simulate new support tickets/email threads landing in the team inbox to verify + routing behavior. +

-
- - setSubject(e.target.value)} - className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" - /> + {/* Presets */} +
+

Click a preset mail to inject:

+
+ {presets.map((preset, index) => ( + + ))} +
-
- - -
+
+

+ Or create a custom email message: +

+ +
+ + setSender(e.target.value)} + className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" + /> +
-
- - setSnippet(e.target.value)} - className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" - /> -
+
+ + setSubject(e.target.value)} + className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" + /> +
+ +
+ + +
+ +
+ + setSnippet(e.target.value)} + className="w-full p-2 bg-zinc-950 border border-zinc-850 rounded-lg text-xs text-zinc-200 focus:outline-none focus:border-zinc-700" + /> +
+ +
+ +
+ {(["low", "medium", "high"] as const).map((p) => ( + + ))} +
+
-
- -
- {(["low", "medium", "high"] as const).map((p) => ( +
- ))} -
+
+
+
+ )} -
- + {/* Simulator feedback banner */} +
+ {simSuccess && ( +
+ {simSuccess} +
+ )} + {simError && ( +
+ {simError}
- + )}
-
- )} - - {/* Simulator feedback banner */} - {simSuccess && ( -
- {simSuccess} -
- )} - {simError && ( -
- {simError} -
- )} - {/* Metrics Dashboard */} -
- {/* Metric 1 */} -
- - Unassigned Tickets - -
- 0 ? "text-amber-400" : "text-zinc-300" - }`} - > - {metrics.unassignedThreads} - - active inbox -
-
+ {/* Metrics Dashboard */} +
+ {/* Metric 1 */} +
+ + Unassigned Tickets + +
+ 0 ? "text-amber-400" : "text-zinc-300" + }`} + > + {metrics.unassignedThreads} + + active inbox +
+
- {/* Metric 2 */} -
- - Average Workload - -
- - {metrics.averageWorkload} - - threads / agent -
-
+ {/* Metric 2 */} +
+ + Average Workload + +
+ + {metrics.averageWorkload} + + threads / agent +
+
- {/* Metric 3 */} -
- - Collaborators - -
- - {metrics.activeAgents} - - / {metrics.totalAgents} online -
-
+ {/* Metric 3 */} +
+ + Collaborators + +
+ + {metrics.activeAgents} + + / {metrics.totalAgents} online +
+
- {/* Metric 4 */} -
- - Completed/Resolved - -
- - {metrics.resolvedThreads} - - threads + {/* Metric 4 */} +
+ + Completed/Resolved + +
+ + {metrics.resolvedThreads} + + threads +
+
-
-
- {/* Main workspace layout */} -
- {/* Left/Middle: Ticket Workspace */} -
-
-

- Mail Queue & Thread Streams ({threads.length}) -

-
- -
+ {/* Main workspace layout */} +
+ {/* Left/Middle: Ticket Workspace */} +
+
+

+ Mail Queue & Thread Streams ({threads.length}) +

+
+ +
- {/* Right Sidebar: Collaborators & Workload Balancing */} -
- + {/* Right Sidebar: Collaborators & Workload Balancing */} +
+ - {/* Audit Trail Logs */} -
-
-

- Assignment Activity Logs -

- Real-time audit -
+ {/* Audit Trail Logs */} +
+
+

+ Assignment Activity Logs +

+ Real-time audit +
-
- {logs.length === 0 ? ( -

- No assignment operations logged yet. -

- ) : ( - logs.map((log) => ( -
-
- {log.id} - - {new Date(log.timestamp).toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - second: "2-digit", - })} - -
-
- - {log.operator === "Auto-Routing Engine" - ? "⚡ Auto-Router" - : `👤 ${log.operator}`} - - - {log.action} - - {log.agentId !== "all" && ( - <> - collaborator - {log.agentName} - - )} -
-

- Subject: {log.threadSubject} +

+ {logs.length === 0 ? ( +

+ No assignment operations logged yet.

-
- )) - )} + ) : ( + logs.map((log) => ( +
+
+ {log.id} + + {new Date(log.timestamp).toLocaleTimeString([], { + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + })} + +
+
+ + {log.operator === "Auto-Routing Engine" + ? "⚡ Auto-Router" + : `👤 ${log.operator}`} + + + {log.action} + + {log.agentId !== "all" && ( + <> + collaborator + {log.agentName} + + )} +
+

+ Subject: {log.threadSubject} +

+
+ )) + )} +
+
-
-
+ + )}
); } diff --git a/tools/v2/team/multi-agent-assignment/components/ThreadList.tsx b/tools/v2/team/multi-agent-assignment/components/ThreadList.tsx index 186bd30b..4a49e575 100644 --- a/tools/v2/team/multi-agent-assignment/components/ThreadList.tsx +++ b/tools/v2/team/multi-agent-assignment/components/ThreadList.tsx @@ -49,16 +49,20 @@ export function ThreadList({
setSearch(e.target.value)} - className="w-full pl-9 pr-4 py-2 text-xs bg-zinc-950 border border-zinc-800 rounded-lg text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-700" + className="w-full pl-9 pr-4 py-2 text-xs bg-zinc-950 border border-zinc-800 rounded-lg text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-700 focus:ring-1 focus:ring-zinc-600" /> - 🔍 + {search && ( @@ -66,12 +70,19 @@ export function ThreadList({
{/* Tab Filters */} -
+
{(["all", "unassigned", "assigned", "resolved"] as const).map((t) => (
{/* Threads list container */} -
+
{filteredThreads.length === 0 ? ( -
- 📥 -

No matching threads found.

+
+ +

+ {threads.length === 0 + ? "No active threads in the queue." + : "No matching threads found."} +

Try modifying filters or simulating an incoming mail stream.

@@ -100,6 +121,7 @@ export function ThreadList({ return (
onUnassign(thread.id, agentId)} - className="w-3.5 h-3.5 rounded-full hover:bg-zinc-700 text-[9px] flex items-center justify-center text-zinc-400 hover:text-rose-400 transition" + aria-label={`Unassign ${agent.name}`} + className="w-3.5 h-3.5 rounded-full hover:bg-zinc-700 focus:outline-none focus:ring-1 focus:ring-rose-500 text-[9px] flex items-center justify-center text-zinc-400 hover:text-rose-400 transition" title="Remove Collaborator" > ✕ @@ -201,20 +224,26 @@ export function ThreadList({ {/* Manual assign trigger dropdown */}
{assigningThreadId === thread.id && ( -
+

Active Agents

{activeAgents.length === 0 ? ( -

+

No active agents

) : ( @@ -223,19 +252,21 @@ export function ThreadList({ return ( @@ -266,7 +298,8 @@ export function ThreadList({ {/* Resolve button */}