Commit graph

293 commits

Author SHA1 Message Date
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
c0d7dd2ef4
B105: remove rebase conflict markers left in drawer files
The first rebase continue staged conflicted copies in parallel with the
resolution write; CI then failed parse/lint on the markers.
2026-08-01 18:40:51 +00:00
Cursor Agent
faf813c354
B105: keep scroll baseline while focused; force dock under uiFocused
Advance lastScrollTop even when search is focused so the first scroll
after blur does not false-flip snap. Re-assert dock whenever uiFocused
and the sheet left dock (handle collapse cannot hide an active search).

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
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
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
Cursor Agent
259488fd33
B103 — omit Sugestões heading in home search suggest mode
Hide the visible h2 when resultKind is suggest; keep aria-label on the
section for screen readers. Search mode still shows Municípios heading.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 18:11:54 +00:00
Cursor Agent
1053c571eb
B101 — strip de ações: bleed sem gutter + hit area via padding
- CampaignHomeActionStrip: gap-0 no ul, px-4 interno (md:px-0)
- CampaignHomeActionButton: px-2 + box-content para hit area sem encolher coluna
- CampaignQuickActionsDrawer: -mx-4 bleed na strip (espelha Início)
- Pins unitários para classes de layout B101

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 17:55:54 +00:00
Francisco Solla
f20fca0506
Merge pull request #120 from fsolla/cursor/pool-i106-d9499b1d-9029
B98 — Encadear ajustes após a ação principal do wizard
2026-08-01 09:06:11 -03:00
Francisco Solla
a7394d3b9e
Merge pull request #119 from fsolla/cursor/pool-i114-36b6c1a5-2d0b
B100 — Bottom drawer mobile — dock visível + recolhe no scroll
2026-08-01 08:49:14 -03:00
Cursor Agent
d8f54a5d73
B98 — format Prettier nos arquivos do encadeamento 2026-08-01 11:42:08 +00:00
Cursor Agent
346949d035
B98 — Encadear ajustes do wizard após a ação principal
Após salvar (ou Pular) votos/tendência/sinal/liderança, navega ao
próximo elo da matriz v1 no mesmo município via entryAction, em vez
de voltar ao Início. Helper puro wizardActionChain + skips alinhados.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 11:41:26 +00:00
Cursor Agent
a056616d4a
Fix drawer snap geometry: handle at bottom, scroll on content ref
- Reorder drawer so handle sits at the screen bottom (snap shows bottom band)
- Hide dock content when collapsed instead of clipping through search
- Attach scroll-collapse listener directly on campaign-content-scroll ref
2026-08-01 11:35:09 +00:00
Cursor Agent
923a0eb885
Tweak GlobalSearchBody doc comment after mount removal 2026-08-01 11:21:02 +00:00
Cursor Agent
838ea62327
Remove unused CampaignGlobalSearchMount export (provider lifted to scroll chrome) 2026-08-01 11:20:55 +00:00
Cursor Agent
e09f01e683
Format + e2e manifest for Drawer/shell B100 2026-08-01 11:20:08 +00:00
Cursor Agent
1bb3fc7303
B100 — bottom drawer dock on load + collapse on scroll
- Replace expanded 55dvh snap with fixed DOCK height (12rem) + COLLAPSED handle
- Fix Base UI snap geometry via padding-bottom on Drawer popup
- Lift snap state to CampaignQuickActionsSnapProvider with pathname reset
- Collapse drawer when campaign-content-scroll passes threshold; reopen only via handle/pull
- Block collapse while global search is focused or active
- Dynamic content-scroll padding for dock vs collapsed peek
- Unit tests for dock default, scroll collapse, handle toggle; e2e on municipality detail

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 11:19:13 +00:00
Cursor Agent
5181116d84
B96 — Header wizard: X na tendência standalone, Pular só encadeada
resolveWizardTrendSkip(entryAction) espelha resolveWizardSignalSkip:
skip só quando entryAction presente e diferente de change-trend.
WizardTrendChoiceStep e WizardTrendNoteStep condicionam skip/trailingAction.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 11:18:13 +00:00
Francisco Solla
270c58424b
Merge pull request #113 from fsolla/cursor/pool-i107-0e9a1b5f-b248
B99 — Strip de ações do Início — edge-to-edge no mobile + gap menor
2026-08-01 08:14:36 -03:00
Francisco Solla
18bcee4454
Merge pull request #112 from fsolla/cursor/pool-i103-cc23cd9a-d9c9
B95 — Polimento busca município no wizard (bullets, gaps, título mobile)
2026-08-01 08:10:02 -03:00
Cursor Agent
67336c9d9d
B95 — reuse HOME_SEARCH_GROUP_LIST_CLASS for wizard hit list
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 10:55:35 +00:00
Cursor Agent
5ce82e2229
B97 — Salvar tendência fecha wizard (redirect home quando status já aplicado)
Após salvar a nota, o RSC refresh via server action via
redirecionava à etapa de escolha. Agora  manda
para Início nesse caso; o client usa  no sucesso.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 10:54:51 +00:00
Cursor Agent
afa05fd5fc
B99 — strip de ações edge-to-edge no mobile + gap menor
- Bleed do slot home-actions com -mx-4 (compensa p-4 do scroll) só no mobile
- Gap horizontal da strip: gap-3 → gap-2
- Unit pin das classes de bleed em campaignHomeLayout

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 10:54:39 +00:00
Cursor Agent
cce3d4ab3e
B95 — polimento busca município no wizard (bullets, gaps, título mobile)
- Remove list bullets from municipality search hits (list-none + reset)
- Tighten gap between search input and results (gap-4 → gap-2)
- Reduce mobile top padding in CampaignWizardShell (pt-3 pb-6 md:py-6)

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 10:53:27 +00:00
Cursor Agent
5c99379ba0
fix(B94): remove leftover rebase conflict markers 2026-08-01 08:16:26 +00:00
Cursor Agent
4df1d68f3d
fix(B94): restore typed search results in wizard municipality step 2026-08-01 07:44:13 +00:00
Cursor Agent
2fc73aa7a4
style: prettier B94 files 2026-08-01 07:44:00 +00:00
Cursor Agent
20c69bd0de
B94 — wizard empty state: município mais próximo (geo)
No idle do passo de busca de município, resolve client-side o município
mais próximo no escopo do ator quando a permissão de geo já está granted
(reuso B14: campaignGeolocation + municipalityProximity + malha lazy).

