use crate::Result;
use crate::daemon_list::NamespaceFilter;
#[derive(Debug, usage_rs::Args)]
#[usage(
verbatim_doc_comment,
long_about = "\
Launch the interactive TUI dashboard
Shows live daemon status with fuzzy search, sorting, batch operations,
log viewing, and a config editor.
The dashboard can be scoped to one or more namespaces; the fuzzy search
(`/`) then operates within the scoped set.
Example:
pitchfork tui
pitchfork tui --namespace frontend
Show only daemons in the 'frontend' namespace
pitchfork tui --project Show only the current project's daemons"
)]
pub struct Tui {
#[usage(long)]
namespace: Vec<String>,
#[usage(long)]
project: bool,
}
impl Tui {
pub async fn run(&self) -> Result<()> {
let filter = NamespaceFilter::from_flags(&self.namespace, self.project)?;
crate::tui::run(filter).await
}
}