Commit graph

108 commits

Author SHA1 Message Date
Cursor Agent
18c1317884
chore(B136): keep groupActionsByRow internal; drop unused import 2026-08-02 23:36:28 +00:00
Cursor Agent
4cbb65963b
fix(B136): pass raw boxes to grid geometry assert 2026-08-02 23:36:28 +00:00
Cursor Agent
3ac5d303e8
test(B136): assert 3×2 grid by column clusters (tolerant row heights) 2026-08-02 23:36:28 +00:00
Cursor Agent
993b9af69b
style: format B136 files with Prettier 2026-08-02 23:36:28 +00:00
Cursor Agent
2f2c8563a5
B136 — corrigir grade 3×2 no Início e FAB overlay
- layout=grid no botão com w-full/min-w-0 sem box-content no mobile
- li min-w-0, gap-2, data-layout=grid-3 no strip
- e2e com geometria (boundingBox) em viewport 390
- impl plan docs/plans/inicio-acoes-grade-3cols-2rows-impl.md

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 23:36:28 +00:00
Francisco Ignácio Fontoura Solla
0baeda22a0 Fix e2e failures from FAB chrome waits and B27 advisor strict-mode.
B126 mobile specs looked for a page heading that shell chrome replaced;
wait on campaignPageChrome with exact title text, and wrap the desktop
title so subtitle no longer collides. Pin B27 to the município-specific
assessores trigger and map home-search libs to campaignMunicipalities.
2026-08-02 17:49:08 -03:00
Cursor Agent
02c4843c5c
fix(e2e): restore chrome title slot locator; drop unused scenario hook
Ensure campaignPageChrome targets campaign-page-chrome-title after rebase,
and remove useMunicipalityEstimateScenario orphaned by B129 overview removal.
2026-08-02 20:32:06 +00:00
Cursor Agent
a68e1d8efb
fix(e2e): target chrome title slot so subtitle does not collide
Desktop chrome put title+subtitle in one text node; exact getByText
failed. Mobile subtitle matched Municípios case-insensitively. Mark the
title with data-slot and assert against that node.
2026-08-02 20:31:18 +00:00
Cursor Agent
8e9864362b
fix(e2e): exact match in campaignPageChrome for mobile subtitles
Mobile top bar puts title + subtitle in the same chrome slot; substring
getByText('Municípios') also hit 'Os 435 municípios…'.
2026-08-02 20:31:07 +00:00
Cursor Agent
62673367c9
test(e2e): harden município list selectors after B127 omnibox
Use campaignPageChrome for FAB specs and .first() on Editar assessores
when mobile+desktop cells both mount.
2026-08-02 20:30:55 +00:00
Cursor Agent
d64b700872
test(e2e): assert municipality omnibox instead of Ordenado por label 2026-08-02 20:30:55 +00:00
Cursor Agent
16c2358479
B129 — Restore anchored trend-control E2E regex after rebase 2026-08-02 20:07:35 +00:00
Cursor Agent
a92701db68
B129 — Format campaignMunicipalities E2E spec 2026-08-02 20:04:07 +00:00
Cursor Agent
4cb21576c2
B129 — Anchor trend-control E2E regex per codebase convention 2026-08-02 20:04:07 +00:00
Cursor Agent
5ded385ed9
B129 — Stabilize campaignPageChrome E2E helper for title + subtitle layout 2026-08-02 20:04:07 +00:00
Cursor Agent
5bb8bcc62b
B129 — Align municipality E2E with page chrome and scoped trend control 2026-08-02 20:04:07 +00:00
Francisco Solla
f176412e2b
Merge pull request #277 from fsolla/cursor/pool-i271-cbcf1835-00b9
B130 — Sidebar /campanha sem logo nem chip de escopo no topo
2026-08-02 17:03:28 -03:00
Cursor Agent
1cab8e9539
Harden B126 FAB e2e waits for layout chrome instead of page h1 2026-08-02 19:50:40 +00:00
Francisco Solla
7839a88a5a
Merge pull request #270 from fsolla/cursor/pool-i250-d89b6314-599f
B123 — Campanha — orientação na shell + aba (sem títulos grandes de seção)
2026-08-02 16:16:58 -03:00
Francisco Solla
5e7219f849
Merge pull request #269 from fsolla/cursor/pool-i260-ac255f26-42ec
B126 — FAB de ações rápidas (substituir bottom drawer persistente)
2026-08-02 16:15:01 -03:00
Cursor Agent
5fe0510f84
test(e2e): atualiza specs do drawer persistente para FAB overlay (B126) 2026-08-02 19:01:06 +00:00
Cursor Agent
6d793026d7
test(e2e): match page chrome title without exact text on desktop 2026-08-02 19:01:03 +00:00
Cursor Agent
3d13972e48
test(e2e): assert visible campaign page chrome on desktop viewport 2026-08-02 18:55:16 +00:00
Cursor Agent
dbce18002c
B126 — FAB de ações rápidas substitui drawer persistente
Remove o bottom drawer não-modal (snap/peek/scroll-coupling) e introduz
um FAB em todas as larguras fora do Início e wizards. Abrir o FAB mostra
overlay modal: Dialog no desktop (busca em cima) e Drawer no mobile
(ações em cima), reutilizando strip e busca globais do Início.

