{"record":{"id":"da902fafc3b482d4","repo":"BloopAI/vibe-kanban","slug":"invalid-spinner-template","errorCode":null,"errorMessage":"Invalid spinner template","messagePattern":"Invalid spinner template","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/review/src/main.rs","lineNumber":94,"sourceCode":"    }\n\n    let email: String = input.interact_text().expect(\"Failed to read email\");\n\n    // Save email for next time\n    config.email = Some(email.clone());\n    if let Err(e) = config.save() {\n        debug!(\"Failed to save config: {}\", e);\n    }\n\n    email\n}\n\nfn create_spinner(message: &str) -> ProgressBar {\n    let spinner = ProgressBar::new_spinner();\n    spinner.set_style(\n        ProgressStyle::default_spinner()\n            .template(\"{spinner:.green} {msg}\")\n            .expect(\"Invalid spinner template\"),\n    );\n    spinner.set_message(message.to_string());\n    spinner.enable_steady_tick(Duration::from_millis(100));\n    spinner\n}\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n    // Install rustls crypto provider before any TLS operations\n    rustls::crypto::aws_lc_rs::default_provider()\n        .install_default()\n        .expect(\"Failed to install rustls crypto provider\");\n\n    let args = Args::parse();\n\n    // Initialize tracing\n    let filter = if args.verbose {\n        EnvFilter::new(\"debug\")","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/review/src/main.rs#L76-L112","documentation":"indicatif's ProgressStyle::template parses the template string and returns a Result; it errors on invalid template syntax. Here the template is a hardcoded literal \"{spinner:.green} {msg}\", so the expect only panics if the template were malformed or an installed indicatif version rejects the keys.","triggerScenarios":"`create_spinner` is called during `run` and ProgressStyle::default_spinner().template(...) returns Err because the template string is invalid for the current indicatif version (e.g. after an upgrade renamed/removed the {spinner} or {msg} key or changed escape syntax).","commonSituations":"Upgrading indicatif to a version with breaking template syntax changes; someone editing the hardcoded template and introducing a typo like an unclosed brace or bad style spec.","solutions":["Pin/upgrade indicatif to a version where the template syntax is supported and verify with a test","Replace expect with a fallback: use the error to log a warning and set an empty/default style","Prefer the compile-time-checked template! macro from indicatif so malformed templates fail at build time"],"exampleFix":"// before\nProgressStyle::default_spinner().template(\"{spinner:.green} {msg}\").expect(\"Invalid spinner template\")\n// after\nProgressStyle::with_template(\"{spinner:.green} {msg}\")\n    .unwrap_or_else(|_| ProgressStyle::default_spinner())","handlingStrategy":"fallback","validationCode":"fn template_ok(t: &str) -> bool { indicatif::ProgressStyle::with_template(t).is_ok() }","typeGuard":null,"tryCatchPattern":"let style = ProgressStyle::with_template(\"{spinner:.green} {msg}\")\n    .unwrap_or_else(|_| ProgressStyle::default_spinner());","preventionTips":["Use indicatif's template! macro for compile-time validation","Pin indicatif versions and read changelogs on upgrade","Add a unit test that constructs every spinner style used by the CLI"],"tags":["rust","panic","indicatif","cli"],"backgroundTag":"invalid-template-syntax","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}