Bug
When an issue is rejected via td reject <id> --reason "...", the sidecar td-monitor plugin does not display it as "needs rework".
Root Cause
td reject sets the issue status back to open. However, the sidecar's GetRejectedInProgressIssueIDs() (in internal/db/activity.go) only looks for issues with in_progress status that have a recent ActionReject. Since the status is open, the query never matches.
Meanwhile, the CLI td query 'rework()' function (in internal/query/execute.go) correctly finds these issues — so there's a discrepancy between what the CLI reports and what the sidecar displays.
Reproduction
# Implement and submit for review
td start <id>
td handoff <id> -m "done"
td review <id>
# Different session: reject
td reject <id> --reason "bug found"
# CLI finds it correctly:
td query 'rework()' # ✅ shows the issue
# Sidecar td-monitor: ❌ does not show "needs rework"
Expected Behavior
Rejected issues should appear as "needs rework" in the sidecar td-monitor, matching what td query 'rework()' returns.
Suggested Fix
Either:
GetRejectedInProgressIssueIDs() should also match open status (or any non-closed status) with a recent unreviewed rejection
td reject should set status to in_progress instead of open
- The sidecar should use the same
rework() query path as the CLI
Environment
- td v0.42.0
- sidecar v0.78.0
Bug
When an issue is rejected via
td reject <id> --reason "...", the sidecar td-monitor plugin does not display it as "needs rework".Root Cause
td rejectsets the issue status back toopen. However, the sidecar'sGetRejectedInProgressIssueIDs()(ininternal/db/activity.go) only looks for issues within_progressstatus that have a recentActionReject. Since the status isopen, the query never matches.Meanwhile, the CLI
td query 'rework()'function (ininternal/query/execute.go) correctly finds these issues — so there's a discrepancy between what the CLI reports and what the sidecar displays.Reproduction
Expected Behavior
Rejected issues should appear as "needs rework" in the sidecar td-monitor, matching what
td query 'rework()'returns.Suggested Fix
Either:
GetRejectedInProgressIssueIDs()should also matchopenstatus (or any non-closed status) with a recent unreviewed rejectiontd rejectshould set status toin_progressinstead ofopenrework()query path as the CLIEnvironment