feat(documents): timeline date-range filter with density bars (#385) #478

Merged
marcel merged 52 commits from feat/issue-385-timeline-density-filter into main 2026-05-08 12:27:17 +02:00
Showing only changes of commit 47841b9110 - Show all commits

View File

@@ -48,6 +48,7 @@ import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.LocalDate;
import java.time.YearMonth;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -171,8 +172,7 @@ public class DocumentService {
Map<String, Integer> counts = new java.util.TreeMap<>();
for (LocalDate d : dates) {
String month = String.format("%04d-%02d", d.getYear(), d.getMonthValue());
counts.merge(month, 1, Integer::sum);
counts.merge(YearMonth.from(d).toString(), 1, Integer::sum);
}
List<MonthBucket> buckets = counts.entrySet().stream()
.map(e -> new MonthBucket(e.getKey(), e.getValue()))