mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-12 22:13:05 +00:00
fix(C163): página 1 cabe com muitos indícios de emenda (Closes #1130)
This commit is contained in:
parent
10b58afe4c
commit
2364b3e2d9
3 changed files with 9 additions and 4 deletions
|
|
@ -0,0 +1 @@
|
|||
**C163 — página 1 do relatório de cidade volta a caber com muitos indícios de emenda (2026-09-17):** o `indicatorList` novo da página 1 (entregue em 2026-09-16) tinha teto de 4 linhas e, numa cidade-polo com muitos indícios atribuídos, empurrava o resumo para além do útil — em Vitória da Conquista (8 indícios) o builder abortou com `A página 1 estourou (1033px > 1001px úteis)` e o par PDF+MD não foi gerado. O bloco media 199px (4 linhas de 34px + título + nota), ~32px acima do que a página comportava. Correção pelo teto de conteúdo, nunca pelo layout: `PAGE_ONE_INDICATOR_LIMIT` 4 → 3 (`scripts/lib/cityReportBlocks.mjs`), mantendo `e mais N` explícito (Vitória passa a mostrar 3 linhas e "e mais 5 indício(s)") e o texto integral de cada indício no aprofundamento — a página fecha em 999px, sob o orçamento de 1001px. Atualiza a asserção correspondente em `tests/unit/cityReportBlocks.unit.spec.ts` (22 testes do arquivo verdes). Sem schema, sem migration e sem mudança de URL pública — scripts de relatório + teste apenas; PDFs/MDs seguem gitignored e foram regenerados. Issue: #1130.
|
||||
|
|
@ -69,8 +69,12 @@ const PAGE_ONE_RISK_MAX = 70
|
|||
const PAGE_ONE_LIST_LIMIT = 2
|
||||
/** Joined name lists (Responsável, Dobradinhas) — one line in the strip/stat row. */
|
||||
const PAGE_ONE_NAMES_MAX = 20
|
||||
/** Page-1 emenda indications: the author/what/esfera rows shown before "e mais N". */
|
||||
const PAGE_ONE_INDICATOR_LIMIT = 4
|
||||
/**
|
||||
* Page-1 emenda indications: the author/what/esfera rows shown before "e mais N".
|
||||
* Three rows (not four): a city-polo with many attributed indications overflowed
|
||||
* the one-page guard, and the full list lives in the deep dive anyway.
|
||||
*/
|
||||
const PAGE_ONE_INDICATOR_LIMIT = 3
|
||||
/** One indication per line on page 1 — the full purpose text stays in the deep dive. */
|
||||
const PAGE_ONE_INDICATOR_DETAIL_MAX = 70
|
||||
|
||||
|
|
|
|||
|
|
@ -731,8 +731,8 @@ describe('buildCityReport', () => {
|
|||
}),
|
||||
)
|
||||
const evidence = capped.page1.blocks.find((block) => block.kind === 'indicatorList')!
|
||||
expect(evidence.items).toHaveLength(4)
|
||||
expect(evidence.remaining).toBe(2)
|
||||
expect(evidence.items).toHaveLength(3)
|
||||
expect(evidence.remaining).toBe(3)
|
||||
})
|
||||
|
||||
it('puts research answers in Quem é quem with compact sources and URLs in the sources section', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue