teqo/src
Francisco Ignácio Fontoura Solla 31fcc20ffd E9 /simplify: consolidate duplicated helpers, dead passthrough, comment drift
Cross-checked by parallel code-quality/performance/reuse reviewers against
the E9 commit. Behavior-preserving:

- laterTimestamp/resolveMunicipalityLastSignalAt were the same "latest of
  two ISO timestamps" written twice; both now delegate to a new
  latestIsoTimestamp in campaignTime.ts, which documents the fixed-width
  UTC invariant that makes the string compare sound.
- Hoisted the frescor comparator's Date.now() out of the per-comparison
  accessor so the sort key stops drifting mid-sort.
- Deleted the unread baseTotal/growthFactor/belowBase passthrough from the
  statewide goal entry point and fixed a comment citing a symbol
  (goalDecompositionBelowBase) that never existed; renamed
  computeStatewideGoalDecomposition -> computeStatewideSuggestedGoals now
  that nothing is proportionally decomposed.
- Collapsed the advisor badge's two copies (desktop table vs mobile card)
  into one AdvisorStatusBadge; they had quietly diverged on which icon
  renders for the "no advisor" state.
- Renamed the sort-menu's stale "Cobertura" label for advisor coverage to
  "Assessoria" (E8 already renamed the list column for the same reason);
  derived the sort-key set from the label record instead of a third
  parallel list.
- Consolidated three zeroed-scenario-record literals into one
  zeroByVoteEstimateScenario() factory in voteEstimate.ts.
- Routed three separate votesByYear[2022] reads through one votesInYear
  helper in municipalityPotential.ts.
- Gated the goal card's empty-state copy on !usesMesaEstimate so it stops
  telling a município with an existing mesa estimate to enter one.
- Swapped a test assertion pinned to a raw Tailwind token for a stable
  data-signal="cold" hook, and tightened the "desert" test's bound to
  check against the actual growth factor (the old bound was true for
  every slug regardless of the formula).

Left alone (roadmap decision, not cleanup): sanityCheckSuggestedGoalsByTerritory
has no production caller yet (deferred to E11/E12); comment shortened
instead of deleting the dead-but-documented code.

Verified: tsc --noEmit, pnpm lint (0 warnings), 337 unit + 366 integration
tests, pnpm build all green.
2026-07-25 02:24:18 -03:00
..
app E9 /simplify: consolidate duplicated helpers, dead passthrough, comment drift 2026-07-25 02:24:18 -03:00
collections E16: Dossiê do município (pré-agenda) with print view and budgetNotes. 2026-07-25 01:28:03 -03:00
components E9 /simplify: consolidate duplicated helpers, dead passthrough, comment drift 2026-07-25 02:24:18 -03:00
globals E9: Fila de alocação (déficit como default do staff, frescor, coluna da vergonha) 2026-07-25 02:24:17 -03:00
hooks Add campaign app shell with a light shadcn sidebar. 2026-07-15 23:17:51 -03:00
lib E18: documentação de conceitos de inteligência de campanha 2026-07-25 01:37:37 -03:00
migrations E16: Dossiê do município (pré-agenda) with print view and budgetNotes. 2026-07-25 01:28:03 -03:00
utilities E9 /simplify: consolidate duplicated helpers, dead passthrough, comment drift 2026-07-25 02:24:18 -03:00
css-modules.d.ts Adopt TypeScript 6 for tooling and TypeScript 7 for typecheck. 2026-07-21 20:32:15 -03:00
payload-types.ts E9: Fila de alocação (déficit como default do staff, frescor, coluna da vergonha) 2026-07-25 02:24:17 -03:00
payload.config.ts E8: Conta da cadeira (metas derivadas, potencial por município, cobertura) 2026-07-24 22:54:27 -03:00