Skip to content

[pull] main from tldraw:main#294

Merged
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main
Nov 29, 2025
Merged

[pull] main from tldraw:main#294
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Nov 29, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

MitjaBezensek and others added 2 commits November 29, 2025 16:09
Changes:

- New DB table: `paddle_transactions` tracks all Paddle webhook events
for audit/debugging
- Idempotent webhooks: Duplicate events ignored via `eventId` uniqueness
constraint
- Error handling: Distinguishes expected vs unexpected failures, fails
webhook appropriately for
  Paddle retries
- Discord notifications: Success, error, refund, and missing `userId`
alerts
- DB transaction reuse: Refactored upsertFairyAccess to accept DB
connection, renamed wrapper to
  grantFairyAccessWithDb
- Critical path: Fairy access grant is critical - webhook fails if it
fails so Paddle retries
  - 
### Change type

- [x] `other`

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds robust Paddle webhook handling with DB-backed idempotency/logging
and refactors fairy-access upsert to reuse a provided DB connection.
> 
> - **Payments (Paddle Webhooks)**:
> - Add `paddle_transactions` table with indexes to log events, enforce
idempotency (`eventId`), and track processing/errors.
> - Implement signature verification, event parsing, and per-event row
lock (`FOR UPDATE`) to prevent concurrent handling.
> - Process `transaction.completed` by granting fairy access via
`upsertFairyAccess(..., db)`; mark processed or store errors.
> - Send Discord notifications for success, errors,
refunds/cancellations, and missing `userId`.
> - **Admin/Invites**:
> - Refactor `upsertFairyAccess` to accept a DB; add wrapper
`upsertFairyAccessWithDb` and update routes (`grant/remove/enable` and
invite redemption) to use it.
> - **Schema/Migrations**:
>   - Add `TlaPaddleTransaction` to shared types and `DB` mapping.
> - New migration `028_add_paddle_transactions.sql` creating table and
indexes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c7fb36e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Describe what your pull request does. If you can, add GIFs or images
showing the before and after of your change.

### Change type

- [ ] `bugfix`
- [ ] `improvement`
- [ ] `feature`
- [ ] `api`
- [x] `other`

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
9dcd1cd. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Nov 29, 2025
@pull pull Bot added the ⤵️ pull label Nov 29, 2025
@pull pull Bot merged commit 5fa7343 into code:main Nov 29, 2025
@pull pull Bot had a problem deploying to deploy-staging November 29, 2025 21:13 Failure
@pull pull Bot had a problem deploying to deploy-production November 29, 2025 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging November 29, 2025 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging November 30, 2025 00:26 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants