@@ -24,21 +24,24 @@ const Analysis: React.FC = () => {
24
24
} = useProject ( ) ;
25
25
26
26
return (
27
- < div className = "flex h-screen bg-gray-100 dark:bg-gray-900" >
27
+ < div className = "flex h-screen overflow-hidden bg-gray-100 dark:bg-gray-900" >
28
28
< Sidebar />
29
- < div className = "flex-1 overflow-y-auto" >
30
- < div className = "p-8" >
31
- < div className = "flex items-center justify-between mb-6" >
29
+
30
+ { /* Main content container with flex column layout */ }
31
+ < div className = "flex-1 flex flex-col min-h-0" >
32
+ { /* Fixed header section */ }
33
+ < div className = "flex-shrink-0 p-8 bg-gray-100 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800" >
34
+ < div className = "flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4" >
32
35
< div className = "flex items-center" >
33
36
< PieChart className = "mr-2 h-8 w-8 text-indigo-600 dark:text-indigo-400" />
34
37
< h1 className = "text-3xl font-bold text-gray-800 dark:text-white" > Analytics</ h1 >
35
38
</ div >
36
- < div className = "flex space-x-4 " >
39
+ < div className = "flex flex-col sm:flex-row gap-4 w-full sm:w-auto " >
37
40
< Select
38
41
value = { selectedProject ?. toString ( ) || '' }
39
42
onValueChange = { ( value ) => setSelectedProject ( Number ( value ) ) }
40
43
>
41
- < SelectTrigger className = "w-[200px]" >
44
+ < SelectTrigger className = "w-full sm:w- [200px]" >
42
45
< SelectValue placeholder = "Select project" />
43
46
</ SelectTrigger >
44
47
< SelectContent >
@@ -54,7 +57,7 @@ const Analysis: React.FC = () => {
54
57
onValueChange = { setSelectedTraceId }
55
58
disabled = { ! selectedProject }
56
59
>
57
- < SelectTrigger className = "w-[200px]" >
60
+ < SelectTrigger className = "w-full sm:w- [200px]" >
58
61
< SelectValue placeholder = "Select trace" />
59
62
</ SelectTrigger >
60
63
< SelectContent >
@@ -67,27 +70,55 @@ const Analysis: React.FC = () => {
67
70
</ Select >
68
71
</ div >
69
72
</ div >
70
- < div className = "space-y-6" >
71
- { selectedProject && (
72
- < >
73
- < PerformanceMetrics />
74
- < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6" >
75
- < LLMUsageAnalysis />
76
- < ToolPerformanceAnalysis /> { /* Removed projectId prop */ }
77
- </ div >
78
- < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6" >
79
- < ErrorAnalysis />
80
- < TimeAnalysis />
73
+ </ div >
74
+
75
+ { /* Scrollable content area */ }
76
+ < div className = "flex-1 overflow-y-auto min-h-0" >
77
+ < div className = "p-8" >
78
+ < div className = "space-y-6 max-w-full" >
79
+ { selectedProject ? (
80
+ < >
81
+ { /* Performance Metrics Section */ }
82
+ < div className = "w-full" >
83
+ < PerformanceMetrics />
84
+ </ div >
85
+
86
+ { /* LLM Usage and Tool Performance Grid */ }
87
+ < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6" >
88
+ < div className = "h-full" >
89
+ < LLMUsageAnalysis />
90
+ </ div >
91
+ < div className = "h-full" >
92
+ < ToolPerformanceAnalysis />
93
+ </ div >
94
+ </ div >
95
+
96
+ { /* Error and Time Analysis Grid */ }
97
+ < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6" >
98
+ < div className = "h-full" >
99
+ < ErrorAnalysis />
100
+ </ div >
101
+ < div className = "h-full" >
102
+ < TimeAnalysis />
103
+ </ div >
104
+ </ div >
105
+
106
+ { /* Full Width Sections */ }
107
+ < div className = "w-full" >
108
+ < TracePerformanceComparison />
109
+ </ div >
110
+ < div className = "w-full" >
111
+ < TopPerformanceCriteria />
112
+ </ div >
113
+ </ >
114
+ ) : (
115
+ < div className = "flex items-center justify-center min-h-[200px] bg-white dark:bg-gray-800 rounded-lg shadow" >
116
+ < div className = "text-center text-gray-500 dark:text-gray-400" >
117
+ Please select a project to view analytics
118
+ </ div >
81
119
</ div >
82
- < TracePerformanceComparison />
83
- < TopPerformanceCriteria />
84
- </ >
85
- ) }
86
- { ! selectedProject && (
87
- < div className = "text-center p-8 text-gray-500" >
88
- Please select a project to view analytics
89
- </ div >
90
- ) }
120
+ ) }
121
+ </ div >
91
122
</ div >
92
123
</ div >
93
124
</ div >
0 commit comments