Commit graph

412 commits

Author SHA1 Message Date
Cursor Agent
32987f093f
chore: remove unused CampaignUser import from municipalityLabels 2026-08-02 18:14:24 +00:00
Cursor Agent
7ff2f243da
chore: remove orphaned getCampaignScopeLabel and unexported hook 2026-08-02 18:12:43 +00:00
Cursor Agent
d4425251c6
style: prettier em arquivos B123 2026-08-02 18:11:54 +00:00
Cursor Agent
ccfbf592a8
B123 — orientação na shell + aba sem títulos de seção no corpo
Move page title/subtitle to CampaignMobileTopBar, CampaignDesktopHeader,
and tab metadata (Solla - Campanha - %s). Strip section headers and scope
chips from list/create routes; detail pages keep entity h1.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 18:08:47 +00:00
Cursor Agent
62b6001ed8
OPS14 — form-action guard sweeps ladder, not filename
Replace the W4d filename-based convention spec with a sweep of every
src/app/(campaign) file that calls mapCampaignFormActionError without
runCampaignFormAction/Redirect. Migrate profile, leaderSupporter, and
convite-login to the shared wrappers; allowlist auth/password and the
existing bespoke formActions exceptions with documented reasons.

Closes #241

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 16:47:42 +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
1ae714613f
Fix wizard back link: drop municipio, keep from query 2026-08-01 20:50:03 +00:00
Cursor Agent
ae3cfffb5a
fix(B109): fullscreen drawer uses dedicated snap + 100dvh height 2026-08-01 20:49:32 +00: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
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
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
f80f672732
B106 — format 2026-08-01 18:38:50 +00:00
Cursor Agent
50aa83ea8f
B106 — optional home search chrome read for wizard unit tests
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 18:38:04 +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
84365ddf54
B106 — Voltar no header mobile, Android back e skeleton das sugestões
- CampaignHomeSearchChromeContext + publisher no Início
- CampaignMobileTopBar troca SidebarTrigger por Voltar quando uiFocused
- useHomeSearchFocusHistory com pushState/popstate para back do SO
- HomeSearchSuggestSkeleton enquanto isFetching sem hits
- Unit tests para history helper, top bar e skeleton

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 18:36:28 +00:00
Francisco Solla
de9377de85
Merge pull request #138 from fsolla/cursor/pool-i129-7bc105bb-7d33
B102 — Crash — busca no bottom drawer (focus / digitação)
2026-08-01 15:33:04 -03:00
Francisco Solla
1c2f767d96
Merge pull request #140 from fsolla/cursor/pool-i130-c5143bec-1fbc
B103 — Remover título Sugestões no empty state da busca
2026-08-01 15:24:21 -03:00
Cursor Agent
653f04062b
B102 — fix drawer search crash on focus/type (TooltipProvider scope)
Lift TooltipProvider in the campaign app layout so it wraps
CampaignAppScrollChrome (scroll + quick-actions drawer). Focus→suggest
with priority-alta hits mounted CampaignHoverTooltip outside the old
provider and crashed the page. Unit pins cover focus→suggest and type→search.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 18:18:19 +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
Francisco Solla
313a041d5b
Merge pull request #137 from fsolla/cursor/pool-i131-803d9700-95db
B104 — Wizard: label genérica "Pular" nas ações encadeadas
2026-08-01 15:10:27 -03:00
Cursor Agent
2fa6e7298a
B104 — Wizard: label genérica "Pular" nas ações encadeadas
Substitui as quatro labels longas de skip (votos, tendência, sinal,
liderança) por uma constante compartilhada WIZARD_CHAIN_SKIP_LABEL.
Resolvers e condições de exibição permanecem intactos (B96/B98).

Closes #131

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 17:57:12 +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
Cursor Agent
ca623e7aee
B98 — e2e espera a cadeia após save; knip limpa exports
Atualiza campaignHomeActions para navegar ao próximo elo
(votos→tendência, sinal→tendência, liderança→sinal) e remove
exports de skip de votos não usados.
2026-08-01 11:52:50 +00: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