feat: review queue polish (pace, sort, type filter), drop unused phase-detection UI
Review Queue: show pace alongside distance/duration/HR, sort by activity date (most recent first) instead of classification timestamp, and add a filter by workout kind with a special "Unsorted" option for runs where the rule engine found zero candidates at all (distinct from ambiguous multi-candidate runs). Profile: remove the phase-detection warm-up/cool-down section from the UI -- not used by anything yet (phase segmentation is future work) and was adding noise. The underlying fields are untouched so no data is lost and the settings screen still round-trips them on save.
This commit is contained in:
@@ -3,6 +3,7 @@ package api
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
@@ -33,6 +34,13 @@ func (s *Server) handleReviewQueue(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
items = append(items, item{KindAssignment: a, Activity: activity})
|
||||
}
|
||||
|
||||
// Most recent run first, by when the activity actually happened (not
|
||||
// when the rule engine flagged it), so the queue reads like a log.
|
||||
sort.Slice(items, func(i, j int) bool {
|
||||
return items[i].Activity.StartTimeUTC > items[j].Activity.StartTimeUTC
|
||||
})
|
||||
|
||||
writeJSON(w, http.StatusOK, items)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user