Commit graph

457 commits

Author SHA1 Message Date
Cursor Agent
34a1308f5d
OH14 — format 2026-08-02 03:49:00 +00:00
Cursor Agent
9b56b641a6
OH14 — remove OPS_HYBRID flag; sync always on for staff
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>
2026-08-02 03:47:04 +00:00
Francisco Solla
15949be761
Merge pull request #227 from fsolla/cursor/pool-i176-3ee4bb09-eb8c
OH13 — Writes CAS por domínio: leadership, stateDeputy, activity, demand
2026-08-02 00:41:48 -03:00
Francisco Ignácio Fontoura Solla
00420b580c docs: wont do WhatsApp interno (D3–D5) — keep wa.me only
Drop bridge/sidecar plans after product decision: linked-device risk (ToS + shared datacenter IP) is unacceptable; channel stays click-to-chat.
2026-08-02 00:30:48 -03:00
Cursor Agent
6f1c208ed3
refactor(oh13): simplify hybrid FormData helpers and drop unused CAS wrappers
Extract shared FormData builders for outbox/online dual path; remove
knip-flagged create*Cas and membership CasRecord re-exports.
2026-08-02 03:28:00 +00:00
Cursor Agent
e8f315d67b
OH13: CAS writes for leadership, demand, activity, stateDeputy
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>
2026-08-02 03:10:18 +00:00
Cursor Agent
c04c1a4c36
OH12: simplify Local lists — shared offline copy + boundary hook
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>
2026-08-02 02:47:53 +00:00
Cursor Agent
63cd15eef5
OH12: OpsListLocal read-only via registry + OfflineBoundary on lists
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>
2026-08-02 02:47:35 +00:00
Cursor Agent
e6071aed0a
format: e2e affected manifest 2026-08-02 02:32:53 +00:00
Cursor Agent
0630995bb2
OH11 — SW static cache-first, logout campaignOps wipe, offline e2e
- Service worker: cache-first for same-origin /_next/static/ (before RSC guard)
- Logout: clearCampaignOpsStorage (abort sync → outbox → persistence) then Cache API
- E2E: full offline journey in campaignOpsOffline (write→reload→online→sync)
- Docs: CHANGELOG + ops-hibrido spec; test:e2e:ops-hybrid script

