Commit Graph

372 Commits

Author SHA1 Message Date
マーティンズJR
53e90c497d
fix the button position close in modal (#2476)
Some checks failed
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
Monthly job / clean (push) Has been cancelled
When clicking on an image in the chat preview/runtime, the X button to
close the modal appeared misplaced outside the correct area. This
happened because the button was positioned with `position: fixed`,
remaining stuck to the entire page viewport instead of being inside the
modal/chat container.

before:
<img width="490" height="542" alt="image"
src="https://github.com/user-attachments/assets/ed17cf29-6397-46c7-9779-01aec89c3c5b"
/>

after:
<img width="502" height="523" alt="image"
src="https://github.com/user-attachments/assets/8ac64782-6af4-4417-bad1-971450e0f66c"
/>

---------

Co-authored-by: Baptiste Arnaud <baptiste@typebot.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 08:58:46 +00:00
Baptiste Arnaud
d3c15f32c8
🐛 Handle GA script load failure to prevent bot from hanging (#2446)
## Summary
- Add `script.onerror` handler in `initGoogleAnalytics` so the promise
resolves even when the GA script fails to load (ad blockers, network
errors), preventing the bot from hanging indefinitely.
- Bump `@typebot.io/js` and `@typebot.io/react` versions to `0.10.2`.

## Test plan
- [ ] Enable a Google Analytics integration block in a bot
- [ ] Block `googletagmanager.com` (e.g. via ad blocker) and verify the
bot still loads
- [ ] Check that `"Failed to load Google Analytics script"` appears in
the console

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

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:18:57 +02:00
Baptiste Arnaud
2c3fc7267a
🐛 Fix stored XSS via javascript: URI in bubble links (GHSA-hqmv-v56g-4m47) (#2435)
## Summary
- Fix stored XSS vulnerability where `javascript:` URIs in text bubble
links, image click links, and toast popup links could execute arbitrary
JS in visitors' browsers
- Add `sanitizeUrl` utility that allowlists only `http:`, `https:`,
`mailto:`, and `tel:` protocols
- Add explicit `typecheck` Nx targets for `builder` and `viewer`
(Next.js projects don't get one inferred by `@nx/js/typescript`)
- Bump `@typebot.io/js` and `@typebot.io/react` to `0.10.1`

## Test plan
- [ ] Create a bot with a text bubble link set to `javascript:alert(1)`
and verify it renders as `#`
- [ ] Same test with an image click link
- [ ] Verify normal `https://` links still work
- [ ] Run `bunx nx typecheck builder` and `bunx nx typecheck viewer`

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:46:09 +02:00
Baptiste Arnaud
cc9839f2e7
🔧 Migrate S3 uploads from presigned POST to presigned PUT (#2429)
## Changes

- **Presigned POST → PUT**: Replace `generatePresignedPostPolicy` with
`generatePresignedPutUrl` across all upload endpoints (builder + viewer
v1/v2/v3). This makes uploads compatible with Cloudflare R2 which
doesn't support the S3 POST Object API. Frontend consumers now use `PUT`
with raw file body + `Content-Type`/`Cache-Control` headers instead of
`POST` with FormData.
- **XSS mitigation**: Block dangerous content types (SVG, HTML, XML, JS)
in the builder `generateUploadUrl` endpoint. Restrict frontend `accept`
attributes from `image/*` to an explicit list of safe raster types
(`png, jpeg, gif, webp, avif, bmp, tiff`). Addresses
GHSA-jj87-c343-26vp.
- **Fix file upload URL validation**: `isURL` with `require_tld: true`
rejected `localhost` and `NEXTAUTH_URL` proxy URLs for private files.
Now uses a trusted host allowlist (`localhost`, `NEXTAUTH_URL`,
`S3_PUBLIC_CUSTOM_DOMAIN`) to skip TLD requirement.
- **Docs**: Update S3 CORS policy from `POST` to `PUT`, add Cloudflare
R2 to supported providers list.
- **Bump**: `@typebot.io/js` and `@typebot.io/react` → `0.10.0`

## Verification

- Tested avatar upload on builder with R2 bucket (PUT succeeds, image
displays)
- Verified CORS preflight passes after R2 bucket config
- Confirmed `generateUploadUrl` rejects `image/svg+xml` with 400
- All unit tests pass (`nx affected -t test`)
- Typecheck passes on all affected packages

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:34:35 +02:00
Baptiste Arnaud
acd2f2971b
🔧 Remove "baseUrl": "." from tsconfigs 2026-03-25 16:40:12 +01:00
Baptiste Arnaud
62e5bf639d
🐛 Fix builder preview AI streaming 2026-03-25 08:51:43 +01:00
Baptiste Arnaud
ece99ba625
♻️ Move editable components to shared UI package 2026-03-24 16:48:49 +01:00
Baptiste Arnaud
78da6fa4d3
🐛 Fix embeds crash (importing external modules) 2026-03-24 15:16:46 +01:00
Baptiste Arnaud
474ecbf46b
🐛 Fix XSS possible on Rating and file upload inputs 2026-03-23 18:08:08 +01:00
Baptiste Arnaud
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
7c519587f0
🔧 Bump embeds package versions to 0.9.20 2026-02-16 15:56:55 +01:00
Baptiste Arnaud
5e0de89911
🔧 Add forward WA errors and campaign statuses option 2026-02-11 16:46:35 +01:00
Baptiste Arnaud
e3a310e014
🐛 Fix BubbleButton color resolution
Closes #2378
2026-01-29 16:53:09 +01:00
Baptiste Arnaud
1fb2ab3ede
🐛 Fix typing bubble animation transform value
Fixed incorrect translateY value in chat bubble animation that was causing visual glitches in the typing indicator. Fixes #2331
2026-01-05 11:31:32 +01:00
Baptiste Arnaud
0b14a21b37
⬆️ Upgrade Next.js and react 2025-12-12 10:28:27 +01:00
Baptiste Arnaud
7014069f5f
⬆️ Upgrade Next.js and react 2025-12-07 08:58:27 +01:00
Baptiste Arnaud
6a02a5b919
⬆️ Upgrade to React 19
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-12-01 16:42:23 +01:00
Baptiste Arnaud
d48c9b458e
💄 (bot) Add border to cards 2025-11-28 09:43:55 +01:00
Baptiste Arnaud
dd82c4d318
♻️ Migrate to Bun test 2025-11-27 12:08:31 +01:00
Baptiste Arnaud
a68f0c9179
🔒️ Restrict client code execution on imported bot 2025-11-18 17:54:19 +01:00
Baptiste Arnaud
c823aba3db
🚑️ (embed) fix scroll issue on some Safari version
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-11-14 18:25:23 +01:00
Baptiste Arnaud
d3347cb346
🐛 (embed) Fix button border thickness
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-11-13 17:17:23 +01:00
Baptiste Arnaud
adbeb85c03
🐛 (embed) Fix size issues for custom html font-size 2025-11-13 12:03:25 +01:00
Baptiste Arnaud
fb57698b94
🐛 (embed) Fix tailwind variables not applied to shadow DOM 2025-11-12 17:16:10 +01:00
Baptiste Arnaud
d3f91195a8
🐛 Fix transcript compute stopping at Cards input 2025-11-12 16:16:05 +01:00
Baptiste Arnaud
0250ff8b64
💄(embed) fix button cursor
Closes #2306
2025-11-12 09:14:05 +01:00
Baptiste Arnaud
8a95e2821d
🚑️ Fix invalid chat container class names 2025-11-12 09:07:50 +01:00
Baptiste Arnaud
2f88749043
💄 (embed) Fix popup overlay color transparency 2025-11-12 08:54:38 +01:00
Baptiste Arnaud
e1f75652b2
🚑️ Fix opacity-1 invalid className 2025-10-30 08:51:56 +01:00
Baptiste Arnaud
3d397601f7
♻️ Upgrade to Tailwind v4 2025-10-29 19:04:59 +01:00
Baptiste Arnaud
489493b376
🐛 (bot) Fix crash when continue message richText is empty 2025-10-06 14:44:21 +02:00
Baptiste Arnaud
9688a297ad
🔧 Revert to carret version pinning 2025-10-03 10:51:27 +02:00
Baptiste Arnaud
5ed6051099
🐛 (bot) fix some emojis that were not detected for avatar 2025-10-02 09:53:52 +02:00
Baptiste Arnaud
70e6f4d5c7
🐛 Fix link not showing in Text bubble
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-22 11:06:59 +02:00
Baptiste Arnaud
b52bb39352
🐛 Include submitInput in Typebot global 2025-09-22 10:37:39 +02:00
Baptiste Arnaud
eb28b0b51c
Add submitInput embed command
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-18 10:08:08 +02:00
Baptiste Arnaud
282e4bdab7
🐛 Fix bot crash on second load in builder 2025-09-15 11:24:16 +02:00
Baptiste Arnaud
f8f9710bbd
🐛 Fix bot standard not initially loading 2025-09-15 10:48:33 +02:00
Baptiste Arnaud
765c4b2f8c
⬆️ Upgrade Plate
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-12 13:11:11 +02:00
Baptiste Arnaud
6ad0ad26c7
️ Revert sessionId reset on remembered state
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-09 15:15:12 +02:00
Baptiste Arnaud
e928987623
⬆️ Upgrade tooling
TS v5.9, Biome v2 + fixes
2025-09-09 10:32:38 +02:00
Baptiste Arnaud
f876415309
🧑‍💻 Add reset typebot embed command 2025-09-02 14:02:40 +02:00
Baptiste Arnaud
39c9033c69
🐛 Attempt to fix no camera option on file upload for Android users 2025-09-02 09:56:50 +02:00
Baptiste Arnaud
72a61047be
🐛 Update sessionId if user is remembered 2025-08-19 12:17:00 +02:00
Baptiste Arnaud
b8a487b92e
🐛 Fix embed continue chat and client log queries not following allowed origins config
Closes #2263
2025-08-18 11:06:27 +02:00
Baptiste Arnaud
8a69ff3665
🚸 Add new OpenAI, Mistral and Anthropic models
GPT-5, Opus 4.1, Mistral Medium
2025-08-12 12:03:56 +02:00
Baptiste Arnaud
bac1ee280e
🚸 (bot) Improve error message on failed file upload
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-07-24 11:52:24 +02:00
Baptiste Arnaud
541d744650
🐛 Fix bot avatar not displayed on streaming message 2025-07-07 16:50:19 +02:00
Baptiste Arnaud
06d82ad347
🐛 Fix network error toast showing up in some scenario even if no error was returned 2025-07-02 12:03:31 +02:00