teqo/src/components
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
..
campaign E9 /simplify: consolidate duplicated helpers, dead passthrough, comment drift 2026-07-25 02:24:18 -03:00
ui Add the tooling gate: knip, CI, zero-warning lint, as-never ban 2026-07-23 23:06:12 -03:00
CitySelect.tsx Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
EmailInput.tsx Improve Inputs 2026-03-20 12:36:16 -03:00
Footer.tsx Deliver Onda 0 MVP: provisional Consent, privacy policy, and /privacidade. 2026-07-19 03:38:21 -03:00
FormattedInput.tsx Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
FormCombobox.tsx Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
FormInput.tsx Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
MetaPixel.tsx Add the tooling gate: knip, CI, zero-warning lint, as-never ban 2026-07-23 23:06:12 -03:00
NameInput.tsx Improve NameInput 2026-03-20 15:44:11 -03:00
PetitionForm.tsx Add Meta Pixel tracking to public petition pages. 2026-07-21 10:51:47 -03:00
PetitionSuccessDialog.tsx feat: Add signature counter and display 2026-05-01 01:51:07 -03:00
PhoneInput.tsx Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
PostalCodeInput.tsx fix zip code input field 2026-05-01 00:22:18 -03:00
PostCard.tsx Ship /campanha nuclei MVP with RBAC, invites, and vote estimates. 2026-07-18 15:01:56 -03:00
RefreshRouteOnSave.tsx Break up the god modules into deep domain modules 2026-07-23 23:44:45 -03:00
SignatureCounter.tsx Fetch live count on mount to override stale initialCount 2026-05-01 10:21:55 -03:00
SiteHeader.tsx Add Post and Tag collections for news and publications 2026-07-15 19:12:11 -03:00
socialIcons.tsx Add ThankStep 2026-03-18 23:55:28 -03:00
socialLinks.tsx Add ThankStep 2026-03-18 23:55:28 -03:00
StateSelect.tsx Replace state/city selects with type-to-filter comboboxes 2026-07-15 14:41:58 -03:00
ThemeProvider.tsx Including page mandato-no-whatsapp 2026-03-14 18:07:40 -03:00
WhatsappForm.tsx Add the tooling gate: knip, CI, zero-warning lint, as-never ban 2026-07-23 23:06:12 -03:00