diff --git a/pkg/hold/pds/xrpc.go b/pkg/hold/pds/xrpc.go index 2834bab..3f8da11 100644 --- a/pkg/hold/pds/xrpc.go +++ b/pkg/hold/pds/xrpc.go @@ -607,9 +607,9 @@ func (h *XRPCHandler) HandleListRecords(w http.ResponseWriter, r *http.Request) } } - // Handle reverse order if requested - if reverse && len(records) > 0 { - // Reverse the slice + // Default order is newest-first (reverse chronological), which requires + // reversing the MST's lexicographic order. When reverse=true, keep MST order. + if !reverse && len(records) > 0 { for i, j := 0, len(records)-1; i < j; i, j = i+1, j-1 { records[i], records[j] = records[j], records[i] }