11import { Frown } from "lucide-react" ;
22
33import { CopyText } from "@/components/shared/CopyText/CopyText" ;
4+ import { BlockStack , InlineStack } from "@/components/ui/layout" ;
45import { Spinner } from "@/components/ui/spinner" ;
6+ import { Text } from "@/components/ui/typography" ;
57import { useCheckComponentSpecFromPath } from "@/hooks/useCheckComponentSpecFromPath" ;
68import { useUserDetails } from "@/hooks/useUserDetails" ;
79import { useBackend } from "@/providers/BackendProvider" ;
@@ -15,7 +17,7 @@ import {
1517} from "@/services/executionService" ;
1618
1719import { InfoBox } from "../shared/InfoBox" ;
18- import { StatusBar , StatusIcon , StatusText } from "../shared/Status" ;
20+ import { StatusBar , StatusText } from "../shared/Status" ;
1921import { TaskImplementation } from "../shared/TaskDetails" ;
2022import { CancelPipelineRunButton } from "./components/CancelPipelineRunButton" ;
2123import { ClonePipelineButton } from "./components/ClonePipelineButton" ;
@@ -82,13 +84,26 @@ export const RunDetails = () => {
8284 const annotations = componentSpec . metadata ?. annotations || { } ;
8385
8486 return (
85- < div className = "p-2 flex flex-col gap-6 h-full" >
86- < div className = "flex items-center gap-2 max-w-[90%]" >
87- < CopyText className = "text-lg font-semibold" alwaysShowButton >
88- { componentSpec . name ?? "Unnamed Pipeline" }
89- </ CopyText >
90- < StatusIcon status = { runStatus } tooltip />
91- </ div >
87+ < BlockStack gap = "6" className = "p-2 h-full" >
88+ < CopyText className = "text-lg font-semibold" showButton = { false } >
89+ { componentSpec . name ?? "Unnamed Pipeline" }
90+ </ CopyText >
91+
92+ < InlineStack gap = "2" >
93+ < TaskImplementation
94+ displayName = { componentSpec . name ?? "Pipeline" }
95+ componentSpec = { componentSpec }
96+ showInlineContent = { false }
97+ />
98+ { canAccessEditorSpec && componentSpec . name && (
99+ < InspectPipelineButton pipelineName = { componentSpec . name } />
100+ ) }
101+ < ClonePipelineButton componentSpec = { componentSpec } />
102+ { isInProgress && isRunCreator && (
103+ < CancelPipelineRunButton runId = { runId } />
104+ ) }
105+ { isComplete && < RerunPipelineButton componentSpec = { componentSpec } /> }
106+ </ InlineStack >
92107
93108 { metadata && (
94109 < div className = "flex flex-col gap-2 text-xs text-secondary-foreground mb-2" >
@@ -124,24 +139,6 @@ export const RunDetails = () => {
124139 </ div >
125140 ) }
126141
127- < div >
128- < div className = "flex gap-2 flex-wrap items-center" >
129- < TaskImplementation
130- displayName = { componentSpec . name ?? "Pipeline" }
131- componentSpec = { componentSpec }
132- showInlineContent = { false }
133- />
134- { canAccessEditorSpec && componentSpec . name && (
135- < InspectPipelineButton pipelineName = { componentSpec . name } />
136- ) }
137- < ClonePipelineButton componentSpec = { componentSpec } />
138- { isInProgress && isRunCreator && (
139- < CancelPipelineRunButton runId = { runId } />
140- ) }
141- { isComplete && < RerunPipelineButton componentSpec = { componentSpec } /> }
142- </ div >
143- </ div >
144-
145142 { componentSpec . description && (
146143 < div >
147144 < h3 className = "text-md font-medium mb-1" > Description</ h3 >
@@ -151,15 +148,13 @@ export const RunDetails = () => {
151148 </ div >
152149 ) }
153150
154- < div >
155- < div className = "flex gap-2 ">
156- < h3 className = "text-md font-medium" > Status: { runStatus } </ h3 >
151+ < BlockStack >
152+ < InlineStack gap = "1" blockAlign = "center ">
153+ < Text size = "md" weight = "semibold" > Status: { runStatus } </ Text >
157154 < StatusText statusCounts = { statusCounts } />
158- </ div >
159- < div className = "flex flex-col gap-2" >
160- < StatusBar statusCounts = { statusCounts } />
161- </ div >
162- </ div >
155+ </ InlineStack >
156+ < StatusBar statusCounts = { statusCounts } />
157+ </ BlockStack >
163158
164159 { Object . keys ( annotations ) . length > 0 && (
165160 < div >
@@ -175,65 +170,55 @@ export const RunDetails = () => {
175170 </ div >
176171 ) }
177172
178- < div >
173+ < div className = "w-full" >
179174 < h3 className = "text-md font-medium mb-1" > Artifacts</ h3 >
180- < div className = "flex gap-4" >
181- < div className = "flex-1 " >
175+ < div className = "flex gap-4 flex-col w-full " >
176+ < div className = "w-full " >
182177 < h4 className = "text-sm font-semibold mb-1" > Inputs</ h4 >
183178 { componentSpec . inputs && componentSpec . inputs . length > 0 ? (
184- < ul className = "list-disc list-inside text-sm text-secondary-foreground " >
179+ < div className = "flex flex-col w-full " >
185180 { componentSpec . inputs . map ( ( input ) => (
186- < li key = { input . name } >
187- < span className = "font-semibold" > { input . name } </ span >
188- { input . type && (
189- < span className = "ml-2 text-muted-foreground" >
190- (
191- { typeof input . type === "string" ? input . type : "object" }
192- )
193- </ span >
194- ) }
195- { input . description && (
196- < div className = "text-xs text-secondary-foreground ml-4" >
197- { input . description }
198- </ div >
199- ) }
200- </ li >
181+ < div
182+ className = "flex flex-row justify-between even:bg-white odd:bg-gray-100 gap-1 px-2 py-1 rounded-xs items-center w-full"
183+ key = { input . name }
184+ >
185+ < div className = "text-xs flex-1 truncate" >
186+ < span className = "font-semibold" > { input . name } </ span >
187+ </ div >
188+ < div className = "text-xs text-muted-foreground" >
189+ { typeof input . type === "string" ? input . type : "object" }
190+ </ div >
191+ </ div >
201192 ) ) }
202- </ ul >
193+ </ div >
203194 ) : (
204195 < div className = "text-xs text-muted-foreground" > No inputs</ div >
205196 ) }
206197 </ div >
207- < div className = "flex-1 " >
198+ < div className = "w-full " >
208199 < h4 className = "text-sm font-semibold mb-1" > Outputs</ h4 >
209200 { componentSpec . outputs && componentSpec . outputs . length > 0 ? (
210- < ul className = "list-disc list-inside text-sm text-secondary-foreground " >
201+ < div className = "flex flex-col w-full " >
211202 { componentSpec . outputs . map ( ( output ) => (
212- < li key = { output . name } >
213- < span className = "font-semibold" > { output . name } </ span >
214- { output . type && (
215- < span className = "ml-2 text-muted-foreground" >
216- (
217- { typeof output . type === "string"
218- ? output . type
219- : "object" }
220- )
221- </ span >
222- ) }
223- { output . description && (
224- < div className = "text-xs text-secondary-foreground ml-4" >
225- { output . description }
226- </ div >
227- ) }
228- </ li >
203+ < div
204+ className = "flex flex-row justify-between even:bg-white odd:bg-gray-100 gap-1 px-2 py-1 rounded-xs items-center w-full"
205+ key = { output . name }
206+ >
207+ < div className = "text-xs flex-1 truncate" >
208+ < span className = "font-semibold" > { output . name } </ span >
209+ </ div >
210+ < div className = "text-xs text-muted-foreground" >
211+ { typeof output . type === "string" ? output . type : "object" }
212+ </ div >
213+ </ div >
229214 ) ) }
230- </ ul >
215+ </ div >
231216 ) : (
232217 < div className = "text-xs text-muted-foreground" > No outputs</ div >
233218 ) }
234219 </ div >
235220 </ div >
236221 </ div >
237- </ div >
222+ </ BlockStack >
238223 ) ;
239224} ;
0 commit comments