scrub remaining queued references from code, tests, and README
change vqtymmsvytysnynqqvnlrksmuktvtkvt
commit a08477092553ca84cdb4e807344db978046cccc6
author Alpha Chen <alpha@kejadlen.dev>
date
parent mmxyzxxs
diff --git a/README.md b/README.md
index a9b5365..b26e49c 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ cargo run --bin ranger -- <command>
 ```
 ranger backlog create "my-project"
 ranger task create "First thing to do" --backlog my-project
-ranger task create "Second thing" --backlog my-project --state queued --tag urgent
+ranger task create "Second thing" --backlog my-project --state ready --tag urgent
 ranger task list --backlog my-project
 ranger task edit <key> --state in_progress
 ranger comment add <key> "Started working on this"
diff --git a/src/bin/ranger/commands/task.rs b/src/bin/ranger/commands/task.rs
index 4fc5db4..9d23e63 100644
--- a/src/bin/ranger/commands/task.rs
+++ b/src/bin/ranger/commands/task.rs
@@ -77,7 +77,7 @@ pub enum TaskCommands {
         /// Task description
         #[arg(long)]
         description: Option<String>,
-        /// Initial state (icebox, queued, in_progress, done)
+        /// Initial state (icebox, ready, in_progress, done)
         #[arg(long)]
         state: Option<String>,
         #[command(flatten)]
diff --git a/src/models.rs b/src/models.rs
index 45426c2..f2dc32d 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -22,7 +22,7 @@ impl State {
         }
     }
 
-    /// Numeric rank following the natural flow: icebox(0) → queued(1) → in_progress(2) → done(3).
+    /// Numeric rank following the natural flow: icebox(0) → ready(1) → in_progress(2) → done(3).
     pub fn rank(&self) -> u8 {
         match self {
             State::Icebox => 0,
@@ -42,7 +42,7 @@ impl std::str::FromStr for State {
     fn from_str(s: &str) -> Result<Self, Self::Err> {
         match s {
             "icebox" => Ok(State::Icebox),
-            "ready" | "queued" => Ok(State::Ready),
+            "ready" => Ok(State::Ready),
             "in_progress" => Ok(State::InProgress),
             "done" => Ok(State::Done),
             _ => Err(InvalidStateError(s.to_string())),
@@ -134,12 +134,6 @@ mod tests {
         }
     }
 
-    #[test]
-    fn queued_parses_as_ready() {
-        let parsed: State = "queued".parse().unwrap();
-        assert_eq!(parsed, State::Ready);
-    }
-
     #[test]
     fn state_parse_invalid_returns_error() {
         let err = "bogus".parse::<State>().unwrap_err();
diff --git a/src/ops/task.rs b/src/ops/task.rs
index 8ca48fa..5d89808 100644
--- a/src/ops/task.rs
+++ b/src/ops/task.rs
@@ -595,7 +595,7 @@ mod tests {
         create(
             &mut conn,
             CreateTask {
-                title: "Queued task",
+                title: "Ready task",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -617,7 +617,7 @@ mod tests {
         assert_eq!(icebox.len(), 1);
         assert_eq!(icebox[0].title, "Icebox task");
 
-        let queued = list(
+        let ready = list(
             &mut conn,
             bl.id,
             &ListFilter {
@@ -627,8 +627,8 @@ mod tests {
         )
         .await
         .unwrap();
-        assert_eq!(queued.len(), 1);
-        assert_eq!(queued[0].title, "Queued task");
+        assert_eq!(ready.len(), 1);
+        assert_eq!(ready[0].title, "Ready task");
     }
 
     #[tokio::test]
@@ -1022,7 +1022,7 @@ mod tests {
         let pool = test_pool().await;
         let mut conn = pool.acquire().await.unwrap();
         let bl = backlog::create(&mut conn, "Test").await.unwrap();
-        let queued = create(
+        let ready = create(
             &mut conn,
             CreateTask {
                 title: "Q",
@@ -1045,7 +1045,7 @@ mod tests {
         .await
         .unwrap();
 
-        let err = move_task(&mut conn, &queued, Placement::Before(&done))
+        let err = move_task(&mut conn, &ready, Placement::Before(&done))
             .await
             .unwrap_err();
         assert!(err.to_string().contains("ready"));
@@ -1058,7 +1058,7 @@ mod tests {
         let mut conn = pool.acquire().await.unwrap();
         let bl = backlog::create(&mut conn, "Test").await.unwrap();
 
-        // Create two done tasks and one queued task
+        // Create two done tasks and one ready task
         let d1 = create(
             &mut conn,
             CreateTask {
@@ -1084,7 +1084,7 @@ mod tests {
         let q1 = create(
             &mut conn,
             CreateTask {
-                title: "Queued 1",
+                title: "Ready 1",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1093,7 +1093,7 @@ mod tests {
         .await
         .unwrap();
 
-        // Move queued task to done — should land after Done 2
+        // Move ready task to done — should land after Done 2
         let updated = edit(&mut conn, q1.id, None, None, Some(State::Done))
             .await
             .unwrap();
@@ -1124,11 +1124,11 @@ mod tests {
         let mut conn = pool.acquire().await.unwrap();
         let bl = backlog::create(&mut conn, "Test").await.unwrap();
 
-        // Create two queued tasks and one in_progress task
+        // Create two ready tasks and one in_progress task
         let q1 = create(
             &mut conn,
             CreateTask {
-                title: "Queued 1",
+                title: "Ready 1",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1139,7 +1139,7 @@ mod tests {
         let q2 = create(
             &mut conn,
             CreateTask {
-                title: "Queued 2",
+                title: "Ready 2",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1159,13 +1159,13 @@ mod tests {
         .await
         .unwrap();
 
-        // Move in_progress task to queued — should land before Queued 1
+        // Move in_progress task to ready — should land before Ready 1
         let updated = edit(&mut conn, ip.id, None, None, Some(State::Ready))
             .await
             .unwrap();
         assert_eq!(updated.state, State::Ready);
 
-        let queued = list(
+        let ready = list(
             &mut conn,
             bl.id,
             &ListFilter {
@@ -1175,13 +1175,13 @@ mod tests {
         )
         .await
         .unwrap();
-        assert_eq!(queued.len(), 3);
+        assert_eq!(ready.len(), 3);
         assert_eq!(
-            queued[0].id, ip.id,
-            "demoted task should be at beginning of queued group"
+            ready[0].id, ip.id,
+            "demoted task should be at beginning of ready group"
         );
-        assert_eq!(queued[1].id, q1.id);
-        assert_eq!(queued[2].id, q2.id);
+        assert_eq!(ready[1].id, q1.id);
+        assert_eq!(ready[2].id, q2.id);
     }
 
     #[tokio::test]
@@ -1221,7 +1221,7 @@ mod tests {
             .unwrap();
         assert_eq!(updated.position, original_pos);
 
-        let queued = list(
+        let ready = list(
             &mut conn,
             bl.id,
             &ListFilter {
@@ -1231,8 +1231,8 @@ mod tests {
         )
         .await
         .unwrap();
-        assert_eq!(queued[0].id, t1.id);
-        assert_eq!(queued[1].id, t2.id);
+        assert_eq!(ready[0].id, t1.id);
+        assert_eq!(ready[1].id, t2.id);
     }
 
     #[tokio::test]
@@ -1244,7 +1244,7 @@ mod tests {
         let t1 = create(
             &mut conn,
             CreateTask {
-                title: "Queued task",
+                title: "Ready task",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1482,7 +1482,7 @@ mod tests {
         let t1 = create(
             &mut conn,
             CreateTask {
-                title: "Tagged queued",
+                title: "Tagged ready",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1493,7 +1493,7 @@ mod tests {
         create(
             &mut conn,
             CreateTask {
-                title: "Untagged queued",
+                title: "Untagged ready",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1516,7 +1516,7 @@ mod tests {
         .await
         .unwrap();
         assert_eq!(results.len(), 1);
-        assert_eq!(results[0].title, "Tagged queued");
+        assert_eq!(results[0].title, "Tagged ready");
     }
 
     // ---- done_at tests ----
@@ -1551,7 +1551,7 @@ mod tests {
         let task = create(
             &mut conn,
             CreateTask {
-                title: "Queued task",
+                title: "Ready task",
                 backlog_id: bl.id,
                 state: Some(State::Ready),
                 description: None,
@@ -1628,7 +1628,7 @@ mod tests {
         let mut conn = pool.acquire().await.unwrap();
         let bl = backlog::create(&mut conn, "Test").await.unwrap();
 
-        // Create three queued tasks
+        // Create three ready tasks
         let t1 = create(
             &mut conn,
             CreateTask {
diff --git a/tests/cli.rs b/tests/cli.rs
index 6717270..8a2395f 100644
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -35,7 +35,7 @@ fn full_workflow() {
 
     // Create tasks (using RANGER_DEFAULT_BACKLOG)
     let output = ranger(db_path)
-        .args(["task", "create", "First task", "--state", "queued"])
+        .args(["task", "create", "First task", "--state", "ready"])
         .output()
         .unwrap();
     assert!(output.status.success());
@@ -95,33 +95,33 @@ fn full_workflow() {
     let detail: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
     assert_eq!(detail["task"]["title"], "Second task");
 
-    // Create two queued tasks and use edit --before to reposition within the same state
+    // Create two ready tasks and use edit --before to reposition within the same state
     let output = ranger(db_path)
-        .args(["task", "create", "Third task", "--state", "queued"])
+        .args(["task", "create", "Third task", "--state", "ready"])
         .output()
         .unwrap();
     assert!(output.status.success());
 
     let output = ranger(db_path)
-        .args(["task", "create", "Fourth task", "--state", "queued"])
+        .args(["task", "create", "Fourth task", "--state", "ready"])
         .output()
         .unwrap();
     assert!(output.status.success());
 
     let output = ranger(db_path)
-        .args(["task", "list", "--json", "--state", "queued"])
+        .args(["task", "list", "--json", "--state", "ready"])
         .output()
         .unwrap();
-    let queued_tasks: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
-    let queued_tasks = queued_tasks.as_array().unwrap();
-    let t3_key = queued_tasks
+    let ready_tasks: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
+    let ready_tasks = ready_tasks.as_array().unwrap();
+    let t3_key = ready_tasks
         .iter()
         .find(|t| t["title"] == "Third task")
         .unwrap()["key"]
         .as_str()
         .unwrap()
         .to_string();
-    let t4_key = queued_tasks
+    let t4_key = ready_tasks
         .iter()
         .find(|t| t["title"] == "Fourth task")
         .unwrap()["key"]
@@ -146,14 +146,14 @@ fn full_workflow() {
     let stdout = String::from_utf8(output.stdout).unwrap();
     assert!(stdout.contains("Fourth task (edited)"));
 
-    // Verify ordering within queued: Fourth should now be before Third
+    // Verify ordering within ready: Fourth should now be before Third
     let output = ranger(db_path)
-        .args(["task", "list", "--json", "--state", "queued"])
+        .args(["task", "list", "--json", "--state", "ready"])
         .output()
         .unwrap();
-    let queued_after: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
-    let queued_after = queued_after.as_array().unwrap();
-    let titles: Vec<&str> = queued_after
+    let ready_after: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
+    let ready_after = ready_after.as_array().unwrap();
+    let titles: Vec<&str> = ready_after
         .iter()
         .map(|t| t["title"].as_str().unwrap())
         .collect();