Skip to content

Commit 8940b13

Browse files
Add fairies feature flag, improve invites, update sales page. (tldraw#7234)
Add fairy feature flags and invite system: - Feature flag system (fairies_enabled, fairies_purchase_enabled) with admin UI - Update pricing page with Paddle payment integration - Fairy invite flow should work for signed out users, redirects them after sign in - Redirect to home when fairy flags disabled - Admin page for toggling feature flags - Extract payment logic from sidebar to reusable usePaddle hook - Add descriptions and reddemedby to fairy invites. ### Change type - [x] `other` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds KV-backed feature flags (fairies, fairies_purchase) with admin controls, gates UI/DO/routes, enhances fairy invites (description/redeemedBy, signed-out flow), and centralizes Paddle checkout used on pricing and sidebar. > > - **Feature Flags (global)**: > - Add KV-backed flags `fairies` and `fairies_purchase` with `/app/feature-flags` API and polling `FeatureFlagsFetcher` + `useFeatureFlags`. > - Gate client hooks (`useFairyAccess`), UI (sidebar/purchase/pricing), and DO `/fairy/has-access` + invite redemption by flags. > - **Checkout / Pricing**: > - Extract Paddle integration to `usePaddle` and use in pricing page and sidebar link. > - Pricing page: sign-in redirect (`redirect-to`), conditional button labels, deep-link checkout via `?checkout=true`. > - **Fairy Invites**: > - Add `description` and `redeemedBy` tracking (DB migration) and show in Admin table; include description on create. > - Signed-out invite flow stores token and triggers sign-in, then processes via root handler. > - **Admin**: > - New Feature Flags section (toggle flags) and updated Fairy Invites management (grant/remove access unified, description input, copy link). > - **Backend/Worker**: > - New feature flag utils (get/set, defaults by env), admin routes for flags, worker route exposure, KV bindings in wrangler. > - **i18n/UI**: > - Add strings for “Home”, “Start your fairy adventure”, “Your fairies are waiting for you! →”. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bc78b6f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 3c6e62d commit 8940b13

24 files changed

Lines changed: 840 additions & 249 deletions

File tree

apps/dotcom/client/public/tla/locales-compiled/en.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"value": "Accept invitation"
1212
}
1313
],
14+
"01d61b2012": [
15+
{
16+
"type": 0,
17+
"value": "Start your fairy adventure"
18+
}
19+
],
1420
"03b3e13197": [
1521
{
1622
"type": 0,
@@ -945,6 +951,12 @@
945951
"value": "Check your email for a verification code."
946952
}
947953
],
954+
"8cf04a9734": [
955+
{
956+
"type": 0,
957+
"value": "Home"
958+
}
959+
],
948960
"8eb2c00e96": [
949961
{
950962
"type": 0,
@@ -1559,6 +1571,12 @@
15591571
"value": "Legal summary"
15601572
}
15611573
],
1574+
"e2b0147fd2": [
1575+
{
1576+
"type": 0,
1577+
"value": "Your fairies are waiting for you! →"
1578+
}
1579+
],
15621580
"e3afed0047": [
15631581
{
15641582
"type": 0,

apps/dotcom/client/public/tla/locales/en.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"00b177e080": {
66
"translation": "Accept invitation"
77
},
8+
"01d61b2012": {
9+
"translation": "Start your fairy adventure"
10+
},
811
"03b3e13197": {
912
"translation": "Drag the file into the sidebar on this page. Or select the 'Import file' option from the user menu."
1013
},
@@ -422,6 +425,9 @@
422425
"8c2d3d730c": {
423426
"translation": "Check your email for a verification code."
424427
},
428+
"8cf04a9734": {
429+
"translation": "Home"
430+
},
425431
"8eb2c00e96": {
426432
"translation": "Shared with you"
427433
},
@@ -672,6 +678,9 @@
672678
"e2ae80a510": {
673679
"translation": "Legal summary"
674680
},
681+
"e2b0147fd2": {
682+
"translation": "Your fairies are waiting for you! →"
683+
},
675684
"e3afed0047": {
676685
"translation": "Admin"
677686
},

0 commit comments

Comments
 (0)