@@ -7,16 +7,22 @@ import { InfoBox } from "@/components/shared/InfoBox";
77import { LoadingScreen } from "@/components/shared/LoadingScreen" ;
88import { StatusBar } from "@/components/shared/Status" ;
99import { BlockStack , InlineStack } from "@/components/ui/layout" ;
10- import { Text } from "@/components/ui/typography" ;
10+ import { Paragraph , Text } from "@/components/ui/typography" ;
1111import { useBackend } from "@/providers/BackendProvider" ;
1212import { useComponentSpec } from "@/providers/ComponentSpecProvider" ;
1313import { useExecutionData } from "@/providers/ExecutionDataProvider" ;
14+ import {
15+ getAnnotationValue ,
16+ PIPELINE_NOTES_ANNOTATION ,
17+ } from "@/utils/annotations" ;
1418import {
1519 flattenExecutionStatusStats ,
1620 getExecutionStatusLabel ,
1721 getOverallExecutionStatusFromStats ,
1822} from "@/utils/executionStatus" ;
1923
24+ const EXCLUDED_ANNOTATIONS = [ PIPELINE_NOTES_ANNOTATION ] ;
25+
2026export const RunDetails = ( ) => {
2127 const { configured } = useBackend ( ) ;
2228 const { componentSpec } = useComponentSpec ( ) ;
@@ -60,7 +66,15 @@ export const RunDetails = () => {
6066 getOverallExecutionStatusFromStats ( executionStatusStats ) ;
6167 const statusLabel = getExecutionStatusLabel ( overallStatus ) ;
6268
63- const annotations = componentSpec . metadata ?. annotations || { } ;
69+ const pipelineAnnotations = componentSpec . metadata ?. annotations || { } ;
70+ const pipelineNotes = getAnnotationValue (
71+ pipelineAnnotations ,
72+ PIPELINE_NOTES_ANNOTATION ,
73+ ) ;
74+
75+ const displayedAnnotations = Object . entries ( pipelineAnnotations )
76+ . filter ( ( [ key ] ) => ! EXCLUDED_ANNOTATIONS . includes ( key ) )
77+ . map ( ( [ key , value ] ) => ( { label : key , value : String ( value ) } ) ) ;
6478
6579 return (
6680 < BlockStack gap = "6" className = "p-2 h-full" >
@@ -98,17 +112,20 @@ export const RunDetails = () => {
98112 < StatusBar executionStatusStats = { executionStatusStats } />
99113 </ ContentBlock >
100114
101- { Object . keys ( annotations ) . length > 0 && (
102- < KeyValueList
103- title = "Annotations"
104- items = { Object . entries ( annotations ) . map ( ( [ key , value ] ) => ( {
105- label : key ,
106- value : String ( value ) ,
107- } ) ) }
108- />
115+ { displayedAnnotations . length > 0 && (
116+ < KeyValueList title = "Annotations" items = { displayedAnnotations } />
109117 ) }
110118
111119 < PipelineIO taskArguments = { details . task_spec . arguments } />
120+
121+ < ContentBlock title = "Notes" >
122+ < BlockStack >
123+ < Paragraph size = "xs" > Pipeline Notes</ Paragraph >
124+ < Paragraph size = "xs" tone = "subdued" >
125+ { pipelineNotes || "No notes available for this pipeline." }
126+ </ Paragraph >
127+ </ BlockStack >
128+ </ ContentBlock >
112129 </ BlockStack >
113130 ) ;
114131} ;
0 commit comments