Commit Graph
17 Commits
Author SHA1 Message Date
Gustavo 5fef71d157 Fix segment picker misusing removable-tag .chip/.chips styling
The new-campaign segment checkboxes reused .chip/.chips, which is
reserved codebase-wide for click-to-remove selected tags (adds a
trailing " x" and removable-tag hover styling). Give the segment
picker its own segmento-opcao/segmento-lista classes with a minimal
non-removable style instead.
2026-08-03 08:27:35 -03:00
Gustavo e8745513e9 Add Campanhas tab: listing and campaign creation 2026-08-03 08:22:09 -03:00
Gustavo 0d360ad652 Add campaign HTTP routes 2026-08-03 08:17:36 -03:00
Gustavo 4835c6e085 Wire campaign scheduler into server boot 2026-08-03 08:13:45 -03:00
Gustavo a9509a4691 Add campaign send worker with daily limit and health auto-pause 2026-08-03 08:09:45 -03:00
Gustavo a2ecb135d4 Add campaign health auto-pause and variant comparison stats 2026-08-03 08:04:48 -03:00
Gustavo 9bf77d88d3 Fix candidatosEncontrados to reflect full eligible pool, not post-slice count
generateCampaignQueue computed candidatosEncontrados after slicing to
quantidade, so it could never differ from adicionadosNaFila. An operator
generating a queue with quantidade smaller than the eligible pool saw no
signal that more eligible leads existed. Now candidatosEncontrados is read
before the slice, while adicionadosNaFila still reflects rows actually
inserted.
2026-08-01 10:37:31 -03:00
Gustavo 248bd4c550 Add campaign candidate selection, queue generation and approval 2026-08-01 10:32:39 -03:00
Gustavo 8600893496 Add deterministic variant selection and message rendering 2026-08-01 10:29:19 -03:00
GustavoandClaude Sonnet 5 577f48ab19 Fix: stamp semana_iniciada_em when campaign first transitions to 'rodando'
Previously, setCampaignStatus did not set semana_iniciada_em, causing
escalateWeeklyLimits to bail early (if (!campaign.semana_iniciada_em) continue).
Now when a campaign transitions to 'rodando' for the first time, semana_iniciada_em
is set to datetime('now'). Subsequent rodando transitions leave it unchanged
(using COALESCE to preserve first-run timestamp).

Regression tests confirm:
- First transition to 'rodando' stamps semana_iniciada_em
- Subsequent transitions do not reset the timestamp
- resumeCampaign continues to work correctly (pause/resume cycle)
- All 105 tests pass

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-01 10:25:00 -03:00
Gustavo fb2cd75a56 Add campaign-store: CRUD, opt-out and weekly limit escalation 2026-08-01 10:19:22 -03:00
Gustavo a7abd3d4d0 Add campaign outreach schema (migration v8) 2026-08-01 10:14:54 -03:00
Gustavo 4f736562f3 Carry over pre-existing WABA outreach automation WIP
This work already existed uncommitted in the main working tree (not
authored by this branch) and is required as a runtime dependency for the
campaign outreach port (zpro-client, templates, outreach routes/UI). Copied
in as-is, untouched, so this feature branch has a working baseline; the
original uncommitted state in the main checkout is left exactly as it was.
2026-08-01 10:12:25 -03:00
Gustavo 0894ab68b3 Ignore .worktrees/ directory 2026-08-01 10:09:32 -03:00
Gustavo 3ce12381d5 Add implementation plan for campaign outreach subsystem port
11-task TDD plan covering schema migration, campaign store, candidate
selection/queue, health metrics, send worker, scheduler, HTTP routes and
the Campanhas UI tab.
2026-08-01 10:08:07 -03:00
Gustavo 2195b3f2b1 Add design doc for campaign outreach subsystem port
Ports the Máquina Comercial Pessoal's campaign methodology (queue/preview/
approval, A/B/C variants, weekly limit escalation, health-based auto-pause,
stage classification, appointment scheduling), adapted for the Z-PRO/WABA
send layer and a dynamic operator-defined catalog instead of a hardcoded one.
2026-08-01 09:47:49 -03:00
DESKTOP-F2O4A80\UserandClaude b8d10b210c Commit inicial: GTI Maquina Comercial
App local (Node + SQLite) para captura, tratamento e exportacao de leads
comerciais, com dashboard de gestao, login/usuarios e integracao Z-PRO.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 14:22:21 -03:00