Commit Graph

378 Commits

Author SHA1 Message Date
Jimmy Domagala-Tang
bb5d90a332 Add usage quota to Workbench (#31782)
* feat: adding usage rate limiting to workbench and aligning editor context values for suggestionsLeft

* feat: prepend word token to headers of token rate limiter to prevent confusion with usage rate limiter

* Shared AI paywalls (#31948)

* feat: renaming hasPremiumSuggestion and adding token limits to editor context and project load

* feat: adding new ai features paywall component

* feat: rename getRemainingFeatureUses to token based naming for token based limiter, removed checking for feature usage on anonymous users, and removed guard on null userId since we shouldnt be calling getRemainingFeatureUses on a nonexistent user

* feat: using token rate limit headers to set token rate values in editor context

* feat: update workbench to be available without refreshing if rate limit reset occurs within session

* fix: move paywall out of inert section

* Hide new paywalls behind FF and open plans page on upgrade attempt (#32023)

* feat: hide new paywalls behind FF

* feat: update ai paywall buttons to navigate to plans page post quota plans change release

* feat: showing a fair limit notificaiton pre-quota change, and updating paywall to not fire if user has premium already (#32056)

GitOrigin-RevId: 565fb128d55543fea34c383bc4abeaa3dd148d09
2026-03-06 09:17:52 +00:00
Antoine Clausse
e87488899a [web] Add AI to plan features list (#31968)
* Add tooltip next to "Overleaf AI" row

* Add AI to features list

* Fix tests

* Revert changes which will be overwritten by https://github.com/overleaf/internal/pull/31993

* Add missing import (conflict with main)

GitOrigin-RevId: ce236670bd63701a3976a3eb84dc695ee0e928b1
2026-03-06 09:17:02 +00:00
MoxAmber
ebdb0b12cf Merge pull request #30007 from overleaf/as-user-management-ro
[web] Initial read-only user management page

GitOrigin-RevId: f50d2377b855e6541b30f8f946aecb59bf08e3bc
2026-03-06 09:08:20 +00:00
Antoine Clausse
0f0f97a8f6 [web] Add student checkbox on Standard plan (#31773)
* Remove plans-new.pug

* Add ol-localIndividualPlans and its types

* Add `getIndividualPlansInCurrency` util

* Add `ol-localIndividualPlans` to the pages

* Read prices from `localIndividualPlans`

* Add student checkbox

* Add `setupIndividualEduDiscount`

* Add data tags

* Update how original price is shown

* Show original price for monthly collaborator

* Make struck price conditionally invisible

* Unnest `.plans-new-edu-discount` so it applies to collaborator student checkbox

* Remove student column

* Update prices in groups to remove _plans_localized_price.pug

* Remove unused variables

* Reduce spacing above the student checkbox

* Fix tests

* Move show/hide struck price for Collaborator Monthly out of loop

* Fixup: Read prices from `localIndividualPlans`

* Fix checkbox vertical alignment

* Update services/web/frontend/stylesheets/pages/plans.scss

Co-authored-by: roo hutton <roo.hutton@overleaf.com>

* Adjust margin-top for student checkbox to -12px

* Disable autocomplete for education discount checkboxes

See https://github.com/overleaf/internal/issues/31798

---------

Co-authored-by: roo hutton <roo.hutton@overleaf.com>
GitOrigin-RevId: f329321fc860f30f4e8921e2e1b18bc55cfdeb7b
2026-03-06 09:07:54 +00:00
Jimmy Domagala-Tang
f96d37b7e3 Revert "Revert "[Web] Enable Quota System for AI Features"" (#31771)
* Revert "Revert "[Web] Enable Quota System for AI Features (#31544)" (#31767)"

This reverts commit f6589bdbf0ac7e71313739e3e3f4fb5bedd48c22.

* Update writefull entitlement syncing for commons (#31774)

* feat: update wf entitlement syncing logic

* feat: remove unused env variable, and parse quota tier as string for analytics

GitOrigin-RevId: 37ae7522a249501719a64327e2b6aaff01a3cc0b
2026-03-06 09:07:15 +00:00
Jimmy Domagala-Tang
892047fcf6 Revert "[Web] Enable Quota System for AI Features (#31544)" (#31767)
This reverts commit 17763447965aae5777053b783d2601517bfe6b12.

GitOrigin-RevId: f6589bdbf0ac7e71313739e3e3f4fb5bedd48c22
2026-02-24 09:07:06 +00:00
Jimmy Domagala-Tang
92463fb3e2 [Web] Enable Quota System for AI Features (#31544)
* feat: migrate from aiErrorAssist naming for disabling AI features to aiFeatures.enabled to avoid confusion

feat: keep aiErrorAssistant as setting on user object until migration is run

* feat: migrate writefull.enabled unset to instead use promotionSet false

* feat: updating to use quota based system for AI usage

* feat: hide relevant sections of quota system behind split test

* feat: ship onAiFreeTrial instead of free quota amount to project meta

* fix: renaming splitTestEnabledForUser to featureFlagEnabledForUser

* fix: v1_personal should have free trial amount of ai quota

* fix: onAiFreeTrial in projectController should account for anonymous users with no features

* feat: fixing marketing exports for ai quotas

* feat: update features epoch

* feat: move to quota tiers, and map tier to numeric allowance within rateLimiters

GitOrigin-RevId: 17763447965aae5777053b783d2601517bfe6b12
2026-02-24 09:06:31 +00:00
Jimmy Domagala-Tang
8e5c207f6b Remove Writefull.enabled (#31476)
* feat: migrate from aiErrorAssist naming for disabling AI features to aiFeatures.enabled to avoid confusion

feat: keep aiErrorAssistant as setting on user object until migration is run

* feat: migrate writefull.enabled unset to instead use promotionSet false

* feat: remove wf.enabled in favor for aiFeatures.enabled for display, and writefull.promotionSet for determining if we should autoload or autocreate

GitOrigin-RevId: 2b7a5b8a430a804f6c9804cc926cb5c057e34df5
2026-02-20 09:06:08 +00:00
Kristina
85066c6cb3 [web] various migration script improvements (#31538)
* make warnings more eye catching in clean up dry run
* only increment processedCount after processing
* always rm recurlyAccountCode
* check if existing Stripe customer already has a subscription
* ensure no other customer accounts share the user id
* set recurly_to_stripe_migration_status to cancelled in cancel script
* add script for updating metadata of canceled migrations

GitOrigin-RevId: 3331de480e99774679ff2649b90d41e981a8fdef
2026-02-18 09:05:34 +00:00
Andrew Rumble
14943f884c Merge pull request #31587 from overleaf/ar-add-ux-role
[web] add ux role to admin-roles

GitOrigin-RevId: c8c46ed72b60c5944c8af7b7fb321de105aed7e4
2026-02-18 09:05:25 +00:00
Rebeka Dekany
9162c9c7b5 Add all brand stickers with 5 color variants (#31323)
GitOrigin-RevId: a27d2e2555a29b86e0e68505f939ca83a09346ed
2026-02-13 09:05:20 +00:00
Kristina
a9ab247507 [web] add notification message to the dashboard for migrated subscriptions (#31429)
GitOrigin-RevId: 12c14020b9e43e6544bdbd363fd2bc0d4051c80b
2026-02-10 09:06:13 +00:00
Domagoj Kriskovic
5423c5c792 add threadDeleted event
GitOrigin-RevId: 98ebe9797121b2c2e38f10a53de6b0f6b45a9362
2026-02-09 09:06:25 +00:00
Domagoj Kriskovic
c20be33e74 [web] add commentEdited and commentDeleted events for dsmp
GitOrigin-RevId: 6e43ffd2d782f35ef8202aeb5ef7edf25c0c3a88
2026-02-09 09:06:20 +00:00
Kristina
0cabc81d46 Merge pull request #31218 from overleaf/kh-update-assistant-prices
* update Stripe AI assist prices
* add soft archive option to the archiving prices script

GitOrigin-RevId: 3f0b66cf227e31e03fb3337b3cb4c1b6a82bd1db
2026-02-04 09:06:34 +00:00
Simon Gardner
286cc311c0 [web] update invoice statement descriptor for migrated subscriptions
GitOrigin-RevId: e89f8ba608d263900b5188bb416016aad95f2d6c
2026-01-28 09:06:28 +00:00
Kristina
1228eac81e [web] ensure Stripe & Recurly webhooks can handle a migrating subscription (#30787)
* return early from various event handlers if the subscription isn't controlled by the payment provider sending the event
* update `Subscription` type for webhook events

GitOrigin-RevId: f3fc345c37bbe134b7696ccde9d6d8c7608f8f12
2026-01-20 09:05:36 +00:00
Anna Claire Fields
ff8f77d85c replace staff access with role based sytem (#30004)
- remove references to staff access

GitOrigin-RevId: 5d7df3ae8bc78aa02b65ec0dac0a323520c3df15
2026-01-19 09:06:59 +00:00
Domagoj Kriskovic
e5a82e47ce [notifications] Add support for reopened comment notifications (#30679)
* [notifications] Refactor notification handling by using getProject utility function

* [notifications] Add support for reopened comment notifications

* rename to areNotificationsEnabled

* added comment explaining why we are getting users

GitOrigin-RevId: 7263d52e611c66baa39d8737d1d22740e592a3a0
2026-01-19 09:06:25 +00:00
Domagoj Kriskovic
b39c7d8fe8 Add comment resolved hook for email notifications
GitOrigin-RevId: 426162e4ca03dbb8459c990ae56ff8d12ba2d8b4
2026-01-19 09:06:16 +00:00
Alf Eaton
03a3518aae Merge pull request #30703 from overleaf/ae-prettier
Upgrade Prettier to v3.7.4

GitOrigin-RevId: 0f4434019bc7d12f2d5b7ecbb833ee20570d0706
2026-01-16 09:56:07 +00:00
ilkin-overleaf
7931c7b3eb Merge pull request #30471 from overleaf/ii-linkedin-insight-tag
[web] Add Linkedin Insight tag

GitOrigin-RevId: f01e1908ad945a5db10343a04ee50104efa32c3c
2026-01-09 09:05:38 +00:00
Jimmy Domagala-Tang
75734993e7 Add Notification Preferences Page To User Settings (#30116)
* changing to pug conditional format for admin page conditional render

* feat: update notifications settings page and open BE route

feat: adding new page for notification prefs on user settings, along with updating saving prefs for global preferences

adding error handling and disabling when request is inflight

formatting and adding split test for viewing notification ettings

fix: updating to levels of preferences, and removing global type for preferences as we will now share the same backing settings between global and project preferences

feat: add global mute to user settings for notifications

making params in preferences schema optional

feat: update global settings to only set mute, and remove optional settings

fix: store userId as objectId, and filter based on global mute setting
GitOrigin-RevId: 947a95dc02d12b4a2d8e3cc29bd04c23af2aef25
2026-01-08 09:05:49 +00:00
Rebeka Dekany
5c61ea53d5 Include Stripe couponCode and promotionCode in analytics events (#29873)
* Include valid couponCode and promotionCode in `payment-page-view` and `payment-page-form-submit` analytics events

* Update payment event types

* Remove obsolete comment

* fix: only send validated coupon and promotion codes in analytics event

* Add coupon name for the analytics events

* Update test to include the coupon name for analytics

* Remove coupon code from analytics

* Simplify promotion code validation using coupon.code

* Remove undefined

* Allow access to promotion code

* Remove `lastValidatedPromotionCode` and compare against coupon code from the preview response

* Fix test setup to initialize coupon code

* Keep the submit button enabled only when the coupon code is either empty or successfully validated by the backend

* Update test coupon code value to TEST_COUPON

GitOrigin-RevId: b12fa147d91fd3b90b59bc77868a0786ddb633b7
2026-01-08 09:05:27 +00:00
Liangjun Song
2a4a245b6f Merge pull request #30263 from overleaf/ls-stop-writing-admin-user-id-metadata
Stop writing adminUserId metadata

GitOrigin-RevId: f8230a6b9d9f50afb16feceb0efa6f0b888302d4
2025-12-12 09:06:27 +00:00
Mathias Jakobsen
b554b0cfcc Merge pull request #28497 from overleaf/mj-system-editor-theme-dark-light-split
[web] Split editor theme into two when using system overall theme

GitOrigin-RevId: 1efa5553fdff8a17de634017882feb2ede614cd6
2025-12-12 09:05:10 +00:00
Domagoj Kriskovic
580fc2bad6 [notifications] include tracked changes in email notifications
GitOrigin-RevId: 01011739ef183e0fca606a5d9cbf6c23eaa14644
2025-12-03 09:06:33 +00:00
David
5982eed3fa Merge pull request #29821 from overleaf/dp-editor-redesign-opt-out
Prepare editor redesign for opt-out phase

GitOrigin-RevId: 5831970ff27e5c20f22c68b83471b6b832c2b2b4
2025-12-03 09:05:48 +00:00
Kristina
4a9b66627e [web] update pricing settings for Nov 2025 update (#29947)
* update pricing settings for Nov 2025 update
* update `StripeLookupKeyVersion` type
* update unit tests to match new Stripe version

GitOrigin-RevId: f5df5167b605b6667cc19edad09fb2c0f72a293b
2025-11-28 09:06:01 +00:00
Simon Gardner
43c263b419 [web] Add audit log entry for billing-details-updated
GitOrigin-RevId: dd0079e4043d3a6ee64bd511b242d7f5649036ca
2025-11-28 09:05:47 +00:00
Mathias Jakobsen
4186321ed7 [web] Add dark mode setting to PDF viewer (#29813)
GitOrigin-RevId: 4eddfac30a934c44b451694fd5e18dd8d26ad910
2025-11-26 09:05:51 +00:00
Kristina
42fa9701e5 Merge pull request #29714 from overleaf/kh-rm-dead-sessions-code
[web] remove dead code from Stripe hosted checkout

GitOrigin-RevId: 47372e320dbcee44e04b3bd731a585633433a5c8
2025-11-19 09:06:14 +00:00
Kristina
4e4c6010db [web] rm unused SetupIntentSucceededWebhookEvent (#29708)
GitOrigin-RevId: 9c8cd77c84be66c2032d89b3b4c65ce999c9ccbe
2025-11-19 09:06:09 +00:00
Olzhas Askar
86b860ee32 Merge pull request #29569 from overleaf/oa-promocode-warnings
[web] Promocode warnings

GitOrigin-RevId: 020380e31c26d13e9b74b0f5df588942d302f8db
2025-11-11 09:06:17 +00:00
Anna Claire Fields
808b7bd92c Merge pull request #29533 from overleaf/acf-admin-role-for-sales-support
Add sales-support role with group-modify perms

GitOrigin-RevId: 4d145ed79cfcb4266494f0263bd5693eb4e20fc5
2025-11-10 09:05:23 +00:00
Jakob Ackermann
3586b37491 [web] Remove clsi-cache-prompt/survey, split-tests and events (#29510)
* [web] Remove clsi-cache-prompt/survey and split-tests

* [web] Remove initial 50/50 clsi-cache split-test

* [web] Remove synctex-downloaded-from-cache event

* [web] Remove fallback-to-clsi-cache event

* [saas-e2e] fix tests with clsi-cache enabled

GitOrigin-RevId: b5cf2ab073dc866fe398b81fd5afe46422134c80
2025-11-05 09:06:59 +00:00
Kristina
05a50710bd [web] display Stripe invoice line items on preview change page (#29280)
GitOrigin-RevId: 267586a33f19f6931e2eb76b33fdf569aa07b4d3
2025-10-29 09:05:54 +00:00
Jakob Ackermann
f3f6a8a8e0 [web] add clsi-cache prompts (#29281)
* [web] add clsi-cache prompts

* [web] add new editor variant to segmentation

* [web] add tests for useNewEditorVariant

* [web] adjust start of using clsi-cache in split-test

GitOrigin-RevId: c9c5b1eff2ceefb65ef82516d9074cb971cb4c48
2025-10-24 08:05:42 +00:00
Antoine Clausse
1c01d6048a [web] Create super_admin role (#29082)
* Add `delete-project` and `modify-admin` admin capabilities

* Add `isSuperAdmin` check

* Replace frontend checks

* Add requireAdminPermission middleware on disable2FA

* Remove `isSuperAdmin` tag

* Fix tests on admin capabilities

* Replace isSuperAdmin tests by tests in admin-roles

* Replace superadmin tests by admin-capabilities

* Update tests: server-pro admins are superadmins

* Remove "In Server Pro, all Admin users are also Super Admins"

* Update tests after revert "server-pro admins are superadmins"

* Create capability "delete-2fa"

* Add special privileges for admins in Server Pro to preserve the existing behaviour

* Reorder definitions to avoid future eslint error

* Add super_admins admin-role

* Add some sensible capabilityDependencies

* Fix inconsistency: super_admins -> super_admin

* In tests, await controller methods instead of using manual promises

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>

---------

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: ca1fff3ead5b2001cb5d5d25de15970d55fb2c1b
2025-10-23 08:05:25 +00:00
Domagoj Kriskovic
71457d74cb Add notifications web module (#28983)
* Add notifications web module

* implement getThreadMessage in chat

* Save comment mention notification

* check if recipient is a real user

* move commentMentionDelay

* use module-hooks types

* remove router

* updated collection name

GitOrigin-RevId: cf8240c88aac7d7e4de4bf51cfe2608b6b7e7918
2025-10-20 08:05:20 +00:00
Jessica Lawshe
046449d4bd Merge pull request #28710 from overleaf/jel-no-sso-notifications-when-domain-capture
[web] Do not show notification to link to Commons SSO when domain is also for group with domain capture

GitOrigin-RevId: 6779e2db02d5d9cc4e7a60789a620403a4e4aa11
2025-10-17 08:06:15 +00:00
Liangjun Song
2724ebce49 Merge pull request #29045 from overleaf/kh-gracefully-handle-idempotency-errors
[web] fix idemopotency error by delaying backup measure

GitOrigin-RevId: 0a9a62f2a0c559257247d1b720a8668fdb09f6a1
2025-10-15 08:06:15 +00:00
Liangjun Song
a79171479b Merge pull request #28847 from overleaf/kh-verify-trials
[web] ensure trials work for Stripe custom checkout

GitOrigin-RevId: 9918e768502d50d61cf1a01dfc244fc57411ed35
2025-10-09 08:08:24 +00:00
Liangjun Song
fd9be80bb3 Merge pull request #28781 from overleaf/ls-handle-business-details-on-backend
Handle Stripe business details on backend

GitOrigin-RevId: 32608ba4913da493a09341b8880cd5b639066462
2025-10-09 08:08:19 +00:00
jmescuderowritefull
f0f7899de4 Fix duplicated sign in event (#28777)
GitOrigin-RevId: 92e81160b34207a215113a2af93206ca623adb52
2025-10-01 08:06:33 +00:00
jmescuderowritefull
360c7c1d33 Clean extension checks and old feature flags in Writefull (#28713)
GitOrigin-RevId: c1949019f1f51add7fd036a1ad0e2946ccab5382
2025-10-01 08:06:07 +00:00
David
1b5887d97f Merge pull request #28675 from overleaf/dp-pdf-preview-output-files-typescript-2
Convert output-files.js to typescript

GitOrigin-RevId: 32eb509f491cfd53de7f1b21b97861ba421566a5
2025-09-30 08:05:45 +00:00
Kristina
e9fd1311a7 Merge pull request #28639 from overleaf/kh-analytics-for-custom-checkout-part-2
[web] support `payment-page-form-*` events for Stripe custom checkout

GitOrigin-RevId: cff1206fe0e9e03fa1c822f02ecca18f7ca27f59
2025-09-29 08:07:09 +00:00
Liangjun Song
9153130c4f Merge pull request #28586 from overleaf/ls-dropdown-to-select-segment
Add dropdown in admin panel for finance to set customer segment

GitOrigin-RevId: 3f730bc71b839ed97fa6ce867a25d44c06e60e2f
2025-09-29 08:05:57 +00:00
Jimmy Domagala-Tang
07166bff73 feat: add in-editor notification when rolling image has updated (#28529)
GitOrigin-RevId: 771773ba1914ef609b6ac84799bdda2d7ae4affa
2025-09-25 08:05:39 +00:00