Commit graph

384 commits

Author SHA1 Message Date
Cursor Agent
3e49841fd7
style: prettier B120 mobile filter files 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
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
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
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
f49e8e3c55
CL7 — Migrar apoiadores e organizações para OpsListPage
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>
2026-08-01 23:22:38 +00:00
Cursor Agent
a91019f427
CL6: real territory list pagination + OpsListPage flag
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>
2026-08-01 23:22:29 +00:00
Cursor Agent
0c9f35b67a
docs: marca plano OH8 como entregue
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 23:15:05 +00:00
Cursor Agent
26d09ccfdf
CL5: format lista-unificada spec after SSOT row update 2026-08-01 23:07:00 +00:00
Cursor Agent
76d6129e1e
CL5: Assessores CampaignTable + URL canónico + OpsListPage
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>
2026-08-01 23:07:00 +00:00
Cursor Agent
5f0943bff3
refactor(OH6): reuse OH2 resolveOpsHybridEnabled
Drop the temporary opsSync flag helper now that lib/campaignOps landed
on main; keep next.config env inlining for the client island.
2026-08-01 22:50:25 +00:00
Cursor Agent
f7e3591ea9
feat(OH6): estimate outbox + hybrid PledgeEstimateForm toasts
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>
2026-08-01 22:50:24 +00:00
Cursor Agent
df4ee3fb76
feat(OH6): estimateVotesCas with optional baseEstimatedAt
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>
2026-08-01 22:50:17 +00:00
Francisco Solla
79f62d62b6
Merge pull request #185 from fsolla/cursor/pool-i157-a2dcfb84-a88a
CL3 — OpsListPage/OpsListView + municípios na arquitetura nova (tracer)
2026-08-01 19:44:39 -03:00
Cursor Agent
4f5366780f
CL3: record delivery changelog and close plan status
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:31:19 +00:00
Cursor Agent
4d035017f2
CL3: OpsListPage/OpsListView tracer for municípios list
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>
2026-08-01 22:29:08 +00:00
Cursor Agent
3a8c1ab3ed
docs(plans): mark OH3 done with measured truncation policy
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:23:09 +00:00
Cursor Agent
84ffa1b499
CL1: formatar planos com Prettier 2026-08-01 22:04:25 +00:00
Cursor Agent
2216822ca8
CL1: travar spec-mãe da lista unificada + SSOT para CL2
Fecha o rascunho: inventário as-built, 8 slugs com gates reais,
conflitos por domínio, index CL2–CL8 e acoplamento OH. CL2 passa
a citar a tabela canónica em vez de duplicá-la.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:04:25 +00:00
Cursor Agent
60419ee952
OH1 — format Prettier na spec-mãe 2026-08-01 22:02:42 +00:00
Cursor Agent
bef2b824df
OH1 — aprova spec-mãe Ops híbrido RSC/local (#164)
Trava arquitectura (mirror + GET ops-sync + full-only + CAS opt-in),
mapa OH2–OH14, orçamento/poll e critérios de aceite do projecto.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:01:29 +00:00