@supaku/agentfactory-dashboard 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +24 -6
- package/src/components/fleet/agent-card.tsx +14 -1
- package/src/components/fleet/fleet-overview.tsx +3 -2
- package/src/components/pipeline/pipeline-card.tsx +14 -1
- package/src/components/pipeline/pipeline-column.tsx +3 -2
- package/src/components/pipeline/pipeline-view.tsx +3 -1
- package/src/lib/work-type-config.ts +49 -1
- package/src/pages/dashboard-page.tsx +6 -2
- package/src/pages/pipeline-page.tsx +6 -2
package/package.json
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supaku/agentfactory-dashboard",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"access": "public"
|
|
6
|
-
},
|
|
3
|
+
"version": "0.6.3",
|
|
7
4
|
"description": "Premium dashboard UI components for AgentFactory",
|
|
5
|
+
"author": "Supaku (https://supaku.com)",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.0.0"
|
|
9
|
+
},
|
|
8
10
|
"repository": {
|
|
9
11
|
"type": "git",
|
|
10
12
|
"url": "https://github.com/supaku/agentfactory",
|
|
11
13
|
"directory": "packages/dashboard"
|
|
12
14
|
},
|
|
13
|
-
"
|
|
15
|
+
"homepage": "https://github.com/supaku/agentfactory/tree/main/packages/dashboard",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/supaku/agentfactory/issues"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"dashboard",
|
|
24
|
+
"agentfactory",
|
|
25
|
+
"fleet-management",
|
|
26
|
+
"react",
|
|
27
|
+
"ui-components",
|
|
28
|
+
"tailwindcss"
|
|
29
|
+
],
|
|
14
30
|
"type": "module",
|
|
15
31
|
"exports": {
|
|
16
32
|
".": "./src/index.ts",
|
|
@@ -20,7 +36,9 @@
|
|
|
20
36
|
"files": [
|
|
21
37
|
"src",
|
|
22
38
|
"tailwind.config.ts",
|
|
23
|
-
"components.json"
|
|
39
|
+
"components.json",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
24
42
|
],
|
|
25
43
|
"dependencies": {
|
|
26
44
|
"@radix-ui/react-dialog": "^1.1.0",
|
|
@@ -13,9 +13,10 @@ import { Clock, Coins } from 'lucide-react'
|
|
|
13
13
|
interface AgentCardProps {
|
|
14
14
|
session: PublicSessionResponse
|
|
15
15
|
className?: string
|
|
16
|
+
onSelect?: (sessionId: string) => void
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
export function AgentCard({ session, className }: AgentCardProps) {
|
|
19
|
+
export function AgentCard({ session, className, onSelect }: AgentCardProps) {
|
|
19
20
|
const statusConfig = getStatusConfig(session.status)
|
|
20
21
|
const workTypeConfig = getWorkTypeConfig(session.workType)
|
|
21
22
|
|
|
@@ -25,8 +26,20 @@ export function AgentCard({ session, className }: AgentCardProps) {
|
|
|
25
26
|
'group relative rounded-xl border border-af-surface-border/50 bg-af-surface/40 p-4 transition-all duration-300 hover-glow',
|
|
26
27
|
session.status === 'working' && 'border-af-status-success/10',
|
|
27
28
|
session.status === 'failed' && 'border-af-status-error/10',
|
|
29
|
+
onSelect && 'cursor-pointer',
|
|
28
30
|
className
|
|
29
31
|
)}
|
|
32
|
+
{...(onSelect && {
|
|
33
|
+
role: 'button',
|
|
34
|
+
tabIndex: 0,
|
|
35
|
+
onClick: () => onSelect(session.id),
|
|
36
|
+
onKeyDown: (e: React.KeyboardEvent) => {
|
|
37
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
38
|
+
e.preventDefault()
|
|
39
|
+
onSelect(session.id)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
})}
|
|
30
43
|
>
|
|
31
44
|
{/* Top row: identifier + provider */}
|
|
32
45
|
<div className="flex items-start justify-between gap-2">
|
|
@@ -12,9 +12,10 @@ import { Users, Cpu, ListTodo, CheckCircle2, Gauge, DollarSign } from 'lucide-re
|
|
|
12
12
|
|
|
13
13
|
interface FleetOverviewProps {
|
|
14
14
|
className?: string
|
|
15
|
+
onSessionSelect?: (sessionId: string) => void
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export function FleetOverview({ className }: FleetOverviewProps) {
|
|
18
|
+
export function FleetOverview({ className, onSessionSelect }: FleetOverviewProps) {
|
|
18
19
|
const { data: stats, isLoading: statsLoading } = useStats()
|
|
19
20
|
const { data: sessionsData, isLoading: sessionsLoading } = useSessions()
|
|
20
21
|
|
|
@@ -114,7 +115,7 @@ export function FleetOverview({ className }: FleetOverviewProps) {
|
|
|
114
115
|
className="animate-fade-in"
|
|
115
116
|
style={{ animationDelay: `${i * 50}ms` }}
|
|
116
117
|
>
|
|
117
|
-
<AgentCard session={session} />
|
|
118
|
+
<AgentCard session={session} onSelect={onSessionSelect} />
|
|
118
119
|
</div>
|
|
119
120
|
))}
|
|
120
121
|
</div>
|
|
@@ -9,17 +9,30 @@ import { Clock } from 'lucide-react'
|
|
|
9
9
|
interface PipelineCardProps {
|
|
10
10
|
session: PublicSessionResponse
|
|
11
11
|
className?: string
|
|
12
|
+
onSelect?: (sessionId: string) => void
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export function PipelineCard({ session, className }: PipelineCardProps) {
|
|
15
|
+
export function PipelineCard({ session, className, onSelect }: PipelineCardProps) {
|
|
15
16
|
const workTypeConfig = getWorkTypeConfig(session.workType)
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
19
|
<div
|
|
19
20
|
className={cn(
|
|
20
21
|
'rounded-lg border border-af-surface-border/40 bg-af-surface/50 p-3 transition-all duration-200 hover-glow',
|
|
22
|
+
onSelect && 'cursor-pointer',
|
|
21
23
|
className
|
|
22
24
|
)}
|
|
25
|
+
{...(onSelect && {
|
|
26
|
+
role: 'button',
|
|
27
|
+
tabIndex: 0,
|
|
28
|
+
onClick: () => onSelect(session.id),
|
|
29
|
+
onKeyDown: (e: React.KeyboardEvent) => {
|
|
30
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
31
|
+
e.preventDefault()
|
|
32
|
+
onSelect(session.id)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
})}
|
|
23
36
|
>
|
|
24
37
|
<div className="flex items-center gap-2">
|
|
25
38
|
<StatusDot status={session.status} />
|
|
@@ -9,9 +9,10 @@ interface PipelineColumnProps {
|
|
|
9
9
|
count: number
|
|
10
10
|
accentClass?: string
|
|
11
11
|
className?: string
|
|
12
|
+
onSessionSelect?: (sessionId: string) => void
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export function PipelineColumn({ title, sessions, count, accentClass, className }: PipelineColumnProps) {
|
|
15
|
+
export function PipelineColumn({ title, sessions, count, accentClass, className, onSessionSelect }: PipelineColumnProps) {
|
|
15
16
|
return (
|
|
16
17
|
<div
|
|
17
18
|
className={cn(
|
|
@@ -34,7 +35,7 @@ export function PipelineColumn({ title, sessions, count, accentClass, className
|
|
|
34
35
|
<ScrollArea className="flex-1 px-2 pb-2">
|
|
35
36
|
<div className="space-y-2">
|
|
36
37
|
{sessions.map((session) => (
|
|
37
|
-
<PipelineCard key={session.id} session={session} />
|
|
38
|
+
<PipelineCard key={session.id} session={session} onSelect={onSessionSelect} />
|
|
38
39
|
))}
|
|
39
40
|
</div>
|
|
40
41
|
</ScrollArea>
|
|
@@ -30,9 +30,10 @@ function groupByColumn(sessions: PublicSessionResponse[]) {
|
|
|
30
30
|
|
|
31
31
|
interface PipelineViewProps {
|
|
32
32
|
className?: string
|
|
33
|
+
onSessionSelect?: (sessionId: string) => void
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
export function PipelineView({ className }: PipelineViewProps) {
|
|
36
|
+
export function PipelineView({ className, onSessionSelect }: PipelineViewProps) {
|
|
36
37
|
const { data, isLoading } = useSessions()
|
|
37
38
|
const sessions = data?.sessions ?? []
|
|
38
39
|
|
|
@@ -73,6 +74,7 @@ export function PipelineView({ className }: PipelineViewProps) {
|
|
|
73
74
|
sessions={col.sessions}
|
|
74
75
|
count={col.sessions.length}
|
|
75
76
|
accentClass={col.accentClass}
|
|
77
|
+
onSessionSelect={onSessionSelect}
|
|
76
78
|
/>
|
|
77
79
|
</div>
|
|
78
80
|
))}
|
|
@@ -30,6 +30,54 @@ const workTypes: Record<string, WorkTypeConfig> = {
|
|
|
30
30
|
bgColor: 'bg-purple-400/10',
|
|
31
31
|
borderColor: 'border-purple-400/15',
|
|
32
32
|
},
|
|
33
|
+
'qa-coordination': {
|
|
34
|
+
label: 'QA Coord',
|
|
35
|
+
color: 'text-purple-300',
|
|
36
|
+
bgColor: 'bg-purple-300/10',
|
|
37
|
+
borderColor: 'border-purple-300/15',
|
|
38
|
+
},
|
|
39
|
+
acceptance: {
|
|
40
|
+
label: 'Acceptance',
|
|
41
|
+
color: 'text-pink-400',
|
|
42
|
+
bgColor: 'bg-pink-400/10',
|
|
43
|
+
borderColor: 'border-pink-400/15',
|
|
44
|
+
},
|
|
45
|
+
'acceptance-coordination': {
|
|
46
|
+
label: 'Accept Coord',
|
|
47
|
+
color: 'text-pink-300',
|
|
48
|
+
bgColor: 'bg-pink-300/10',
|
|
49
|
+
borderColor: 'border-pink-300/15',
|
|
50
|
+
},
|
|
51
|
+
coordination: {
|
|
52
|
+
label: 'Coordination',
|
|
53
|
+
color: 'text-orange-400',
|
|
54
|
+
bgColor: 'bg-orange-400/10',
|
|
55
|
+
borderColor: 'border-orange-400/15',
|
|
56
|
+
},
|
|
57
|
+
research: {
|
|
58
|
+
label: 'Research',
|
|
59
|
+
color: 'text-teal-400',
|
|
60
|
+
bgColor: 'bg-teal-400/10',
|
|
61
|
+
borderColor: 'border-teal-400/15',
|
|
62
|
+
},
|
|
63
|
+
'backlog-creation': {
|
|
64
|
+
label: 'Backlog',
|
|
65
|
+
color: 'text-slate-400',
|
|
66
|
+
bgColor: 'bg-slate-400/10',
|
|
67
|
+
borderColor: 'border-slate-400/15',
|
|
68
|
+
},
|
|
69
|
+
inflight: {
|
|
70
|
+
label: 'Inflight',
|
|
71
|
+
color: 'text-yellow-400',
|
|
72
|
+
bgColor: 'bg-yellow-400/10',
|
|
73
|
+
borderColor: 'border-yellow-400/15',
|
|
74
|
+
},
|
|
75
|
+
refinement: {
|
|
76
|
+
label: 'Refinement',
|
|
77
|
+
color: 'text-lime-400',
|
|
78
|
+
bgColor: 'bg-lime-400/10',
|
|
79
|
+
borderColor: 'border-lime-400/15',
|
|
80
|
+
},
|
|
33
81
|
refactor: {
|
|
34
82
|
label: 'Refactor',
|
|
35
83
|
color: 'text-amber-400',
|
|
@@ -51,7 +99,7 @@ const workTypes: Record<string, WorkTypeConfig> = {
|
|
|
51
99
|
}
|
|
52
100
|
|
|
53
101
|
const defaultWorkType: WorkTypeConfig = {
|
|
54
|
-
label: '
|
|
102
|
+
label: 'Unknown',
|
|
55
103
|
color: 'text-af-text-secondary',
|
|
56
104
|
bgColor: 'bg-af-text-secondary/8',
|
|
57
105
|
borderColor: 'border-af-text-secondary/10',
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { FleetOverview } from '../components/fleet/fleet-overview'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface DashboardPageProps {
|
|
6
|
+
onSessionSelect?: (sessionId: string) => void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function DashboardPage({ onSessionSelect }: DashboardPageProps) {
|
|
10
|
+
return <FleetOverview onSessionSelect={onSessionSelect} />
|
|
7
11
|
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { PipelineView } from '../components/pipeline/pipeline-view'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface PipelinePageProps {
|
|
6
|
+
onSessionSelect?: (sessionId: string) => void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function PipelinePage({ onSessionSelect }: PipelinePageProps) {
|
|
10
|
+
return <PipelineView onSessionSelect={onSessionSelect} />
|
|
7
11
|
}
|