Commit graph

432 commits

Author SHA1 Message Date
Cursor Agent
2eec800511
OH13: drop unused domain outbox enqueue paths
Remove dead createActivity / stateDeputy / membership outbox
mutationFns and model types flagged by knip; keep the four live
enqueue paths and logout/key helpers.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 03:16:03 +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
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
6f28ab78ff
fix(e2e): scope B118 header description assert to list header
Avoids Playwright strict-mode flakes when more than one header p matches.
2026-08-02 02:12:43 +00:00
Cursor Agent
3e81269971
fix(e2e): B118 mobile pin expects Filtrar municípios (B120)
Desktop Buscar município stays md+; mobile viewport asserts the
filter combobox label instead.
2026-08-02 02:12:35 +00:00
Cursor Agent
d221494994
fix: resolve changelog conflict markers + e2e card nav tap
Rebase left conflict markers in CHANGELOG-AGENTS.md; keep B120 + OH9.
E2E taps the card heading instead of TerritoryLink after densify.
2026-08-02 02:12:35 +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
Francisco Solla
b85d6f6227
Merge pull request #223 from fsolla/cursor/pool-i171-b4f8ce5e-fad8
OH10 — Writes municipality staff CAS: update, declareVotes, tendência, engagement, advisors
2026-08-01 23:09:26 -03:00
Francisco Solla
b38850b446
Merge pull request #214 from fsolla/cursor/pool-i194-81175171-d141
B113 — Wizard mobile thumb-zone, títulos e cores nos ícones
2026-08-01 22:58:20 -03:00
Francisco Solla
492d0c77b8
Merge pull request #218 from fsolla/cursor/pool-i205-4d8c38ce-14ae
B118 — Listas mobile — ocultar título, subtítulo e chip de escopo
2026-08-01 22:52:04 -03:00
Cursor Agent
13793e3092
OH10: mock useRouter in cell overlay unit tests
Advisors hybrid conflict path needs next/navigation; overlay container
specs render without the App Router.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 01:43:25 +00:00
Cursor Agent
884ad67c50
test(B113): fix wizard chrome e2e and municipality href strictness 2026-08-02 01:42:45 +00:00
Cursor Agent
b8b2aa4d72
test(B113): align wizard e2e with Mandate Red header (no step h1) 2026-08-02 01:41:32 +00:00
Cursor Agent
f3f442f981
style: Prettier format B113 files 2026-08-02 01:41:31 +00:00
Cursor Agent
a72874df20
B113 — Wizard mobile thumb-zone, títulos e cores nos ícones
- Thumb-zone grid (RTL mobile fill from bottom-right) shared via wizardThumbGrid
- Signal/trend tiles: semantic icon colors only; neutral tile borders
- Remove redundant step titles (flow name stays in Mandate Red header)
- Trend choice: current-status card with Atual chip (2 columns)
- Signal body: Salvar disabled until body is non-empty
- Leadership grid: list-none + thumb-zone alignment

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 01:41:21 +00:00
Cursor Agent
26bda9e430
OH10: fix fixtures, bypass comment, drop unsupported metadata
Align list view-model test fixtures with updatedAt, justify the CAS
advisor read bypass, and remove createOfflineAction metadata the
TanStack API does not accept.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 01:36:31 +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
b96b962d73
Merge pull request #221 from fsolla/cursor/pool-i209-b0d5e6cd-eaa9
B121 — Wizard atualizar liderança — edição rápida (status + votos declarados)
2026-08-01 22:26:33 -03: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
Cursor Agent
3b0a6afdf4
B118 — fix mobile header e2e: sr-only h1 stays a11y-visible to Playwright 2026-08-02 01:20:06 +00:00
Cursor Agent
c845550cdb
B121 — wizard liderança: edição rápida status + votos declarados
- Estende WizardLeadershipTileViewModel com declaredVotes
- Batch load de votePledge no loadWizardLeadershipTiles
- Drawers de status (auto-save) e votos (Salvar) no grid B70
- declareVotesWizardFormAction com revalidate do wizard
- Unit tests do mapeamento pledge→tile

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 01:13:03 +00:00
Francisco Solla
50bd6f0764
Merge pull request #219 from fsolla/cursor/pool-i206-d740dec0-e4af
B119 — Fix crash ao tocar Nível no card mobile de municípios
2026-08-01 22:12:30 -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
github-actions[bot]
a42aa6de51
Merge pull request #216 from fsolla/cursor/pool-i203-3b22c551-ddd4
B116 — Início mobile: gap busca÷2 + header título → home
2026-08-02 01:09:51 +00:00
github-actions[bot]
a805b40bbc
Merge pull request #213 from fsolla/cursor/pool-i198-68d46759-94e3
B115 — Início — strip sem faixa branca lateral (botões na borda)
2026-08-02 01:04:18 +00: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
1fe6d7fe44
B119 — dismissActiveSheet fecha o drawer compartilhado sem depender da identidade do callback 2026-08-02 00:58:29 +00:00
Cursor Agent
ac25b5ce17
style: prettier on B117 files 2026-08-02 00:57:38 +00:00
Cursor Agent
fe2748c5ab
B117 — prefix nearest município in global search suggest (geo)
- 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>
2026-08-02 00:56:47 +00:00
Cursor Agent
4f459b9a57
B116 — Início mobile: gap busca÷2 + header título → home
- CampaignMobileTopBar: bloco Jorge Solla / Campanha·Bahia vira Link para /campanha
- CampaignContentScroll: pb-2 no Início mobile (metade do p-4) quando sem quick-actions peek
- Testes unitários para link e padding compacto

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:56:40 +00:00
Cursor Agent
586ac7d218
B118 — hide list page title, subtitle and scope chip on mobile
Extract CampaignListPageHeader with sr-only/md:not-sr-only h1 and hidden
subtitle/scope below md. Apply to all 8 list index routes. Unit + e2e pins.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:54:55 +00:00
Cursor Agent
0efc434910
style: format opsMirrorClient unit spec 2026-08-02 00:48:49 +00:00
Cursor Agent
387cf90d0f
refactor(OH7): extrair opsVotePledgeMirror para quebrar ciclo de imports 2026-08-02 00:48:23 +00:00
Cursor Agent
1a722e8882
fix(e2e): scope B27 advisors reopen after reload by município
Loose "Editar assessores" matched multiple list rows after reload under
parallel fixtures — pin to the claimed municipality name like the open click.
2026-08-02 00:47:13 +00:00
Cursor Agent
a723a41794
fix(e2e): wait for drawer FULL snap; scope advisors trigger by município
B109 fullscreen assert raced the snap animation in CI; B27 advisors
button matched multiple rows — pin to the claimed municipality name.
2026-08-02 00:47:05 +00:00
Cursor Agent
10e69a1bdc
fix: resolve changelog conflict markers; harden silence int flake
Keep B114 + CL8 changelog entries after rebase; raise silent-municipality
claim budget to 40 under parallel int load.
2026-08-02 00:46:55 +00: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
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
8fd5838914
OH7 — estimativas ligadas ao mirror completo
- HybridPledgeEstimateForm lê valores de votePledgesCollection (não props RSC)
- Outbox faz patch optimista no mirror e aplica write do servidor com estimatedAt
- Helpers read/subscribe/patch no opsMirrorClient + mapper mapVotePledgeWriteToOps
- Testes unitários para merge protegido, patch optimista e mapper de write

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:45:32 +00:00
Cursor Agent
f8cfe0746b
B119 — fix crash ao abrir Nível no card mobile de municípios
O footer portaled do CampaignListSheetProvider ficava fora da árvore React
do Drawer; DrawerCloseButton exigia useDialogRootContext e derrubava a página.

Substitui Cancelar por Button + onOpenChange(false) nos footers de nível e
sinal. Pin: unit com provider compartilhado + e2e mobile.

Closes #206

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 00:44:29 +00:00
Cursor Agent
1cc930efa4
test(e2e): wait for B109 drawer handle to dock near top 2026-08-02 00:22:47 +00:00
Cursor Agent
9c4f00d1cb
B115: remove px-4 do ul da action strip (botões entram da borda) 2026-08-02 00:15:09 +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