- Prop RSC accessibleMunicipalities na rota acoes/[slug]
- Hook useWizardNearestMunicipality (fail-soft, só inScope)
- Merge geo no topo da lista B92 via wizardMunicipalitySuggestMerge
- Unit tests do merge/format

Closes #94

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 07:43:42 +00:00
Cursor Agent
8a720b0285
style: prettier 2026-08-01 07:24:10 +00:00
Cursor Agent
dbf6a7fdce
B93 — wizard empty state continuity (visitados + última ação)
Merge client-side recent visits and last-acted municipality storage into
wizard municipality suggest idle list ahead of B92 server rankings.

- Add campaignLastActedMunicipality + wizardMunicipalitySuggestMerge libs
- Extend wizard-municipality-suggest with scopeMunicipalities for hit lookup
- Record last-acted on wizard write success (votes, signal, trend, leadership)
- Clear last-acted on logout alongside recent visits

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 07:21:56 +00:00
Francisco Solla
7f7c707d4d
Merge pull request #98 from fsolla/cursor/pool-i92-174dd43e-5e6f
B92 — Empty state do wizard: chassis + ranking de esquecidos
2026-08-01 04:17:53 -03:00
Francisco Solla
269fb79f37
Merge pull request #97 from fsolla/cursor/pool-i42-980ec2b6-2133
C11 — Escala planos (picker pós-C12 + paginação das demandas vinculadas)
2026-08-01 04:16:27 -03:00
Cursor Agent
1ed65d0d81
B92 — wizard idle suggest: rank + loader + UI
Add wizard-municipality-suggest mode to home-search with cold-first
ranking (signal → E14 → trend → E10 class → 2022 votes). Wizard
municipality step now fetches suggestions when query is idle.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 07:01:19 +00:00
Francisco Solla
bcfd3fe598
Merge pull request #90 from fsolla/cursor/pool-i12-d50dd384-d1b2
B57 — Delta 7 dias do total estimado no Início
2026-08-01 03:49:37 -03:00
Francisco Solla
d9a2414656
Merge pull request #84 from fsolla/cursor/pool-i26-856c30e7-8e05
B90 — Ações rápidas — Conceitos + Perfil (só busca staff)
2026-08-01 03:43:41 -03:00
Cursor Agent
2ac6f4c8fa
style: prettier (C11 touched files) 2026-08-01 06:39:34 +00:00
Cursor Agent
8372cec91d
C11: picker remoto de atividades na demanda + paginação de vínculos
- Substitui loadActivityOptions (pagination: false) por AsyncSearchCombobox
  com busca server-backed filtrada por município (searchActivityRelationOptions).
