huskies: merge 643_story_web_ui_consumer_for_the_unified_status_broadcaster
This commit is contained in:
@@ -9,11 +9,12 @@ use crate::service::notifications::format::stage_display_name;
|
||||
use crate::service::status::StatusEvent;
|
||||
|
||||
/// Render a [`StatusEvent`] into a human-readable plain-text string.
|
||||
#[allow(dead_code)]
|
||||
///
|
||||
/// This is the single formatter for all status event types. Every transport
|
||||
/// (chat, Web UI, agent context) calls this function rather than duplicating
|
||||
/// formatting logic.
|
||||
// Used by chat/agent transports (stories 642/644); the web UI uses StatusUpdate frames instead.
|
||||
#[allow(dead_code)]
|
||||
pub fn format_status_event(event: &StatusEvent) -> String {
|
||||
match event {
|
||||
StatusEvent::StageTransition {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
pub mod format;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::Serialize;
|
||||
use std::sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
@@ -44,7 +45,8 @@ const CHANNEL_CAPACITY: usize = 256;
|
||||
///
|
||||
/// Each variant carries enough context for [`format_status_event`] to render a
|
||||
/// human-readable message without additional lookups.
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
#[serde(tag = "type", rename_all = "snake_case")]
|
||||
pub enum StatusEvent {
|
||||
/// A work item moved between pipeline stages.
|
||||
StageTransition {
|
||||
|
||||
Reference in New Issue
Block a user