Skip to content

Integration: rebase #26 (provider GO + design-system) on develop with #14 features ported#27

Merged
DavidsonGomes merged 11 commits intodevelopfrom
integration/pr-26-rebase
May 6, 2026
Merged

Integration: rebase #26 (provider GO + design-system) on develop with #14 features ported#27
DavidsonGomes merged 11 commits intodevelopfrom
integration/pr-26-rebase

Conversation

@DavidsonGomes
Copy link
Copy Markdown
Member

Summary

Rebase de #26 (Nickolas — provider GO + design-system + i18n) sobre develop, com as melhorias de #14 (Matheus/Impa365 — filtros, ações em massa, paginação, envio real) re-aplicadas em cima do novo design-system. Substitui a #26.

Branch: integration/pr-26-rebase · 11 commits acima de develop.

Por que essa PR

A PR #26 estava CONFLICTING/DIRTY por causa de 8 conflitos com 84b2f15 (#14). Não dava para resolver mecanicamente — o #14 reescreveu Dashboard + 7× Sessions* (~4.861 linhas) usando o design-system antigo, enquanto a #26 migrou tudo para Tailwind v4 + @evoapi/design-system.

A escolha foi: rebase tomando --theirs nos 8 arquivos (versão #26) + port-forward manual das features do #14 sobre o design-system novo.

Conteúdo

Originais da #26 (preservados)

  • feat: add evolution-go provider support alongside evolution-api
  • feat: UI/UX refactor with @evoapi/design-system + full i18n pass
  • chore: ignore alternate lockfiles

Adicionados nesta integração

  • fix(types) — resolve 3 erros TS pré-existentes na feat: add evolution-go provider support + design-system UI refactor #26 (Chat realtime payload, Go proxy cache lookup) que impediam tsc -b de passar
  • port(dashboard) — re-aplica filtro por status (DropdownMenu com checkbox: all/close/connecting/open) usando o slot children do BaseHeader
  • port(openai-sessions) — piloto: filtros avançados (name/number/status/time + custom), ações em massa via tanstack RowSelectionState, paginação client-side (9/25/50/100 + show more/all/less), modal de envio real (POST /message/sendText). Mantém lazy load (enabled: open).
  • port(sessions) — replica o piloto nas outras 6 integrações: Dify, EvoAI, EvolutionBot, Flowise, N8N, Typebot
  • feat(test-interactive) — porta o test-interactive.js (vanilla, injetado via <script> no build do manager) para componente React. Modal com 5 abas (Reply/CTA/PIX/Lista/Carrossel) integrado ao design-system, trigger FlaskConical no InstanceCard (desabilitado quando instância não está open)
  • chore(sidebar) — docs apontam para docs.evolutionfoundation.com.br, link "Suporte Premium" removido
  • chore(login) — provider selector escondido (default api); mantido no DOM para preservar lógica do GO branch
  • chore(branding) — Home (GitHub/Website/Contact) e rodapé do Login apontam para domínios EvolutionFoundation (evolution-foundation/evolution-manager-v2, evolutionfoundation.com.br, suporte@evofoundation.com.br)

Lixo descartado do #14

  • Card "Debug Info" (instância/openaiId/sessions count + botão Refetch) — resíduo de desenvolvimento
  • console.log espalhados em Sessions*.tsx
  • Toggle "Show/Hide Available Bots" — função não documentada e descontinuada

Se algum desses for crítico para o time, abrimos issue separada.

i18n

Novo namespace compartilhado sessions.* (filters/mass/pagination/send) reutilizado pelas 7 páginas Sessions*. Novo namespace testInteractive.* para o modal de teste. Tudo traduzido em pt-BR / en-US / es-ES / fr-FR.

Validação

  • tsc -b && vite build verde
  • eslint 0 errors (3 warnings pré-existentes em integration-disabled.tsx, EmbedColorsContext.tsx, EmbedInstanceContext.tsx)
  • ✅ JSON dos 4 idiomas validados (JSON.parse)
  • ✅ Smoke test manual local

Test plan

  • Login com provider api → fluxos existentes (instance CRUD, chat, integrações, webhook, websocket, rabbitmq, sqs)
  • Login com provider go (precisa habilitar o select escondido no Login/index.tsx ou setar localStorage.provider=go) → módulos GO-only no sidebar
  • GO: criar instância → QR/pairing code; webhook (14 eventos GO); proxy save/delete; send message via /send/text
  • Dashboard: busca por nome + filtro de status
  • Sessions modal (cada uma das 7 integrações): filtros, mass actions, paginação, send message
  • Test Interactive (Dashboard, hover no card de instância open, clicar 🧪): Reply / CTA / PIX / Lista / Carrossel
  • i18n: trocar entre pt-BR / en-US / es-ES / fr-FR — sem chaves brutas visíveis

Encerra

cc @nickoliveira23 @impa365

nickoliveira23 and others added 11 commits May 6, 2026 14:33
Introduce a provider abstraction (api | go) so the manager can talk to
either evolution-api or evolution-go backends, selected at login time.

- Provider selector on Login page persisted via localStorage
- Auth verification split per provider (api: /verify-creds, go: /server/ok)
- Fixed axios interceptor to use headers.has() instead of property access,
  preventing explicit apikey headers from being silently overwritten
- Dispatcher pattern in src/lib/queries/* that routes each hook to the
  matching implementation under src/lib/queries/go/ when provider=go
- GO adapters for instance (list, info, create, connect, pair, restart,
  logout, delete, advanced-settings), proxy, and webhook, including
  shape translation between GO responses and v2's Instance/Settings types
- Feature-flag table (src/lib/provider/features.ts) + ProtectedRoute
  gating; sidebar/router hide modules unavailable on GO (Chat, Websocket,
  RabbitMQ, SQS, all API-exclusive integrations)
- Dedicated GO UI: GoNewInstance (name + optional token UUID + proxy),
  GoQrCodeModal (base64 image + polling + pairing code input),
  GoSendMessageModal (/send/text)
- Webhook page adapted: GO-specific event list (14 events incl.
  SEND_MESSAGE), byEvents/base64 hidden, enabled toggle hidden
- Proxy page adapted: enabled toggle hidden; host+port presence drives
  save vs delete
- Dashboard list polls every 5s for GO (matches go-manager UX)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Migrate to Tailwind v4 and the @evoapi/design-system package, adopting
the evo-crm-community identity across layout, sidebar, dashboard, chat,
and instance screens. Adds IntegrationGuard fallbacks for disabled
backend features, local forwardRef wrappers (Dialog/Input/Textarea) to
bypass design-system ref warnings, and skip-4xx retry logic in React
Query. Completes i18n coverage for chat dates, Go-specific modals
(send message, QR code, new instance), data-table placeholders, and
header/sidebar labels across pt-BR, en-US, es-ES, fr-FR.
- Chat/index.tsx: drop unused React import; cast realtime chat object since socket payload provides only a subset of ChatType fields
- go/proxy/fetchProxy.ts: tighten cache lookup guard to satisfy TS18048

Build: tsc -b && vite build clean.
Re-applies the status filter (DropdownMenu with checkbox items) from
commit 84b2f15 (Impa365) on top of the new design-system Dashboard.
Filter is rendered as BaseHeader children to keep the shared component
untouched. Uses existing i18n keys (dashboard.status, status.all/open/
connecting/closed) — no translation files modified.
Re-applies on top of the new design-system layout (commits 84b2f15 / #14):
- Advanced filters: name, number, status, time presets + custom (more/less than N min/h/days)
- Mass actions: row selection via tanstack RowSelectionState, bulk status change
- Client-side pagination: per-page selector (9/25/50/100), show more / show all / show less
- Send message modal: real POST /message/sendText/{instance} with apikey header
- Lazy load preserved (enabled: open) — fetch only when modal opens

Drops Matheus's Debug Info card and console.log noise.

i18n: introduces shared sessions.* namespace (filters/mass/pagination/send)
in pt-BR, en-US, es-ES, fr-FR — reused by all 7 Sessions* pages.
…ise/N8n/Typebot

Same pattern applied to all 6 remaining integrations (mechanical clone of
SessionsOpenai with hook/prop/i18n-prefix swap):
- Advanced filters (name, number, status, time + custom)
- Mass actions via tanstack RowSelectionState
- Client-side pagination (per-page selector + show more/all/less)
- Real send-message modal (POST /message/sendText)
- Lazy load preserved (enabled: open)

Reuses the shared sessions.* i18n namespace introduced in the OpenAI port.
Each file keeps its own integration-specific keys (dify.*/evoai.*/n8n.*/etc)
for the existing labels.
…React

