Commit Graph

483 Commits

Author SHA1 Message Date
Baptiste Arnaud
a64e82b612
🐛 Fix unsafe upload URL generation (#2502)
- Replace direct browser presigned PUT uploads with signed Typebot
upload proxy URLs.
- Generate or validate upload object keys server-side while preserving
legacy v1/v2/v3 file-input upload contracts.
- Keep builder slot uploads stable for replaceable assets and use
generated names for runtime file uploads.
- Store active file-input MIME types as safe attachment downloads while
keeping safe image uploads inline.
- Update upload clients and docs to support both raw PUT proxy uploads
and form-data uploads.
2026-05-21 18:37:04 +02:00
Baptiste Arnaud
30682a258a
📝 Document status page and analytics completion criteria (#2480)
- Added a new "Is there a status page?" entry to the FAQ pointing to
status.typebot.io.
- Added a "Definitions" section to the analytics doc explaining Views,
Starts, Completions (no input remaining + at least one answer + no
pending client-side action expecting a dedicated reply) and the
per-block drop-off rate.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 11:10:10 +02:00
マーティンズ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
cf80f81f2c
🐛 Update WordPress embed default lib version from 0.3 to 0.x (#2438)
## Summary
- Update the default embed library version from `0.3` to `0.x` across
the WordPress plugin and builder instructions, so it auto-resolves to
the latest `0.x.x` via jsdelivr
- Update the lib_version validation regex to accept version ranges like
`0.x`

## Test plan
- [ ] Verify
`https://cdn.jsdelivr.net/npm/@typebot.io/js@0.x/dist/web.js` resolves
correctly
- [ ] Check WordPress admin panel shows `0.x` as default
- [ ] Verify builder Popup/Bubble instructions show `0.x` for cloud
users

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 10:24:39 +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
a9b2af116d
🐛 Fix code scanning findings 2026-03-19 10:21:03 +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
90ec449168
🔧 Refine cookie handling UI and embeds visuals 2026-03-17 14:50:16 +01:00
Baptiste Arnaud
97da0d632f
🐛 Fix script args validation when variables have non-numeric values
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
2026-03-13 15:37:36 +01:00
Baptiste Arnaud
14ec3a2598
🔧 Enable PR2 Biome rules and mechanical autofixes 2026-03-13 11:46:28 +01:00
Baptiste Arnaud
516b33b8a1
🔧 Enable PR1 Biome rules and prefer implicit undefined returns 2026-03-13 11:27:15 +01:00
Baptiste Arnaud
7c519587f0
🔧 Bump embeds package versions to 0.9.20 2026-02-16 15:56:55 +01:00
Baptiste Arnaud
be20e96447
🔧 Improve accessibility semantics across interactive controls 2026-02-13 15:33:45 +01:00
Baptiste Arnaud
d0f7075276
💅 Improve image alt text accessibility across builder and embeds 2026-02-13 11:03:37 +01:00
Baptiste Arnaud
e4077890df
🐛 Add explicit button types and enforce useButtonType lint rule 2026-02-13 10:50:49 +01:00
Baptiste Arnaud
156e895349
🔧 Enforce SVG title accessibility and remove linter override (#2396) 2026-02-13 09:11:40 +00:00
Baptiste Arnaud
f24873c764
🐛 Fix keyboard accessibility for clickable elements (#2397)
- Removed the `useKeyWithClickEvents` Biome override so keyboard parity
is enforced by default.
- Added keyboard activation (`Enter`/`Space`) plus focusability to
interactive non-semantic containers in builder, landing page, and
embeds.
- Replaced clickable image/provider cards with native `<button
type="button">` wrappers where possible (`UnsplashPicker`,
`PexelsPicker`, `GuestBubble`, and WhatsApp provider selection).
- Removed a debug-only clickable heading in `EmailRedirectPage` and
documented why `FolderButton` remains a `div` with `role="button"` due
to nested interactive controls.
2026-02-13 10:02:26 +01:00
Baptiste Arnaud
2e8cfb75d9
🔧 Enforce media caption lint with scoped ignores (#2395) 2026-02-12 15:18:51 +00:00
Baptiste Arnaud
e8fabf91ad
🔧 Add iframe titles and enable iframe a11y lint (#2393) 2026-02-12 15:05:51 +00:00
Baptiste Arnaud
6e25c8c766
🔧 Remove noAccumulatingSpread off rule (#2390) 2026-02-12 14:27:28 +00: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
31c9a1e26f
🔧 Remove biome "noImplicitAnyLet" mute 2026-01-29 15:00:51 +01:00
Baptiste Arnaud
aa9732da54
🔧 enforce assignment-safe linting (#2379)
This enforces Biome's no-assign-in-expressions rule and rewrites
offending spots. Turbo typecheck/test now participate in caching with
clearer output logs. Tooling versions and Prisma generate flags were
updated, plus minor doc/format tweaks.
2026-01-28 11:40:08 +01:00
Baptiste Arnaud
48b86634b6
🗃️ Track last activity date on published typebots 2026-01-05 19:44:41 +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