2026-04-29 10:36:09 +00:00
|
|
|
//! Handler for the `status` command and pipeline status helpers.
|
|
|
|
|
|
|
|
|
|
mod labels;
|
|
|
|
|
mod render;
|
|
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests;
|
|
|
|
|
|
|
|
|
|
pub(super) use labels::{story_short_label, traffic_light_dot};
|
|
|
|
|
pub(super) use render::{build_pipeline_status, unmet_deps_from_items};
|
|
|
|
|
|
|
|
|
|
#[cfg(test)]
|
2026-05-13 16:43:19 +00:00
|
|
|
pub(super) use render::{build_status_from_items, display_section, first_non_empty_snippet};
|
2026-04-29 10:36:09 +00:00
|
|
|
|
|
|
|
|
use super::CommandContext;
|
|
|
|
|
|
|
|
|
|
/// Dispatch the `status` bot command.
|
|
|
|
|
///
|
|
|
|
|
/// With no arguments, renders the full pipeline status. With arguments,
|
|
|
|
|
/// delegates to the triage handler for per-story details.
|
|
|
|
|
pub(super) fn handle_status(ctx: &CommandContext) -> Option<String> {
|
|
|
|
|
if ctx.args.trim().is_empty() {
|
|
|
|
|
Some(build_pipeline_status(
|
|
|
|
|
ctx.effective_root(),
|
|
|
|
|
&ctx.services.agents,
|
|
|
|
|
))
|
|
|
|
|
} else {
|
|
|
|
|
super::triage::handle_triage(ctx)
|
|
|
|
|
}
|
|
|
|
|
}
|