Closes #260

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 18:39:27 +00:00
Cursor Agent
9f19fb2f88
chore: format 2026-08-02 18:24:31 +00:00
Cursor Agent
57b1790e12
B124: corrige foco ao apagar filtro e remove useId morto
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 18:23:47 +00:00
Cursor Agent
9d86510b57
B124: filtros salvos sempre visíveis sob Municípios (sem disclosure)
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 18:20:27 +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
74c9c3a6e5
B122 — simplify: private button classes, drop bleed shell prop
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 17:57:40 +00:00
Cursor Agent
5b6af56b22
B122 — Início mobile: ações em grade 2×3 sem scroll
- CampaignHomeActionStrip: variant responsive (grid lt-md, strip md+)
- CampaignHomeActionButton: layout strip/grid/responsive class contracts
- CampaignHomeLayout: remove mobile bleed for grid gutter
- CampaignQuickActionsDrawer: explicit variant=strip
- Plans: inicio-acoes-grid-2x3-mobile + impl
- Tests: unit grid/strip + e2e mobile visibility

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-02 17:53:39 +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
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
593b2273c2
style: prettier e2e wizard specs 2026-08-01 18:45:01 +00:00
Cursor Agent
ca18ce0f17
test(e2e): wizard município sem h1 visível (B107) 2026-08-01 18:44:39 +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
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
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
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
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
2dcd3ab3f8
test(e2e): adapt demand form activity picker assertion (C11) 2026-08-01 07:02:06 +00:00
Cursor Agent
5c59793e4c test(miss-53): gate WebAuthn ceremonies on authenticator readiness
The app's biometrics probe is one-shot per island mount: when
isUserVerifyingPlatformAuthenticatorAvailable() resolves before the CDP
virtual authenticator answers, the enrollment form / biometric button
never mount and no wait flips them (prod-build CI flake). New
expectCampaignBiometricsReady(page) polls the platform answer BEFORE the
surface whose island probes it; adopted at both ceremony entries in
campaignWebAuthn (verified green locally). Conventions pin:
e2eNavigationConventions fails the build when a virtual-authenticator
spec skips the readiness gate.
2026-07-31 20:57:18 -03:00
Francisco Ignácio Fontoura Solla
b1a34a8c3a fix(tests): allocate homeSearch municipalities; scope B42 trend drawer 2026-07-31 20:57:17 -03:00
Cursor Agent
e51a1dc9b2 style: prettier campaignHomeActions after URL anchor edits 2026-07-31 20:57:17 -03:00
Cursor Agent
6b894a04c5 test(miss-73): allocate municipalities, never pin seeded slugs (deadlock class)
Int specs pinning seeded rows (cairu/feira-de-santana/catalog[0..2] or
class-derived fixed slugs) and mutating them deadlocked municipality_rels
under the parallel suite (40P01); e2e specs deep-linking ?municipio=cairu
raced the same row from two workers.

- homeSearchStateDeputies: 2 fixed slugs -> 2 allocations.
- municipalityPageData classe test: rewritten class-AGNOSTIC — allocates
  rows until two distinct territorial classes (same pinned behavior:
  filter narrows, totals honest, classe sort = descending weight), no
  fixed reduto/marginal slugs. nivel test + facet test: plain allocations.
- campaignHomeActions/campaignWizardChrome: 11 hardcoded cairu deep links
  -> claimMunicipality(); hit clicks disambiguate by href (catalog names
  are not prefix-unique); caption/URL assertions use ^-anchored full-URL
  regexes (P3-C template guard). /Cairu/i literals gone.

Verified: int 17/17, e2e 18/18 (dev mode), unit 1106/1106.
2026-07-31 20:57:17 -03:00
Francisco Ignácio Fontoura Solla
30170509f7 fix(e2e): WebAuthn on prod build, saved-filters navigation, Vercel scripts
CI e2e serves a production build on localhost; Next inlines NODE_ENV so
WebAuthn RP resolution now treats localhost requests as test mode. Saved
filters avoids a racing bare goto. Analytics/SpeedInsights render only on Vercel.
2026-07-30 17:37:20 -03:00
Francisco Ignácio Fontoura Solla
6a20e98047 fix(campanha): share one Drawer across municipalities mobile cards
Root cause of the prod-build React #130 on /campanha/municipios: the
md:hidden mobile-cards tree still hydrated ~25 rows x ~5 sheet controls
(~125 eager Drawer/DrawerCloseButton instances) even on wide viewports.
Filtered ?q=... routes failed more often only because they exercise the
list with filters active — the search param itself was not the bug.

CampaignListSheetProvider hosts a single bottom Drawer for the whole
mobile section; CampaignCellEditOverlay sheet cells portal their
body/footer into it while keeping per-cell open state and autosave
scaffolds. Footers with DrawerCloseButton are only created once a sheet
actually opens. Desktop popover path is unchanged; per-cell Drawer
remains the fallback for surfaces without the provider.

Also: DrawerCloseButton (function render prop, avoids base-ui element
render in prod bundles) replaces the DrawerClose render={<Button/>}
pattern across call sites; stale e2e selectors refreshed; e2e affected
script + playwright github/list reporters for CI; use-mobile reverted
(no consumers of the gate remain).

Guardrail filed as issue #52.
2026-07-30 17:37:20 -03:00
Francisco Ignácio Fontoura Solla
b4ce8e45d0 docs: align B63 entry query param with B70 and record simplify deferrals. 2026-07-30 04:02:30 -03:00