Extend the CiLaneView struct with badge metadata
Intent: Give the template layer precomputed values for the CSS class and the failed-state flag so that status logic stays in Rust rather than in template conditionals.
Affected files: crates/pika-news/src/web.rs
@@ -395,6 +395,8 @@ struct CiLaneView {
title: String,
entrypoint: String,
status: String,
+ status_badge_class: String,
+ is_failed: bool,
Two new fields are added to the CiLaneView struct at crates/pika-news/src/web.rs:398-399:
status_badge_class: String– holds the CSS class name (e.g.status-skipped) that the template will inject into badge<span>elements.is_failed: bool– replaces the previous inlinelane.status == "failed"comparisons in the templates, centralising the check in Rust.
By computing these values once during mapping, the templates stay declarative and free of string-comparison logic.