@@ -260,14 +260,35 @@ pub(crate) fn render_artifacts_list(ctx: &RenderContext, params: &ViewParams) ->
260260 html. push_str ( "<th>Links</th><th data-col=\" tags\" >Tags</th>" ) ;
261261 html. push_str ( "</tr></thead><tbody>" ) ;
262262
263+ // #622 (REQ-244): per-artifact lifecycle gaps, so the overview flags what's
264+ // missing to complete each artifact's trace — not only the per-artifact
265+ // validation view. Computed once over the store (same pass the artifacts API
266+ // uses); only the page's artifacts are looked up below.
267+ let gap_artifacts: Vec < rivet_core:: model:: Artifact > = store. iter ( ) . cloned ( ) . collect ( ) ;
268+ let gaps: std:: collections:: HashMap < String , Vec < String > > =
269+ rivet_core:: lifecycle:: check_lifecycle_completeness ( & gap_artifacts, ctx. schema , ctx. graph )
270+ . into_iter ( )
271+ . map ( |g| ( g. artifact_id , g. missing ) )
272+ . collect ( ) ;
273+
263274 for a in page_artifacts {
264275 let status = a. status . as_deref ( ) . unwrap_or ( "-" ) ;
265- let status_badge = match status {
276+ let mut status_cell = match status {
266277 "approved" => format ! ( "<span class=\" badge badge-ok\" >{status}</span>" ) ,
267278 "draft" => format ! ( "<span class=\" badge badge-warn\" >{status}</span>" ) ,
268279 "obsolete" => format ! ( "<span class=\" badge badge-error\" >{status}</span>" ) ,
269280 _ => format ! ( "<span class=\" badge badge-info\" >{status}</span>" ) ,
270281 } ;
282+ // Gap indicator: warn badge listing the missing downstream types,
283+ // appended to the status cell so it reads at a glance.
284+ if let Some ( missing) = gaps. get ( & a. id ) . filter ( |m| !m. is_empty ( ) ) {
285+ status_cell. push_str ( & format ! (
286+ " <span class=\" badge badge-warn\" title=\" missing: {}\" >\u{26a0} {} gap{}</span>" ,
287+ html_escape( & missing. join( ", " ) ) ,
288+ missing. len( ) ,
289+ if missing. len( ) == 1 { "" } else { "s" } ,
290+ ) ) ;
291+ }
271292 let tags_csv = a. tags . join ( "," ) ;
272293 let tags_display = if a. tags . is_empty ( ) {
273294 String :: from ( "-" )
@@ -293,7 +314,7 @@ pub(crate) fn render_artifacts_list(ctx: &RenderContext, params: &ViewParams) ->
293314 <td data-tags=\" {}\" >{}</td></tr>",
294315 badge_for_type( & a. artifact_type) ,
295316 html_escape( & a. title) ,
296- status_badge ,
317+ status_cell ,
297318 a. links. len( ) ,
298319 html_escape( & tags_csv) ,
299320 tags_display,
0 commit comments