The original lived as a vanilla `test-interactive.js` injected directly into
manager/dist/index.html — a hack that scanned the DOM with MutationObserver to
attach a button to each instance card. This port replaces it with a proper
React modal integrated with the design-system, dropping the FAB fallback and
the DOM scanning entirely.

- New TestInteractiveModal: 5 tabs (Reply / CTA / PIX / List / Carousel) with
  the Matheus templates pre-filled in editable JSON textareas
- Endpoints kept verbatim: POST /message/{sendButtons|sendList|sendCarousel}
- Trigger lives in InstanceCard footer (FlaskConical icon, disabled when the
  instance isn't 'open')
- i18n: testInteractive.* namespace in pt-BR / en-US / es-ES / fr-FR
…p Premium Support link

- Sidebar: documentation link now points at the new EvolutionFoundation
  docs domain; Premium Support entry removed (along with the orphaned
  LifeBuoy icon import).
- Footer: same docs URL update for consistency.
- i18n: drop sidebar.supportPremium key from pt-BR / en-US / es-ES / fr-FR.
Wraps the FormSelect in a hidden div instead of removing it — the field
stays mounted so react-hook-form keeps its default value ("api") and the
existing GO branch in handleLogin remains reachable if the field is ever
re-enabled.
- Login footer docs link → docs.evolutionfoundation.com.br
- Home GitHub card → github.com/evolution-foundation/evolution-manager-v2
- Home Website card → evolutionfoundation.com.br
- Home Contact card → mailto:suporte@evofoundation.com.br

Completes the docs/repo migration started in the sidebar/footer commit.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DavidsonGomes! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@DavidsonGomes DavidsonGomes merged commit 4933d08 into develop May 6, 2026
1 of 3 checks passed
@DavidsonGomes DavidsonGomes deleted the integration/pr-26-rebase branch May 6, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants