Commit Graph

118 Commits

Author SHA1 Message Date
VPS 4 Deploy Agent b97f7f94e4 feat: sistema de figurinhas, emoji PT-BR e preloader inteligente
- Stickers: captura automática por fileSha256 (Baileys) no MessageHandler,
  tabela Prisma 'stickers' com deduplicação por [tenantId, sha256],
  API REST /api/stickers (list + favorite toggle), cache IndexedDB permanente
  (sem TTL — conteúdo imutável), StickerPanel.tsx com abas Recentes/Favoritos
- Emoji picker: migrado de emoji-picker-react para @emoji-mart/react com
  locale="pt" (tradução completa: categorias, busca, mensagem de sem resultado)
- Preloader: aparece apenas em hard reload (F5/URL direta) via
  performance.getEntriesByType('navigation').type + sessionStorage flag,
  navegação client-side Next.js pula o overlay instantaneamente
- Avatar cache: Wasabi como storage persistente + IndexedDB client-side,
  avatar_version via MD5(avatarUrl) sem coluna extra no banco,
  rota /api/storage/view/* para servir arquivos Wasabi ao frontend

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:48:36 +02:00
VPS 4 Deploy Agent 2b9b855fc9 perf(inbox): cache de avatares no Wasabi e IndexedDB
Solução 3 — Wasabi:
- Após download do CDN do WhatsApp, faz upload fire-and-forget para
  Wasabi com path determinístico (avatars/{tenant}/{instance}/{jid}.jpg)
- Armazena o path relativo em contact.avatarUrl no banco
- Na próxima requisição, serve bytes direto do Wasabi sem tocar no CDN do WA
- Adiciona customPath em StorageUploadPayload e getBuffer() na interface
  StorageProviderInterface/StorageProviderRegistry e plugin

Solução 4 — IndexedDB:
- Backend expõe avatarVersion (MD5 curto do avatarUrl) no response /api/chats
- Campo propagado por chatStore → chatToLegacy → NewWhatsChat
- Hook useAvatarCache (IndexedDB nativo, sem deps) armazena dataUrl do avatar
  com chave jid:version — invalida automaticamente quando o avatar muda no banco
- Avatar.tsx serve do IndexedDB antes de disparar qualquer request HTTP;
  converte via canvas e persiste no IndexedDB na primeira carga bem-sucedida

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 16:02:08 +02:00
VPS 4 Deploy Agent cdc32aa9b3 chore(deploy): bump version 2026-05-11 09:44:35 +02:00
VPS 4 Deploy Agent 22891e1274 fix(listener): skip version-bump commits to prevent deploy loop
Parse Gitea webhook payload and skip the deploy when all commits
match 'chore(deploy): bump version'. This breaks the infinite cycle
where the deploy script's own version-bump push re-triggered a deploy,
causing repeated container restarts and 502 errors for users.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 09:42:40 +02:00
VPS 4 Deploy Agent a54b3f2b19 chore(deploy): bump version 2026-05-11 09:41:46 +02:00
VPS 4 Deploy Agent a7f4d6bc1e feat(preview): fix button layout and add mouse-following zoom
- Move close (X) button to far right, zoom button left of X
- File info (name + size) occupies the left of the top bar
- Zoom now follows the mouse cursor: transform-origin updates in
  real-time as the mouse moves, so 2.5× scale always magnifies
  the area under the pointer
- overflow-hidden on preview area keeps the scaled image contained

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 09:39:27 +02:00
VPS 4 Deploy Agent 310ba1aff6 chore(deploy): bump version 2026-05-11 09:24:14 +02:00
VPS 4 Deploy Agent 7b55354653 fix(send-media): use upsert to prevent P2002 duplicate messageId error
MessageHandler can insert the echo of a sent message before the HTTP
handler does — replace prisma.message.create() with upsert() so both
paths converge safely instead of crashing with a unique constraint error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 09:21:50 +02:00
VPS 4 Deploy Agent d7acd75bd5 chore(deploy): bump version 2026-05-11 09:15:45 +02:00
VPS 4 Deploy Agent 4d0b895c7e chore(deploy): bump version 2026-05-11 09:13:51 +02:00
VPS 4 Deploy Agent 949274e79b chore(deploy): bump version 2026-05-11 09:12:14 +02:00
VPS 4 Deploy Agent 7ec3d78be2 chore(deploy): bump version 2026-05-11 09:10:27 +02:00
VPS 4 Deploy Agent b0ac06e065 chore(deploy): bump version 2026-05-11 09:08:40 +02:00
VPS 4 Deploy Agent bbbc010945 chore(deploy): bump version 2026-05-11 09:06:59 +02:00
VPS 4 Deploy Agent 706fceabaf chore(deploy): bump version 2026-05-11 09:05:06 +02:00
VPS 4 Deploy Agent 875f31419e chore(deploy): bump version 2026-05-11 09:03:16 +02:00
VPS 4 Deploy Agent 918bce648c chore(deploy): bump version 2026-05-11 09:01:24 +02:00
VPS 4 Deploy Agent f83f1d9263 chore(deploy): bump version 2026-05-11 08:59:18 +02:00
VPS 4 Deploy Agent 80f8585a1f chore(deploy): bump version 2026-05-11 08:57:44 +02:00
VPS 4 Deploy Agent 16dbc40c8a chore(deploy): bump version 2026-05-11 08:56:09 +02:00
VPS 4 Deploy Agent 6f28d3da80 chore(deploy): bump version 2026-05-11 08:54:25 +02:00
VPS 4 Deploy Agent 2a9744762f chore(deploy): bump version 2026-05-11 08:52:45 +02:00
VPS 4 Deploy Agent bed15dd589 chore(deploy): bump version 2026-05-11 08:50:58 +02:00
VPS 4 Deploy Agent 4287b8c1d7 chore(deploy): bump version 2026-05-11 08:49:12 +02:00
VPS 4 Deploy Agent 811a9b9c65 chore(deploy): bump version 2026-05-11 08:47:38 +02:00
VPS 4 Deploy Agent b54c9fb066 chore(deploy): bump version 2026-05-11 08:45:58 +02:00
VPS 4 Deploy Agent 8253a038c6 chore(deploy): bump version 2026-05-11 08:44:13 +02:00
VPS 4 Deploy Agent c7d3701ea3 chore(deploy): bump version 2026-05-11 08:42:33 +02:00
VPS 4 Deploy Agent 2e8c59b3dd chore(deploy): bump version 2026-05-11 08:40:45 +02:00
VPS 4 Deploy Agent b2ad8a8e8b chore(deploy): bump version 2026-05-11 08:38:46 +02:00
VPS 4 Deploy Agent 9ab4b4068e chore(deploy): bump version 2026-05-11 08:37:01 +02:00
VPS 4 Deploy Agent 6bcfcab884 chore(deploy): bump version 2026-05-11 08:34:50 +02:00
VPS 4 Deploy Agent 45b7b91b04 fix(plugins): use conditional require for production Docker compatibility
Replace static require('backend/src/...') with NODE_ENV-conditional
requires in compiled plugin JS and TypeScript sources.
In production Docker /app/backend/src/ does not exist — only /app/dist/.
Fixes MODULE_NOT_FOUND errors on UnifiedStorageProvider, ext-api,
leads, nanobana, and uploads plugins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 08:34:34 +02:00
VPS 4 Deploy Agent 55d0ddb698 chore(deploy): bump version 2026-05-11 08:32:47 +02:00
VPS 4 Deploy Agent 0e220d1f4a chore(deploy): bump version 2026-05-11 08:30:40 +02:00
VPS 4 Deploy Agent f3d3d1afa5 chore(deploy): bump version 2026-05-11 08:28:42 +02:00
VPS 4 Deploy Agent c437d28c6b chore(deploy): bump version 2026-05-11 08:26:53 +02:00
VPS 4 Deploy Agent 78569125f8 chore(deploy): bump version 2026-05-11 08:24:59 +02:00
VPS 4 Deploy Agent c4304eb2d6 chore(deploy): bump version 2026-05-11 08:23:04 +02:00
VPS 4 Deploy Agent 946d85f236 chore(deploy): bump version 2026-05-11 08:21:13 +02:00
VPS 4 Deploy Agent d30fc440b3 chore(deploy): bump version 2026-05-11 08:19:21 +02:00
VPS 4 Deploy Agent 1e4fa361e4 chore(deploy): bump version 2026-05-11 08:16:53 +02:00
VPS 4 Deploy Agent f88326328f build(frontend): ignore typescript errors during build 2026-05-11 08:15:14 +02:00
VPS 4 Deploy Agent 17537249fd fix(inbox): FilePreviewModal via createPortal — full-screen real + zoom + melhorias visuais 2026-05-11 08:07:34 +02:00
VPS 4 Deploy Agent 8b3b368b56 feat(inbox): preview de arquivo estilo WhatsApp + delay no preloader para avatares 2026-05-11 07:56:40 +02:00
VPS 4 Deploy Agent 8015ee5233 fix(flow-builder): mover componentes para _components para evitar prerender do Next.js 2026-05-11 07:39:23 +02:00
VPS 4 Deploy Agent 97bbd79ef3 fix(inbox): preloader aparece desde o primeiro render até o primeiro load completar 2026-05-11 07:11:05 +02:00
VPS 4 Deploy Agent 28de4928e5 chore(deploy): bump version to v1.0.9 build #9 2026-05-11 05:51:36 +02:00
VPS 4 Deploy Agent 68e3e56279 fix(plugins): resolve UnifiedStorageProvider and ext-api imports dynamically for production dist 2026-05-11 05:32:45 +02:00
VPS 4 Deploy Agent 201594b5a1 fix(plugins): resolve leads and nanobana runtime imports dynamically for production dist compatibility 2026-05-11 05:28:55 +02:00