Commit 4ee1fa4
feat: task queue fixes - stale recovery, smart defaults, search (#477)
* feat: task queue fixes - stale recovery, smart defaults, search, purge
- On startup, mark all orphaned 'working' tasks as 'failed' (crash recovery)
- Default `visor tasks` shows only active tasks, use --all for history
- Add --search <text> to filter tasks by input message
- Add --instance <id> to filter by visor instance
- Add `visor tasks purge --age 7d` to clean old terminal tasks
- Add failStaleTasks() and purgeOldTasks() to TaskStore interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: escape SQL LIKE wildcards and add test coverage for task queue
Prevents SQL wildcard injection in search filter by escaping %, _, \
characters. Changes purgeOldTasks boundary from < to <= for consistency.
Adds 10 new tests covering failStaleTasks, purgeOldTasks, search,
claimedBy filter, and claimTask.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use cli-table3 for tasks output, fix cancel prefix matching, fix markdown in code blocks
- Replace manual table formatting with cli-table3 for consistent styled output
in tasks list, show, and stats subcommands
- Add colored state indicators (yellow=working, green=completed, red=failed)
- Fix cancel command not finding tasks by prefix (was requiring full UUID)
- Extract shared findTaskByPrefix helper used by both cancel and show
- Fix markdownToSlack converting bold/links inside fenced code blocks
by moving all transformations into the line-by-line code block tracker
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 12d9273 commit 4ee1fa4
7 files changed
Lines changed: 528 additions & 86 deletions
File tree
- src
- agent-protocol
- slack
- tests/unit
- agent-protocol
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
163 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
323 | 339 | | |
324 | 340 | | |
325 | 341 | | |
| |||
532 | 548 | | |
533 | 549 | | |
534 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
535 | 583 | | |
536 | 584 | | |
537 | 585 | | |
| |||
0 commit comments