- Pagina card Demandas vinculadas no detalhe da atividade (10/página) com
  soma de custo em query separada e link Ver todas na lista filtrada.
- Adiciona filtro ?activity= na lista /campanha/demandas.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:37:53 +00:00
Cursor Agent
af6c180211
B57 — delta 7 dias do total estimado no Início
- Collection campaignVoteSummarySnapshot (snapshot diário statewide)
- Gravação idempotente on-read no loadCampaignHomeSummary + retenção 30d
- UI: seta + magnitude ao lado do total B56 (aria-label completo)
- Reusa rollup statewide para CG/candidato; assessor vê Δ global (opção A)

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:33:39 +00:00
Cursor Agent
c698701153
style: Prettier host after B90 rebase on main (B87+B91) 2026-08-01 06:28:15 +00:00
Cursor Agent
63a4b43951
style: Prettier (B90) 2026-08-01 06:28:15 +00:00
Cursor Agent
7844afcc6b
B90 — Ações rápidas Conceitos + Perfil (só busca staff)
Registry B79 para /campanha/conceitos e /campanha/perfil: catálogo vazio
para staff, busca global no drawer expandido via CampaignStaffGlobalSearch.
Leader em /perfil continua sem drawer (lockdown B89).

Closes #26

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:28:15 +00:00
Cursor Agent
91d51b547d
fix: remove leftover conflict markers from ContextSync 2026-08-01 06:24:54 +00:00
Cursor Agent
ca80da178c
style: Prettier on B82 files 2026-08-01 06:24:54 +00:00
Cursor Agent
d5da7b0adf
B82 — Ações rápidas em lideranças (lista + detalhe)
Registra catálogo contextual no drawer B79 para /campanha/liderancas:
lista com update-leadership; detalhe com cinco wizards e prefill de
município quando N=1. Adiciona query leadershipId no wizard A4 e
CampaignQuickActionContextSync na ficha.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:24:54 +00:00
Francisco Solla
7261f3f588
Merge pull request #87 from fsolla/cursor/pool-i35-456a9692-831a
RS+ — Auth read leve + shells de senha
2026-08-01 03:23:51 -03:00
Cursor Agent
5f5b513336
style: prettier 2026-08-01 06:09:33 +00:00
Cursor Agent
7484aab28a
RS+ Fase 1+3: auth read leve, password fields e login state
- authenticateCampaignToken usa depth:0 + select mínimo (sem join media)
- getCampaignUserWithAvatar para layout/perfil; hasCampaignSession em rotas públicas
- CampaignPasswordFields reutilizado em reset, perfil e convite
- LoginForm migra para CampaignFormActionState + mapCampaignFormActionError
- invite login schema unifica refineMatchingPasswords

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:07:28 +00:00
Cursor Agent
f27563d694
style: Prettier (O0+ #34) 2026-08-01 06:04:44 +00:00
Cursor Agent
cbe171c597
O0+ (#34): consent key DRY, SQL int tests, Footer condicional, B68 suggest RSC
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 06:04:05 +00:00