A file-based task manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

tsk reopen: flip done → open and push onto active queue

`tsk reopen -T tsk-N` (or `-r`) sets status=open on the task and
pushes its stable id to the top of the active queue. Idempotent on
already-open tasks (`save_task` is a no-op on an unchanged tree;
`queue::push_top` deduplicates).

Pushing duplicate content already triggered the same reopen path
(tsk-28); this gives the explicit by-id version the original task
asked for.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+22
+10
src/lib.rs
··· 97 97 #[command(flatten)] 98 98 task_id: TaskId, 99 99 }, 100 + /// Flip a `done` task back to `open` and push it onto the active queue. 101 + Reopen { 102 + #[command(flatten)] 103 + task_id: TaskId, 104 + }, 100 105 /// Swap the top two tasks. 101 106 Swap, 102 107 /// Rotate top 3: third → top. ··· 412 417 } => command_show(dir, task_id, show_attrs, raw), 413 418 Commands::Edit { task_id } => command_edit(dir, task_id), 414 419 Commands::Drop { task_id } => command_drop(dir, task_id), 420 + Commands::Reopen { task_id } => { 421 + let id = Workspace::from_path(dir)?.reopen(task_id.into())?; 422 + println!("Reopened {id}"); 423 + Ok(()) 424 + } 415 425 Commands::Swap => Workspace::from_path(dir)?.swap_top(), 416 426 Commands::Rot => Workspace::from_path(dir)?.rot(), 417 427 Commands::Tor => Workspace::from_path(dir)?.tor(),
+12
src/workspace.rs
··· 684 684 Ok((queues_pruned, prop_orphans, ghost_bindings, orphan_queue_entries)) 685 685 } 686 686 687 + /// Flip a task back to `status=open` and push it to the top of the 688 + /// active queue. Idempotent — already-open tasks are unchanged on 689 + /// disk; the queue push deduplicates on the existing entry. 690 + pub fn reopen(&self, identifier: TaskIdentifier) -> Result<Id> { 691 + let mut task = self.task(identifier)?; 692 + task.attributes 693 + .insert(STATUS_KEY.into(), vec![STATUS_OPEN.into()]); 694 + self.save_task(&task)?; 695 + queue::push_top(&self.repo()?, &self.queue(), task.stable, "reopen")?; 696 + Ok(task.id) 697 + } 698 + 687 699 /// Drop a task from the active queue and mark it `status=done`. The 688 700 /// namespace binding is kept so the task remains addressable by its 689 701 /// human id (and discoverable via `tsk prop find status done`); the