fix(webui): timeline opens on full landscape, drop undated points
Some checks failed
CI / test (3.11) (push) Failing after 9s
CI / test (3.12) (push) Failing after 9s

After the chronological-order fix the page opened on the earliest month
(1995-12), showing only a handful of same-colored dots while the legend
listed every category — looked broken.

- Initialise the plot on the LAST frame (full landscape); Play now replays
  the build-up from the start (fromcurrent: false), slider starts at the end.
- Make _extract_month robust: year-only / junk dates (ISO/ETSI 'time' like
  '2015/CD Amd 2', bare '2023', '') no longer yield malformed month labels
  ('2015-/C') or a garbled 'unknown' frame badge.
- Drop undated docs from the temporal animation (they remain on /landscape).

At the full initial frame every category has points, so the legend matches
what is drawn.
This commit is contained in:
2026-05-23 11:52:13 +02:00
parent c3af38e0f9
commit d11e980a6a
3 changed files with 21 additions and 13 deletions

View File

@@ -546,6 +546,8 @@ def _compute_timeline_animation_data(db: Database) -> dict:
r = rating_map[name]
d = draft_map.get(name)
month = _extract_month(d.time if d else None)
if month == "unknown":
continue # Undated docs (e.g. ISO/ETSI) can't be placed on a temporal animation
cat = r.categories[0] if r.categories else "Other"
month_set.add(month)
category_monthly[month][cat] += 1