Skip to content

Fix queue delete confirmation to actually wait for user input #703

@codekiln

Description

@codekiln

Problem

The langstar queue delete command displays a confirmation message but doesn't actually wait for user input. It immediately returns without deleting OR waiting for confirmation:

// cli/src/commands/queue.rs:396-401
if !args.force {
    eprintln!("Are you sure you want to delete queue {}?", args.queue_id);
    eprintln!("Use --force to skip this confirmation.");
    return Ok(());  // ❌ Returns without deleting OR waiting
}

This makes the confirmation prompt misleading - it appears to protect the user but provides no protection at all.

Expected Behavior

The command should wait for user input and only proceed if they type "yes", following the same pattern as deployment delete:

// cli/src/commands/deployment.rs:602-611
use std::io::{self, Write};
print!("Type 'yes' to confirm: ");
io::stdout().flush()?;
let mut confirmation = String::new();
io::stdin().read_line(&mut confirmation)?;

if confirmation.trim().to_lowercase() != "yes" {
    println!("Deletion cancelled.");
    return Ok(());
}
// If we get here, proceed with deletion

Related

Discovered during code review in PR #701 (project commands). The project command has been implemented correctly with proper stdin confirmation.

Same issue exists in dataset command - see #702.

Acceptance Criteria

  • Queue delete command waits for user to type "yes" before proceeding
  • Deletion is cancelled if user types anything other than "yes"
  • Follows same pattern as deployment.rs:602-611
  • Manual testing confirms confirmation works as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    wipwork in progress

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions