{"record":{"id":"cc4edb5e96c06d83","repo":"Hmbown/CodeWhale","slug":"invalid-input","errorCode":null,"errorMessage":"Invalid input","messagePattern":"Invalid input","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":8576,"sourceCode":"        bail!(\"No saved sessions found.\");\n    }\n\n    println!(\"Select a session to resume:\");\n    for (idx, session) in sessions.iter().enumerate() {\n        println!(\"  {:>2}. {} ({})\", idx + 1, session.title, session.id);\n    }\n    print!(\"Enter a number (or press Enter to cancel): \");\n    io::stdout().flush()?;\n\n    let mut input = String::new();\n    io::stdin().read_line(&mut input)?;\n    let input = input.trim();\n    if input.is_empty() {\n        bail!(\"No session selected.\");\n    }\n    let idx: usize = input\n        .parse()\n        .map_err(|_| anyhow::anyhow!(\"Invalid input\"))?;\n    let session = sessions\n        .get(idx.saturating_sub(1))\n        .ok_or_else(|| anyhow::anyhow!(\"Selection out of range\"))?;\n    Ok(session.id.clone())\n}\n\nasync fn run_review(config: &Config, args: ReviewArgs) -> Result<()> {\n    initialize_cloud_facts(config);\n    use crate::client::CodewhaleClient;\n\n    // Resolved before anything is fetched or billed so an unknown\n    // `--provider` fails fast with the provider vocabulary hint.\n    let (config, force_configured_route) = review_execution_route(config, &args)?;\n    let config = &config;\n    validate_review_receipt_args(&args)?;\n\n    if args.pr.is_some() && !is_command_available(\"gh\") {\n        bail!(","sourceCodeStart":8558,"sourceCodeEnd":8594,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L8558-L8594","documentation":"Picker guard in pick_session_id: the interactive input parsed as a number (non-empty), but the parse to usize failed — the user typed something that is not a valid integer (e.g. 'a3' or '1.5'). The session list is unchanged; re-running the picker is enough.","triggerScenarios":"Thrown at crates/tui/src/lib.rs:8576 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a plain integer matching a listed session number.","Re-run the command and choose again; press Enter to cancel."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}