- Estende WizardLeadershipTileViewModel com declaredVotes
- Batch load de votePledge no loadWizardLeadershipTiles
- Drawers de status (auto-save) e votos (Salvar) no grid B70
- declareVotesWizardFormAction com revalidate do wizard
- Unit tests do mapeamento pledge→tile
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Extract presentational header shared by RSC and offline Local; OfflineBoundary
swaps to mirror-backed Local only when OPS_HYBRID is on and the browser is
offline (sync failure stays on RSC + chrome). Closes#172.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- loadHomeSearchSuggestions returns scopeMunicipalities for client merge
- useHomeSearchNearestMunicipality prompts once per session (B14 key)
- mergeHomeSearchNearestMunicipality prefixes hit without geo copy
- HomeSearchMunicipalityGroup wires suggest reorder for Início + drawer
Closes#204
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- CampaignMobileTopBar: bloco Jorge Solla / Campanha·Bahia vira Link para /campanha
- CampaignContentScroll: pb-2 no Início mobile (metade do p-4) quando sem quick-actions peek
- Testes unitários para link e padding compacto
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Remove single-use signal-body helper; drop unused programmatic URL-back
flag; keep history marks and layer pop path.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Shared wizardBack contract + history layer (B106 pattern) so header
Voltar and popstate resolve the same navigate/pop-layer target.
Canonical previousHrefs; leadership form is a client history layer.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- HybridPledgeEstimateForm lê valores de votePledgesCollection (não props RSC)
- Outbox faz patch optimista no mirror e aplica write do servidor com estimatedAt
- Helpers read/subscribe/patch no opsMirrorClient + mapper mapVotePledgeWriteToOps
- Testes unitários para merge protegido, patch optimista e mapper de write
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
O footer portaled do CampaignListSheetProvider ficava fora da árvore React
do Drawer; DrawerCloseButton exigia useDialogRootContext e derrubava a página.
Substitui Cancelar por Button + onOpenChange(false) nos footers de nível e
sinal. Pin: unit com provider compartilhado + e2e mobile.
Closes#206
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Bootstrap the campaign ops mirror behind OPS_HYBRID for staff: hydrate
TanStack localOnly collections from OPFS file (IDB fallback), GET
/campanha/api/ops-sync with mergeOpsSnapshot (outbox-aware), poll every
3 min in foreground, and show discreet sync chrome in the shell.
Leaders stay no-op even when the flag is on.
Closes#168
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Simplify follow-up from parallel review: knip-facing dead export and
shared gap/pb classes on the quick-actions context stack.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- Empty blur → collapsed; blur with text stays FULL (drawer whenEmpty policy).
- Handle tap and snap→collapsed clear search so uiFocused cannot reopen FULL.
- Keep all snap points while focused so swipe ↓ can dismiss.
- Pathname change (in-chrome) clears + collapses; initial load stays dock.
- Compact dock/search stack gap (~⅓) without cutting safe-area.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Wire LIST_UNIFIED flag on /campanha/apoiadores and /campanha/organizacoes
behind OpsListPage with full slot parity (KPI overview, filters, table,
footer). Registry entries were already present from CL2; this completes
the route delegation. Pins CL7 routes in opsListPage.unit.spec.ts.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Add page to the territories URL contract, apply filter/sort/slice in the
loader (page size 25), flip registry sortModel to url, and render
/campanha/territorios through OpsListPage when LIST_UNIFIED is on.
Closes#159
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Rewrite AdvisorsTable on CampaignTable with column picker, add
resolveAdvisorListUrl (preserves criar=1), register assessores in
CAMPAIGN_LIST_IDS/opsListRegistry, and wire LIST_UNIFIED factory shell.
Closes#160
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Wire @tanstack/offline-transactions for estimateVotesCas when OPS_HYBRID
is on: IndexedDB outbox, pending/conflict badges, Sonner keep/discard
resolution; legacy formAction path unchanged when the flag is off.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Add CAS opt-in on vote pledge estimates: without baseEstimatedAt keep
last-write-wins; with a stale base refuse the write and stamp the
server estimatedAt for the outbox conflict toast.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Delega as três rotas à factory unificada atrás de LIST_UNIFIED,
seguindo o padrão CL3 de municípios: slots extraídos (toolbar, overview,
table, footer) com paridade total quando a flag está OFF.
- lideranças/dobradinhas: sort summary no slot overview, sheet provider na tabela
- demandas: chips de status no toolbar, sem redirect canónico (sort fixed)
- testes unitários estendidos em opsListPage.unit.spec.ts
Closes#158
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Wrap the estimate-scenario provider outside both flag paths, type empty
as nullable, and drop the duplicated fail-closed unit assertion.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Introduce the unified list shell (OpsListView slots + OpsListPage
server casca) and wire /campanha/municipios behind LIST_UNIFIED with
flag-OFF parity and shared domain pieces as slots.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Introduce client-safe metadata registry for the eight v1 campaign list
domains (municipios through organizacoes) per lista-unificada spec CL1.
Add resolveListUnifiedEnabled for the LIST_UNIFIED env flag. Unit tests
pin slug order, route paths, columnListId allowlist, and flag behavior.
Closes#156
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- DTOs client-safe em src/lib/campaignOps/opsContract.ts
- mergeOpsSnapshot/diffOpsIds com proteção de outbox
- resolveOpsHybridEnabled + OPS_MIRROR_SCHEMA_VERSION
- Pins unit em tests/unit/campaignOps.unit.spec.ts
Closes#163
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>