Commit Graph
235 Commits
Author SHA1 Message Date
Baptiste Arnaud fa2e2e92f4 Disable daily churn analysis cron
Create Tag / create-tag (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
2026-07-04 09:35:25 +02:00
Baptiste ArnaudandGitHub b86864ca60 🐛 Improve expired data cleanup reliability (#2536)
Create Tag / create-tag (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
Monthly job / clean (push) Has been cancelled
- Reduces expired chat session delete chunks to keep cleanup
transactions smaller.
- Forces old chat session lookups to use the primary database before
deletion.
- Adds structured progress, timing, and error logging to expired data
cleanup steps.
2026-06-24 18:38:42 +02:00
Baptiste ArnaudandGitHub 3db24c49bd 👌 Configure WhatsApp webhook forwarding URL (#2529)
- Adds a WhatsApp webhook forwarding URL field directly in the deploy
UI.
- Moves forwarding enablement to an explicit "Forward webhooks" switch
and keeps forwarded events independent from that switch.
- Normalizes legacy URL-only settings through Zod while preserving
explicit disabled configs.
- Restricts forwarding URLs to HTTP(S) and aligns the production update
script with the shared schema.
- Flushes debounced URL inputs on blur and covers legacy, disabled,
empty-event, and invalid-protocol cases in tests.
2026-06-17 15:56:16 +02:00
Baptiste ArnaudandGitHub 5861031f72 🔧 Add WhatsApp status forward URL update script (#2496)
- Add a production script to update the WhatsApp status webhook forward
URL on draft and published typebot settings.
- Register the script in `@typebot.io/scripts` and add the settings
project reference needed for typechecking.
- Ignore local `typebot-prod-db` skill folders for agent tooling.
2026-05-21 11:29:55 +02:00
6f289f647f 🔒️ Upgrade vulnerable deps (ai v5, nodemailer v8, otel sdk-node 0.217) (#2491)
## Summary

Fixes 18 open Dependabot alerts and migrates affected code to the new
major versions:

- `@opentelemetry/sdk-node` → `^0.217.0` (Prometheus exporter DoS,
GHSA-q7rr-3cgh-j5r3)
- `nodemailer` → `^8.0.5` across all manifests + root override
(GHSA-vvjj-xcjg-gr5g, GHSA-c7w3-x93f-qmm8)
- `ai` → `^5.0.52` (GHSA-rwvc-j5jr-mgvh); legacy 3.x dep removed from
`packages/deprecated/legacy` and replaced with a small in-tree
`OpenAIStream` + `StreamingTextResponse` shim
- Provider SDKs aligned to v5 peer: `@ai-sdk/openai`, `anthropic`,
`groq`, `mistral`, `perplexity`, `deepseek`, `togetherai`, `openRouter`,
`dify-ai-provider`

### AI SDK v4 → v5 migration

- `parseTools`: `parameters` renamed to `inputSchema`
- `runChatCompletion` / `runChatCompletionStream`: `maxSteps` replaced
by `stopWhen(stepCountIs(maxSteps))`;
`usage.{prompt,completion,total}Tokens` replaced by
`totalUsage.{input,output,total}Tokens`
- New `toLegacyDataStream` helper that re-emits the v4 data-stream
protocol (`0:text`, `3:error`, `9:tool_call`, …) so existing consumers
in `embeds/js` and the OpenAI `askAssistant` / `askModel` handlers keep
working
- `compatibility: "strict"` removed from `createOpenAI` (option dropped
in v5)
- `formatDataStreamPart` / `processDataStream` imports moved to
`@ai-sdk/ui-utils` (legacy package pinned at 1.2.11)

### E2E test follow-up

Second commit fixes Playwright tests that broke once the env-resolved
URLs / new SDK surface kicked in:
- `fileUpload`: assert exported URL contains `parseS3PublicBaseUrl()`
(not `S3_ENDPOINT`) so it works with `S3_PUBLIC_CUSTOM_DOMAIN`; verify
post-deletion via cache-busted `request.get` instead of a CDN-cached new
tab.
- `ssrf`: assert on the actual "Security validation failed" log emitted
by the pre-flight check; fixture now maps `response.statusCode` into a
`Status` variable so `Status: …` assertions resolve.
- Root `dev` script includes `@typebot.io/partykit` so the webhook
listener e2e test can hit PartyKit on `:1999`.

Also fixes a pre-existing broken anchor link in `whatsapp-ai-agent.mdx`
that blocked the landing-page link checker.

## Test plan

- [ ] `bunx nx test` passes
- [ ] `bunx nx typecheck` passes
- [ ] `bunx nx affected -t
format-and-lint,lint-repo,check-broken-links,test --parallel=4` passes
(pre-commit)
- [ ] `bun run dev` boots builder, viewer, workflows **and** PartyKit
- [ ] Viewer Playwright suite: `fileUpload.spec.ts`, `ssrf.spec.ts`,
`webhookListener.spec.ts` all green
- [ ] Manual smoke: OpenAI `askAssistant` block streams correctly in the
embed (v4 data-stream protocol preserved)
- [ ] Manual smoke: Anthropic / Mistral / Groq blocks still execute
end-to-end
- [ ] Manual smoke: send a test email through a workspace SMTP block
(nodemailer v8)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-19 16:30:36 +02:00
85eb843c42 🐛 Fix monthly cron tx timeout when deleting archived typebots (#2481)
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
- Delete archived results in batches of 500 before
`prisma.typebot.deleteMany` to avoid Prisma cascade wrapping the entire
delete in a single Vitess transaction that exceeds the max duration
- Use `prisma.$primary().result.findMany` for the batch lookup so read
replica lag does not exit the loop while results still exist on primary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-01 10:26:12 +00:00
Baptiste Arnaud 30e071da71 🔧 Fix cleanArchivedData script performance
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
2026-04-02 10:06:00 +02:00
Baptiste Arnaud cb2430ba84 🔧 Move to typebot.com 2026-03-26 17:10:02 +01:00
Baptiste Arnaud acd2f2971b 🔧 Remove "baseUrl": "." from tsconfigs 2026-03-25 16:40:12 +01:00
Baptiste Arnaud 6b8456b5bc 🐛 Force tsx scripts to use package tsconfig 2026-03-19 14:46:23 +01:00
Baptiste Arnaud 27aad0931d 🔧 Add custom nx-ignore command 2026-03-19 11:27:30 +01:00
Baptiste Arnaud a9b2af116d 🐛 Fix code scanning findings 2026-03-19 10:21:03 +01:00
Baptiste ArnaudandGitHub c2b251c7e5 ♻️ Migrate to NX (#2418) 2026-03-18 15:29:32 +00:00
Baptiste Arnaud d1e2781caf 🔧 Migrate biome rules: interactive semantics checks 2026-03-17 14:50:16 +01:00
Baptiste Arnaud 14ec3a2598 🔧 Enable PR2 Biome rules and mechanical autofixes 2026-03-13 11:46:28 +01:00
Baptiste Arnaud d48de8289d 🔧 Update inspectUser script to use production environment by default with SKIP_ENV_CHECK set 2026-02-24 18:13:41 +01:00
Baptiste Arnaud dd10f4caa8 🐛 Fix transcript replay when using reply event 2026-02-24 16:34:00 +01:00
Baptiste Arnaud 6c2f3bf826 🔧 Update scripts update and inspect bot script env management 2026-02-19 10:59:22 +01:00
Baptiste ArnaudandGitHub ae5ea1f328 🔧 Fix Prisma scripts and refresh dependencies (#2389)
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
- Update workspace dependencies across apps and packages to align with
new lint/Effect expectations
- Adjust Prisma scripts and configs (db push, studio, adapters, read
replicas) for the latest CLI flags and tracing helpers
- Refresh generated locks and helper modules (emails, bot engine,
telemetry, rich text, scripts)
2026-02-12 12:45:01 +01:00
Baptiste Arnaud 5e0de89911 🔧 Add forward WA errors and campaign statuses option 2026-02-11 16:46:35 +01:00
Baptiste Arnaud 30ddd69a9c 🔧 Improve logging in daily job 2026-02-02 17:41:46 +01:00
Baptiste Arnaud 31c9a1e26f 🔧 Remove biome "noImplicitAnyLet" mute 2026-01-29 15:00:51 +01:00
Baptiste Arnaud 8210b3c64b 🐛 Fix daily cron job typecheck failing 2026-01-20 19:13:00 +01:00
Baptiste ArnaudandGitHub 80db9565cd ♻️ Upgrade to Zod v4 (#2355) 2026-01-19 10:51:20 +01:00
Baptiste Arnaud ff728400d9 🔧 Upgrade bun and fix workflows ci 2026-01-16 13:22:27 +01:00
Baptiste Arnaud 69efa2f3c9 🚑️ Fix app router automatically adding transfer-encoding: chunked header to backend requests
Fixes #2336
2026-01-11 21:47:24 +01:00
Baptiste Arnaud b0326406f8 🛂 Automatically detect and take down abusing workspace usage 2026-01-08 16:10:21 +01:00
Baptiste Arnaud d99a858cd0 💚 Fix CI not sending email due to React not defined 2026-01-08 15:23:47 +01:00
Kathryn SchutteandGitHub 217e18bc59 🔨 Add workspace summary agent script (#2332) 2026-01-08 10:21:26 +01:00
Baptiste Arnaud 0ffe0d51fe 🔧 Add react in scripts deps 2026-01-07 18:55:23 +01:00
Baptiste Arnaud 82d6b2ff41 🔧 Update scripts tsconfig to include .tsx files 2026-01-07 17:21:36 +01:00
Baptiste Arnaud 445ae3061f ♻️ Simplify last hour results query to return active typebot IDs 2026-01-06 18:32:59 +01:00
Baptiste Arnaud 069923e2e8 🔧 Fix low spender detection for churn agent
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2026-01-06 10:18:36 +01:00
Baptiste Arnaud 81ac192886 🔧 Optimize hourly results check to only process active typebots 2026-01-05 21:30:02 +01:00
Baptiste Arnaud 48b86634b6 🗃️ Track last activity date on published typebots 2026-01-05 19:44:41 +01:00
Baptiste Arnaud 1a011ada64 🔧 Make churn agent messages more concise for low-value customers
Add conditional formatting to exclude timeline and email suggestions for workspaces with less than $100 in total spend, reducing noise in Discord notifications while maintaining full details for higher-value customers.
2026-01-05 10:34:38 +01:00
Baptiste Arnaud e5b53b3572 🔧 Improve getLastHourResults query performance 2026-01-02 21:51:08 +01:00
Baptiste Arnaud 1baaf73c9e 🐛 Remove redundant error handling in getLastHourResults function 2026-01-02 18:02:16 +01:00
Baptiste Arnaud 3d649886c2 ♻️ Refacto viewer server handler to oRPC 2025-12-17 18:00:20 +01:00
Baptiste Arnaud 506435ffa6 🔧 Improve churn agent snapshot instructions 2025-12-12 11:24:25 +01:00
Baptiste Arnaud 68d40230c7 🔧 Improve churn agent email instructions
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-12-09 08:39:16 +01:00
Baptiste Arnaud 48cdd3b6cd 🚸 Add confirm dialog before plan upgrade with existing customer 2025-12-08 19:06:48 +01:00
Baptiste Arnaud 4920849c10 🐛 (churn summary): Fix workspace out of memory query issue 2025-11-27 15:37:44 +01:00
Baptiste Arnaud dd82c4d318 ♻️ Migrate to Bun test 2025-11-27 12:08:31 +01:00
Baptiste Arnaud c9d2fb36c6 ⬆️ Upgrade bun 2025-11-27 11:21:57 +01:00
Baptiste Arnaud 34f2e2c43b 🐛 FIx streamAllResultsToCsv initial query not performant on large dataset
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-11-20 08:52:45 +01:00
Baptiste Arnaud 415ef925c9 🔧 Adjust email campaign script 2025-11-19 10:53:20 +01:00
Baptiste Arnaud d17b232a86 🔧 (scripts) Send daily report notification on Discord 2025-11-19 10:25:43 +01:00
Baptiste Arnaud 06accf5cd9 🔧 Churn agent improvement: guess subscription reason 2025-11-18 14:38:52 +01:00
Baptiste Arnaud 794b576754 🔧 Reduce chat session delete batch 2025-11-14 14:53:25 +01:00