Skip to content

feat: add evolution-go provider support + design-system UI refactor#26

Open
nickoliveira23 wants to merge 3 commits intoEvolutionAPI:developfrom
nickoliveira23:feat/provider-go
Open

feat: add evolution-go provider support + design-system UI refactor#26
nickoliveira23 wants to merge 3 commits intoEvolutionAPI:developfrom
nickoliveira23:feat/provider-go

Conversation

@nickoliveira23
Copy link
Copy Markdown

Summary

Two related changes that together let the manager talk to either evolution-api or evolution-go while modernizing the UI:

1. Evolution-go provider support (b0cb59a)

  • Provider abstraction (api | go) selected at login, persisted in localStorage.
  • Auth split per provider: api → /verify-creds, go → /server/ok.
  • Dispatcher pattern in src/lib/queries/* routes each hook to src/lib/queries/go/ when the active provider is go. GO adapters cover instance (list/info/create/connect/pair/restart/logout/delete/advanced-settings), proxy, and webhook, with shape translation between GO responses and v2's Instance/Settings types.
  • Feature-flag table (src/lib/provider/features.ts) + ProtectedRoute gating; sidebar and router hide modules GO doesn't support (Chat, Websocket, RabbitMQ, SQS, 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 for GO event list (14 events incl. SEND_MESSAGE); byEvents/base64/enabled toggles hidden.
  • Proxy page adapted: enabled hidden; host+port presence drives save vs delete.
  • Dashboard list polls every 5s on GO (matches go-manager UX).
  • Fix: axios interceptor now uses headers.has() so explicit apikey headers aren't silently overwritten.

2. UI/UX refactor with @evoapi/design-system (6ef1fe3)

  • Migrate to Tailwind v4 and @evoapi/design-system, adopting the evo-crm-community identity across layout, sidebar, dashboard, chat, and instance screens.
  • IntegrationGuard fallbacks for disabled backend features.
  • Local forwardRef wrappers (Dialog/Input/Textarea) to bypass design-system ref warnings.
  • Skip-4xx retry logic in React Query.
  • Full i18n coverage for chat dates, Go-specific modals, data-table placeholders, and header/sidebar labels across pt-BR, en-US, es-ES, fr-FR.

3. Chore (bb4cdfd)

  • Ignore alternate lockfiles (pnpm-lock.yaml, yarn.lock, bun.lockb); project stays on npm.

Test plan

  • Login with api provider → existing flows unchanged (instance CRUD, chat, integrations, webhook, websocket, rabbitmq, sqs).
  • Login with go provider → only GO-supported modules visible in sidebar.
  • GO: create instance → QR code renders, pairing code input works, polling stops on connect.
  • GO: webhook page shows only 14 GO events; save/delete flows work.
  • GO: proxy save with host+port → persists; empty host → delete path.
  • GO: send message modal delivers via /send/text.
  • i18n: switch between pt-BR / en-US / es-ES / fr-FR on dashboard, chat, header, sidebar — no raw keys visible.
  • Tailwind v4 migration: no visual regressions on layout/sidebar/cards.

nickoliveira23 and others added 3 commits April 17, 2026 16:06
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.
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.

Sorry @nickoliveira23, your pull request is larger than the review limit of 150000 diff characters

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.

1 participant