Commit graph

323 commits

Author SHA1 Message Date
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
e880299170
B114: simplify wizardBack — drop dead wrappers and back-close path
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>
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
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
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
f2869d4e79
refactor(B112): drop unused isCollapsed export; dedupe drawer gap classes
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>
2026-08-01 23:56:31 +00:00
Cursor Agent
266fc67516
feat(B112): collapse drawer on blur∅ / nav / handle+swipe, pad ⅓
- 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>
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
Cursor Agent
4fecbc6fac
Fix merge conflict markers in opsListPage.unit.spec.ts 2026-08-01 23:38:52 +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
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
57df503010
CL5: finish rebase conflict resolution for CL4/OH6
Drop leftover conflict markers and fold assessores into the shared
OpsListPage route pin alongside CL4.
2026-08-01 23:07:14 +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
Francisco Solla
d909e3d28d
Merge pull request #183 from fsolla/cursor/pool-i167-a82e10a2-9a34
OH6 — estimateVotesCas + outbox mínimo + toasts (tracer bullet)
2026-08-01 20:06:15 -03: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
f69eaa8f82
style(OH6): prettier format 2026-08-01 22:50:24 +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
Cursor Agent
1398768670
CL4 — migrar lideranças, dobradinhas e demandas para OpsListPage
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>
2026-08-01 22:47:37 +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
Francisco Solla
d088bcfa9a
Merge pull request #184 from fsolla/cursor/pool-i165-4845d5e3-104f
OH3 — Benchmark do snapshot completo + política de truncamento
2026-08-01 19:42:16 -03:00
Cursor Agent
45eaabd23c
CL3: align provider nesting and tighten OpsList types
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>
2026-08-01 22:31:07 +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
5de3aeeb2e
OH3: pin snapshot policy constants + simplify benchmark script
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:26:44 +00:00
Francisco Solla
4c16c76a2c
Merge pull request #182 from fsolla/cursor/pool-i156-cc5b501f-ae59
CL2 — opsListRegistry + tipos + flag + slugs v1
2026-08-01 19:24:54 -03:00
Cursor Agent
e0fdc2594e
CL2: add opsListRegistry, LIST_UNIFIED flag, and unit pins
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>
2026-08-01 22:14:52 +00:00
Cursor Agent
7fd1133843
test: pin campaignOps contract exports for knip 2026-08-01 22:09:25 +00:00
Cursor Agent
322d593758
style: prettier campaignOps modules 2026-08-01 22:08:38 +00:00
Cursor Agent
7515d2a959
OH2 — lib/campaignOps contrato puro + merge + flag
- 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>
2026-08-01 22:07:54 +00:00
Francisco Solla
8741eb5151
Merge pull request #154 from fsolla/cursor/pool-i149-d8165a59-5947
B110 — Wizard return path via allowlisted from query
2026-08-01 18:04:14 -03:00
Francisco Solla
ab910b499b
Merge pull request #153 from fsolla/cursor/pool-i148-3c37da6e-2281
B109 — Bottom drawer: dock polish, fullscreen search, exclude current entity
2026-08-01 18:03:27 -03:00
Cursor Agent
2e3740ef3f
Format B110 wizard return path changes 2026-08-01 20:40:04 +00:00
Cursor Agent
d5697bcfcb
B110 — wizard return path via allowlisted from query
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>
2026-08-01 20:39:24 +00:00
Cursor Agent
fcd0206da6
chore: prettier format (B109) 2026-08-01 20:38:53 +00:00
Cursor Agent
490d5deeb7
B109 — bottom drawer: fullscreen search, wider labels, exclude current entity
- 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
2026-08-01 20:38:10 +00:00
Cursor Agent
7a0f9ffed5
B111 — strip edge-to-edge bleed + silent flat delta on Início
- 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>
2026-08-01 20:36:19 +00:00
Francisco Solla
7317eb335a
Merge pull request #147 from fsolla/cursor/pool-i143-27c538e8-dc86
B108 — Wizard autofocus do 1º input + destaque do último cenário focado
2026-08-01 16:17:22 -03:00
Cursor Agent
19fb7ca76d
Format campaignWizardShell unit spec 2026-08-01 19:03:35 +00:00
Cursor Agent
ef4cef8c4c
Fix vote estimate compact highlight test assertion
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 19:01:12 +00:00
Francisco Solla
5cdcda98b9
Merge pull request #146 from fsolla/cursor/pool-i141-1ce99b5a-0b74
B106 — Início mobile — Voltar no header + Android back + skeleton das sugestões
2026-08-01 15:59:53 -03:00
Cursor Agent
a52a622ba5
B108 — wizard autofocus first input + active scenario highlight
- 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>
2026-08-01 18:59:42 +00:00
Francisco Solla
97ae71b0fe
Merge pull request #145 from fsolla/cursor/pool-i142-0f38ef32-58e4
B107 — Wizard município — sem título + busca sticky + skeleton
2026-08-01 15:57:38 -03:00
Cursor Agent
c524b1f19a
B105: format home search unit + mark plan implementado 2026-08-01 18:40:51 +00:00
Cursor Agent
98a69ab153
B105: bottom drawer handle top, scroll-up dock, discreet search peek
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>
2026-08-01 18:40:51 +00:00
Cursor Agent
f80f672732
B106 — format 2026-08-01 18:38:50 +00:00
Cursor Agent
13a9ccf064
style: prettier CampaignWizardShell and tests 2026-08-01 18:36:55 +00:00
Cursor Agent
fc465639f2
B107 — wizard município sem título, busca sticky e skeleton
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>
2026-08-01 18:36:30 +00:00