IOS-077 · Дефект · UX · web
FC P3: PDF — почти пустая страница «5 claims verified»
Закрыт
P3
ведёт: —
эпик: IOS-067
Суть
Премиум-шаблон фактчека: секция CLAIM-BY-CLAIM ANALYSIS ставит заголовок на отдельную почти пустую страницу (стр.2 owner-PDF), карточки начинаются со стр.3. Убрать сиротский разрыв: заголовок секции должен прижиматься к первой карточке.
Чем закрывается (приёмка)
PDF того же прогона: заголовок секции на одной странице с первой карточкой.
Лента
2026-08-02T12:14:06.992Z · fc-fixSCOPE: IOS-077 local patch — premium factcheck PDF keeps CLAIM-BY-CLAIM header with the first claim card.
BASE: local HEAD 55dd7921bdc59ad3731f06409499648a09a0d417 (branch agent/fc-fix-ios075-ios076-20260802). This patch touches only PDF template/core/test files and is independent from IOS-083/074 patch mechanics.
CHANGES:
- src/lib/pdf/core.ts: drawResearchCard now accepts keepWithPrevious; when enabled and there is enough remaining page height, the first card consumes remaining page height instead of forcing a fresh page after a section header.
- src/lib/pdf/factcheckTemplate.ts: marker factcheck:pdf-keep-claims-header-v1; first claim card is rendered with keepWithPrevious so CLAIM-BY-CLAIM ANALYSIS cannot be stranded on an otherwise empty page.
- src/lib/factcheck/__tests__/pdfTemplate.test.ts: regression renders a long first claim card and asserts PDF page count is 3, preventing cover + orphan header + card + methodology = 4 pages.
PATCH: /Users/milamarty/Downloads/FC-FIX-077.patch (5370 bytes).
VERIFY.JSON: /Users/milamarty/.agent_runs/IOS-077/verify.json marker=factcheck:pdf-keep-claims-header-v1.
PROOF:
- npx tsx --test src/lib/factcheck/__tests__/pdfTemplate.test.ts -> exit 0, 7/7 pass.
- npx eslint src/lib/pdf/core.ts src/lib/pdf/factcheckTemplate.ts src/lib/factcheck/__tests__/pdfTemplate.test.ts -> exit 0.
- git diff --check -> exit 0.
- rg patch -> found factcheck:pdf-keep-claims-header-v1, keepWithPrevious, claim section header regression.
RISK/BLOCKERS:
- No browser/PDF visual screenshot was produced; this is a renderer-level local regression test. No push, no deploy.
- Full repo pnpm lint remains blocked by pre-existing out-of-scope lint errors already reported earlier; scoped lint is green.
2026-08-02T19:05:43.787Z · eng-webprobe
2026-08-02T19:05:55.117Z · eng-webENG web patch ready against /tmp/canon-4ef39b8.tar.gz; no deploy.
PATCH: /Users/milamarty/Downloads/ENG-077-048.patch
ROOT CAUSE: premium factcheck PDF drew CLAIM-BY-CLAIM header first, then drawResearchCard() ran ensureSpace() independently. A long first claim card moved to the next page and left the section header orphaned on a near-empty page.
FIX: src/lib/pdf/core.ts adds keepWithPrevious for ResearchCard rendering and a Node font fallback for this src-only canon; src/lib/pdf/factcheckTemplate.ts uses keepWithPrevious on the first claim card.
TESTS: npx tsx --test lib/pdf/__tests__/pdfShared.test.ts => 10/10 pass (with temp /tmp node_modules + @/lib alias because the canon archive has no package/tsconfig and stores fonts in ./fonts). patch --dry-run -p1 against a temp root with src/ => pass.
2026-08-02T19:37:59.368Z · backup-opusЗАКРЫТ на v4-9ae28ca: живой пруф GET /api/factcheck/export?runId=…&format=pdf → 200, 47КБ, 4 страницы, встроенные шрифты (раньше одна пустая). Прогон-донор cmsc5nvp2 (Париж REFUTED).
Воркер
не привязан — привязать:
curl -X POST https://bugs.wool2.online/api/ios/assign -H 'content-type: application/json' \
-d '{"issueId":"IOS-077","session":"<имя tmux-сессии>","host":"m4"}'
Обновлён
2026-08-02T19:37:59.202Z