Decision: remove compile-time OPS_HYBRID after OH11/OH13 green in CI/staging.
Staff hybrid sync is gated only by isStaffCampaignRole in the app layout;
OfflineBoundary swaps to Local when the browser is offline.
- Delete opsHybridFlag.ts and legacy formAction branches in staff controls
- E2e offline specs run in CI without OPS_HYBRID env
- Update ops-hibrido spec to implementado + offline write recipe
Closes#175
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Add baseUpdatedAt CAS on domain staff writes, assertCampaignDocCas helper,
opsDomainOutbox with hybrid forms (Manter/Usar), and int/unit pins.
Closes#176.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Reuse opsListLocalCopy for saved-filter gates, drive OfflineBoundary from
useBrowserOffline, drop dead registry null-check and unused exports, and
tighten municipality Local sorting/casts.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Wire OfflineBoundary + OpsListLocal on the eight ops list routes. Local
reads the ops mirror with subscribeChanges, applies canonical URL parsers
for filter/sort/page, and keeps KPIs/edit/saved-filter writes honest
offline. Extract demand/organization list URL modules for client use.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Keep only committed URL q on filter picks, exhaust multi-param mapping,
and document the municípios secondary-nav contract in unit tests.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Replace the stacked NativeSelect mobile filters with a GitHub-style
combobox (chips + typeahead) over the frozen B18 URL contract, hide the
overview strip and sort notice below md, and densify mobile list cards.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Prefer municipalitiesCollection updatedAt for list/update outbox CAS,
restore advisors conflict Manter/Usar toast, and pass pledgeId for O(1)
declareVotes mirror/outbox keys. Drop unused membership Cas export and
expectedVotes baseUpdatedAt.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
Add baseUpdatedAt CAS for declareVotes, municipalityUpdate, political
trend, engagement level, and advisors. Sibling outbox executor wires
hybrid controls when OPS_HYBRID is on; flag OFF keeps legacy paths.
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>
Refatora scripts/benchmark-ops-snapshot.mjs para consumir o builder
canônico buildOpsSnapshot, eliminando ~200 linhas de mappers/selects
duplicados que podiam divergir do endpoint GET /campanha/api/ops-sync.
Adiciona callback opcional onSectionLoaded em buildOpsSnapshot para
relatório por-collection (rows, queryMs, truncamento) sem overhead em
produção quando o callback não é passado.
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>
Lote de planos pós gate: gap/header Início, nearest como hit normal na busca,
listas sem título mobile, crash do Nível (P0), combobox de filtros + card.
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>
Add buildOpsSnapshot (server-only) with overrideAccess:false queries,
municipality_update truncation (OH3 N=50), and int pins for
401/403/200 + advisor portfolio + truncation.
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>