- 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>
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>
Propagate return path from quick actions through the B98 wizard chain so
dismiss, skip, and chain end navigate back to the originating page instead
of always redirecting to Início.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- Add QUICK_ACTIONS_SNAP_FULL; drawer expands on search focus and hides action strip
- Tighten dock bottom gap; restore dock/collapsed on blur per scroll position (B100)
- Widen CampaignHomeActionButton to w-[5.5rem] for two-line labels
- Client-side filter excludes current page entity from drawer search hits
- Unit + e2e coverage for full snap, exclusion, and label readability
- Allow horizontal bleed on home-actions retraction shell (overflow-y-hidden
instead of overflow-hidden) so -mx-4 is not clipped by the chrome wrapper.
- Hide HomeSummaryDelta chip and period caption when delta is 0 or null;
add shouldShowHomeSummaryDelta helper and unit pins.
Closes#150
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- CampaignWizardShell: contentFocus prop skips title focus on form steps
- Wizard steps with inputs: contentFocus=none + autoFocus on first field
- VoteEstimateScenarioInputs compact: highlight follows activeScenario
- Municipality list compact overlay tracks focused scenario for highlight
- Unit tests for shell focus mode, compact classes, and votes step
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Revert handle to the top of the sheet; recalibrate collapsed/dock snaps
for handle+search and 2-line action labels; scroll ↓ collapses and ↑
re-docks; collapsed keeps a placeholder-less search peek that expands
on focus.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Remove the municipality step h1 via optional stepTitle on CampaignWizardShell.
Keep search input sticky under the wizard header, show hit-row skeletons
while suggest/search loads, and tighten mobile top padding when titleless.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
- CampaignHomeSearchChromeContext + publisher no Início
- CampaignMobileTopBar troca SidebarTrigger por Voltar quando uiFocused
- useHomeSearchFocusHistory com pushState/popstate para back do SO
- HomeSearchSuggestSkeleton enquanto isFetching sem hits
- Unit tests para history helper, top bar e skeleton
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>