fix: keep merged and resolved threads out of the draft queue (#33)
build / image (push) Successful in 36s
build / test (push) Successful in 3m21s

The draft predicate only looked at the auto_thread marker, so a cluster
merged into another (resolved, zero observations left) stayed on the list
forever and the queue could never drain: 6 of 13 candidates on this index
were merged or resolved.

IsDraft now owns the predicate for both surfaces: auto-threaded, not
resolved, and still holding at least one observation.
This commit is contained in:
2026-11-04 20:37:53 -08:00
parent 45f966d44f
commit 4658bdfc83
4 changed files with 38 additions and 9 deletions
+1 -8
View File
@@ -390,7 +390,7 @@ a better title and motivation. Apply changes with ` + "`knox thread update <id>`
}
var shown int
for _, t := range threads {
if !isAutoThreaded(t) {
if !t.IsDraft() {
continue
}
obs, _ := kdb.ThreadObservations(t.ID)
@@ -419,13 +419,6 @@ a better title and motivation. Apply changes with ` + "`knox thread update <id>`
}
}
func isAutoThreaded(t db.Thread) bool {
if strings.Contains(t.Provenance, "auto_thread") {
return true
}
return strings.HasPrefix(t.Motivation, "Auto-detected")
}
func newThreadUpdateCmd(kdb *db.KnoxDB) *cobra.Command {
var title, motivation, priority, tags string
cmd := &cobra.Command{