Session 2026-09-13: unify directions (canon+LLM-fallback, 966/1019), publisher dry_run fix, git repo, archive 8 changes, candidates-mail-ui WIP, docs

This commit is contained in:
kpa39l
2026-09-13 17:48:06 +00:00
parent c3f59f7b7a
commit 71fd48aa06
40 changed files with 305 additions and 7 deletions
@@ -0,0 +1,26 @@
## Why
Даты в веб-UI отображаются как ISO-строка из SQLite: `2026-08-15T15:53` (срез `[:16]`
в шаблонах `candidates.html`, `published.html`, `metrics.html`). Пользователь хочет
человекочитаемый формат: `20:00 15.08.2026` (время ЧЧ:ММ, дата ДД.ММ.ГГГГ).
Места:
- `web/templates/candidates.html:…` — `{{ (p.published_at or '')[:16] }}`
- `web/templates/published.html:10` — `{{ (p.published_at or '')[:16] }}`
- `web/templates/metrics.html:23` — `{{ (r.started_at or '')[:16] }}`
## What Changes
- Добавить Jinja2-фильтр `dt` (datetime): парсит ISO-строку `2026-08-15T15:53[:00]`,
выводит `20:00 15.08.2026`.
- Во всех трёх шаблонах заменить `{{ (x or '')[:16] }}` → `{{ x | dt }}`.
- Использовать `datetime.fromisoformat` + `strftime("%H:%M %d.%m.%Y")`.
- Если строка не парсится (None/мусор) — выводить пустую строку/прочерк (не падать).
## Impact
- Файлы: `web/app.py` (фильтр `dt`), шаблоны `candidates.html`, `published.html`,
`metrics.html` (замена вызовов).
- Новых зависимостей нет (stdlib `datetime`).
- Никакого JS: форматирование на сервере.
- Rollback: вернуть `[:16]` в трёх шаблонах, убрать фильтр.