Closes #173

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 02:31:58 +00:00
Cursor Agent
3e49841fd7
style: prettier B120 mobile filter files 2026-08-02 02:12:28 +00:00
Cursor Agent
f97618524b
fix(campanha): B120 simplify — option pick must not commit typeahead as q
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>
2026-08-02 02:12:28 +00:00
Cursor Agent
ad23e9f4c7
feat(campanha): B120 mobile município filter combobox + denser cards
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>
2026-08-02 02:12:18 +00:00
Cursor Agent
daeff53bf4
OH10: mirror CAS base, advisors conflict toast, pledgeId path
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>
2026-08-02 01:42:23 +00:00
Cursor Agent
a517638e3c
OH10: municipality staff writes CAS + offline outbox
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>
2026-08-02 01:33:58 +00:00
Francisco Solla
bb4741e4f5
Merge pull request #220 from fsolla/cursor/pool-i172-ccc192fe-16b0
OH9 — Detalhe de município dual-path (views + Local + OfflineBoundary)
2026-08-01 22:23:57 -03:00
Francisco Solla
f63cfca2a9
Merge pull request #217 from fsolla/cursor/pool-i204-97038873-d8d3
B117 — Busca geral — município mais próximo na 1ª sugestão (geo)
2026-08-01 22:11:17 -03:00
Cursor Agent
fb63c76363
OH9: resolve rebase conflicts with main (opsVotePledgeMirror + changelog)
Keep leadershipsCollection export; re-export votePledgesCollection from the
OH7 mirror module; preserve both OH9 and B114 changelog entries.
2026-08-02 01:10:15 +00:00
Cursor Agent
4e65559fdd
OH9: dual-path municipality detail (HeaderView + Local + OfflineBoundary)
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>
2026-08-02 01:10:00 +00:00
Francisco Solla
49d12b875f
Merge pull request #215 from fsolla/cursor/pool-i186-2686268e-55fa
OH4+ — Apontar benchmark-ops-snapshot a buildOpsSnapshot
2026-08-01 22:09:28 -03:00
Francisco Solla
a82f79228c
Merge pull request #202 from fsolla/cursor/pool-i195-7719dfbd-4474
B114 — Wizard — navegação robusta (Voltar header = Android back)
2026-08-01 22:03:51 -03:00
Cursor Agent
9c960a350e
OH4+ — apontar benchmark-ops-snapshot a buildOpsSnapshot (#186)
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>
2026-08-02 00:58:36 +00:00
Cursor Agent
8d83cd633b
docs: mark B117 plan in-prod
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:56:51 +00:00
Francisco Solla
dde938bbb1
Merge pull request #211 from fsolla/cursor/agent-pool-default-12-slots
Agent pool — default 12 concurrent cloud agent slots
2026-08-01 21:51:54 -03:00
Francisco Ignácio Fontoura Solla
b9b9b04961 Raise agent pool default concurrent slots from 5 to 12.
Aligns with Pro+ cloud agent capacity; start always writes POOL_MAX_SLOTS and hard cap moves to 16.
2026-08-01 21:50:28 -03:00
Francisco Ignácio Fontoura Solla
87a131960c Format B121 plan markdown with Prettier. 2026-08-01 21:49:41 -03:00
Francisco Ignácio Fontoura Solla
65ac260d28 Register plan for B121 (wizard leadership quick-edit status + declared votes). 2026-08-01 21:49:08 -03:00
Cursor Agent
ba157a1475
B114: format + map wizard back paths in e2e affected manifest
Prettier on plan/wizardBack; wake campaignWizardChrome for shell/history.
2026-08-02 00:46:45 +00:00
Cursor Agent
962d704a54
B114: unify wizard Voltar header with Android back
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>
2026-08-02 00:46:45 +00:00
Francisco Solla
891f654655
Merge pull request #208 from fsolla/cursor/plans-b116-b120-mobile-campanha
B116–B120 — planos mobile campanha (chrome, geo, densificar)
2026-08-01 21:38:48 -03:00
Francisco Ignácio Fontoura Solla
a42553a6a3 Planos B116–B120 — chrome mobile, geo na busca, densificar municípios
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.
2026-08-01 21:37:10 -03:00
Cursor Agent
c1666dd3e1
OH5: resolve changelog conflict markers after rebase 2026-08-02 00:22:34 +00:00
Cursor Agent
7d9ef93738
OH5: SyncProvider + OPFS→IDB mirror + poll + chrome
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>
2026-08-02 00:15:05 +00:00
Francisco Solla
2926b4a1ef
Merge pull request #199 from fsolla/cursor/pool-i162-f7cd7874-0af3
CL8 — Contrato, saved filters, cleanup e redirect canónico (#162)
2026-08-01 21:12:56 -03:00
Francisco Solla
f4823c1436
Merge pull request #197 from fsolla/cursor/pool-i193-276cd535-d0f3
B112 — Bottom drawer — colapso (blur vazio / nav / handle), swipe ↓ e padding ⅓
2026-08-01 21:10:26 -03:00
Francisco Ignácio Fontoura Solla
a59d98907e Format B115 plan markdown with Prettier. 2026-08-01 21:05:45 -03:00
Francisco Ignácio Fontoura Solla
1e81ad3eed Register plan for B115 (Início strip edge-to-edge, no side gutter). 2026-08-01 21:05:08 -03:00
Cursor Agent
c1c615a5ee
style: prettier (CL8) 2026-08-01 23:57:43 +00:00
Cursor Agent
93912a1304
CL8 — contrato registry, redirect canónico e cleanup (#162)
- Pin slug↔rota: tests/unit/opsListRegistryRoutes.unit.spec.ts (8 slugs v1)
- resolveDemandListUrl + resolveOrganizationListUrl; pages redirect; registry
  canonicalRedirect: true para demandas/organizacoes
- E2E tracer saved filters com LIST_UNIFIED=1; flag em next/playwright env
- Docs: CHANGELOG, lista-unificada spec, plano CL8 entregue

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 23:56:59 +00:00
Cursor Agent
4170bb640a
docs(B112): mark plan implemented
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 23:54:59 +00:00
Francisco Solla
abe0d106b1
Merge pull request #191 from fsolla/cursor/pool-i161-a9c58ad5-f5de
CL7 — Migrar apoiadores e organizações para a factory
2026-08-01 20:52:40 -03:00
Francisco Ignácio Fontoura Solla
aaabd5e608 Format B112–B114 plan markdown with Prettier. 2026-08-01 20:48:23 -03:00
Francisco Ignácio Fontoura Solla
39e3ae163f Register plans for B112–B114 (drawer collapse, wizard thumb UI, wizard back). 2026-08-01 20:47:49 -03:00
Cursor Agent
a1f2a03527
fix(OH4): keep changelog entries after rebase onto main 2026-08-01 23:36:57 +00:00
Cursor Agent
53e5f32f03
fix(OH4): remove leftover rebase conflict markers in changelog
Prettier/CI format failed because CHANGELOG still had <<<<<<< markers
after the main rebase.
2026-08-01 23:36:57 +00:00
Cursor Agent
59907172f7
refactor(OH4): parallel snapshot queries + simplify reuse
Promise.all for collection finds; reuse requireRelationshipId /
populatedContactName / campaignAccess; truncate in lib; auth message
canonical. Register OH4+ (#186) for benchmark→builder DRY.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 23:36:57 +00:00
Cursor Agent
eb4ed64377
feat(OH4): GET /campanha/api/ops-sync full snapshot + scoped access
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>
2026-08-01 23:36:57 +00:00
Francisco Solla
f9128f92b8
Merge pull request #189 from fsolla/cursor/pool-i159-da713125-4207
CL6 — Territórios: paginação real + sort server, depois factory
2026-08-01 20:35:58 -03:00
Francisco Solla
2137d09fb5
Merge pull request #192 from fsolla/cursor/pool-i170-0a4ea112-aa41
OH8 — Caracterização das rotas piloto (detalhe município + listas-chave)
2026-08-01 20:26:50 -03:00
Cursor Agent
68a152978c
fix: drop leftover changelog conflict markers after CL5 rebase 2026-08-01 23:22:53 +00:00