Commit graph

4320 commits

Author SHA1 Message Date
Jessica Lawshe
4b5f31ac95 Merge pull request #25353 from overleaf/revert-25351-revert-24919-jel-create-group-audit-log
Revert "Revert "[web] Add group audit log""

GitOrigin-RevId: 4d61cfd9e8a7dac1f5837a4028aff95fa19c308a
2025-05-08 08:06:32 +00:00
Jakob Ackermann
e8b5ee2ff9 [history-ot] initial implementation of using doc-level history-ot (#25054)
* [history-v1-ot] initial implementation of using doc-level history-v1-ot

* [web] fix advancing of the otMigrationStage

Use 'nextStage' for the user provided, desired stage when advancing.

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [document-updater] document size check in editor-core

* [history-ot] rename history-v1-ot to history-ot and add types

* [history-ot] apply review feedback

- remove extra !!
- merge variable assignment when processing diff-match-match output
- add helper function for getting docstore lines view of StringFileData

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* Revert "[document-updater] add safe rollback point for history-ot (#25283)"

This reverts commit d7230dd14a379a27d2c6ab03a006463a18979d06

Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

---------

Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 89c497782adb0427635d50d02263d6f535b12481
2025-05-08 08:05:44 +00:00
Antoine Clausse
e7329b9660 [web] Remove script remove_emails_with_commas.mjs (#25356)
It ran in prod and updated 112 users

GitOrigin-RevId: 730f6544e7a5bb4d08095b48fb697b5c8e7a08be
2025-05-07 08:08:01 +00:00
Jessica Lawshe
12939b91b3 Merge pull request #25351 from overleaf/revert-24919-jel-create-group-audit-log
Revert "[web] Add group audit log"

GitOrigin-RevId: cf192bbe3ebdb693f18bab9c1c5d08da18ed34c0
2025-05-07 08:07:34 +00:00
Tim Down
f72a34f25b Merge pull request #25348 from overleaf/td-react-18-flaky-tests
Attempt to fix two flaky frontend project dashboard tests

GitOrigin-RevId: 1d5c3a05f7439ad3e22e5de96da8628ad8dd27c5
2025-05-07 08:07:29 +00:00
Jessica Lawshe
59275eeb84 Merge pull request #24919 from overleaf/jel-create-group-audit-log
[web] Add group audit log

GitOrigin-RevId: b59c38c57f555f18cdfa5dd697ad38d78b590996
2025-05-07 08:07:12 +00:00
Antoine Clausse
bc4c3c4ef8 [web] Promisify ClsiCookieManager and CompileController (reapply again) (#25280)
* Reapply "[web] Promisify ClsiCookieManager and CompileController (reapply and fix)"

This reverts commit 98cb9127ff2b7c7c347c560766f749265d712490.

* Fix: Use query parameters correctly (!!)

* Add unit test on `checkIsLoadSheddingEvent`

* Remove interference between tests: rename to `ClsiCookieManager2` when it's re-sandboxed

* Add test: 'should report "cycle" when other is UP'

GitOrigin-RevId: 3146b149954b908830226cb03b51d9adfa08ec2e
2025-05-07 08:07:07 +00:00
Jakob Ackermann
6881ba956a [clsi-cache] only use sharding from updated project editor tabs (#25326)
GitOrigin-RevId: 1754276bed3186c0536055c983e32476cc90d416
2025-05-07 08:06:39 +00:00
Tim Down
aa97dbdbb6 Merge pull request #25269 from overleaf/td-flaky-tags-test
Add waits for flaky tag list test

GitOrigin-RevId: 9d0bf2acd54d07e96fe6837296176e62bf981947
2025-05-07 08:05:59 +00:00
Mathias Jakobsen
930401541d Merge pull request #25190 from overleaf/mj-survey-signup-limits
[web] Add options to limit survey exposure based on signup date

GitOrigin-RevId: 5719997339b5040d5cc42ffe7bee6d7b66bff12d
2025-05-05 08:05:18 +00:00
M Fahru
dd3ae65bd2 Merge pull request #25166 from overleaf/kh-cancel-subscription
[web] support canceling Stripe subscription

GitOrigin-RevId: a72ccb20fbef9b6662cdfa1dcffacbd76dcb694c
2025-05-02 08:06:02 +00:00
Eric Mc Sween
2a88d7d9c9 Merge pull request #25152 from overleaf/em-ds-mobile-app
Endpoints for DS mobile app

GitOrigin-RevId: c7cf867bde60a0293c1c9f68f5a08515d0d2e904
2025-05-02 08:05:57 +00:00
Tim Down
7abafb01ea Merge pull request #23940 from overleaf/td-react-18
Upgrade to React 18

GitOrigin-RevId: 9b81936e6eea2bccd97fe5c2c5841f0b946371b8
2025-05-02 08:05:29 +00:00
Antoine Clausse
666481d8b2 Merge pull request #25221 from overleaf/revert-25207-ac-promisify-compile-controller-2
Revert "[web] Promisify ClsiCookieManager and CompileController (reapply and fix)"

GitOrigin-RevId: 4495b0fdee22c9c2a7eb39250aef498883389427
2025-05-01 08:06:55 +00:00
Antoine Clausse
61db35ac8f Merge pull request #25207 from overleaf/ac-promisify-compile-controller-2
[web] Promisify ClsiCookieManager and CompileController (reapply and fix)

GitOrigin-RevId: 0737f30c24bf92b33327dc7d0e015ac2cd7d751d
2025-05-01 08:06:47 +00:00
Miguel Serrano
707e197625 Merge pull request #25008 from overleaf/msm-missing-close-handler-modal
[web] Fix `cancel` button in `UnlinkUserModal`.

GitOrigin-RevId: 5b84c9593ce59c6da9aae9cf4f8e763151202d34
2025-05-01 08:06:32 +00:00
Miguel Serrano
958e05a001 [web] script to update group members via CSV (#24861)
* [web] script to update group members via CSV

GitOrigin-RevId: 973d1bdb1180af008608e14e1ff31af83e47f630
2025-05-01 08:06:27 +00:00
Antoine Clausse
d7d60f9d4c Merge pull request #25200 from overleaf/revert-25023-ac-promisify-compile-controller
Revert "[web] Promisify ClsiCookieManager and CompileController"

GitOrigin-RevId: 190ee8d2be23687f092e762c5199a34bcdf37cf9
2025-05-01 08:06:00 +00:00
Antoine Clausse
c51d6f46d4 Add script to remove emails with commas, taken from a CSV file (#25107)
* Add script to remove emails with commas and replace them emails to support with encoded former emails

* Enhance RemoveEmailsWithCommasScriptTest to verify unchanged user data

GitOrigin-RevId: 6961995f2a143ac1c53bc2eeb183808a4be7dd02
2025-05-01 08:05:46 +00:00
Antoine Clausse
73476180d4 [web] Promisify ClsiCookieManager and CompileController (#25023)
* Refactor `ClsiCookieManager` to use async/await

* Refactor `CompileController` to use async/await

* Fix tests: CompileControllerTests.js

* Fix tests: ClsiCookieManagerTests.js

* Fixup: keep old object key (`serverId`->`clsiServerId`)

* Prefix non-express methods with an underscore

* Use async versions of `rclient` methods

* Fix: `canContinue` must be `false` when rate limited (!!)

* Remove unused `ClsiCookieManager.getCookieJar`

* Remove bad comments

* Fix linting

* Replace `request` by `@overleaf/fetch-utils`

* Replace `callsFake` by `resolves`

* Update `catch` block after request->fetch update: check status code

* Re-add timeout of 30s (was removed in 3df75ab5ccc8a63bd69a6a6e6052ef0451b76220)

* `npm run format:fix`

* Don't throw on 4xx errors; keep functionality similar to the current implementation using `request`.

GitOrigin-RevId: ef161f6c252d13f407e9cf28029b62061d6b992f
2025-05-01 08:05:42 +00:00
Rebeka Dekany
2731ffaf10 Make editor popover toolbar keyboard focusable (#25169)
* Remove redundant class conflicting with focus styling

* Make the toolbar in the popover focusable via keyboard

* Focus to the first context menu item via keyboard only

GitOrigin-RevId: 7d3e2af4ba96654b5b2312b3999483c2a439b406
2025-04-30 08:05:25 +00:00
ilkin-overleaf
1a8c549389 Merge pull request #24412 from overleaf/ii-flexible-licensing-manually-collected-2
[web] Add seats feature for manually collected subscriptions

GitOrigin-RevId: f7cc6f8ce17163f10e175a06bb471de6e3a96e3c
2025-04-30 08:05:00 +00:00
Liangjun Song
62760a9bf5 Merge pull request #25117 from overleaf/ls-map-stripe-product-to-recurly-plan-code
Use metadata to map Stripe product to Recurly plan code

GitOrigin-RevId: 775eb39cedff81985fc72cb14d411575231ade8f
2025-04-29 08:06:28 +00:00
Tim Down
5d78229e1e Merge pull request #25093 from overleaf/td-upgrade-react-error-boundary-second-attempt
Upgrade react-error-boundary to version 5, second attempt

GitOrigin-RevId: 2b88334b66f0ace383211c147279ff88e9f956bb
2025-04-29 08:06:23 +00:00
Mathias Jakobsen
d7bd665bee Merge pull request #25060 from overleaf/mj-core-pug-bs5
[web] Convert various pug pages to BS5

GitOrigin-RevId: f42de89eca778db19d5faa8a19fa8a210c7a749b
2025-04-29 08:06:01 +00:00
Andrew Rumble
2c3eed8d96 Use assert.fail instead of comparing false and true
GitOrigin-RevId: c6cbaf0a424771cf2a037366fccd790a13d9b1bb
2025-04-29 08:05:23 +00:00
Andrew Rumble
2ad9f36706 Promisify tests
GitOrigin-RevId: 6f413f4c5ef8d034b4e94afacdf2d7b43c3a8830
2025-04-29 08:05:18 +00:00
Kristina
23c1a0ba4d Merge pull request #25082 from overleaf/kh-prevent-pausing-and-group-plans
[web] prevent pausing or upgrading to group for Stripe subscriptions

GitOrigin-RevId: 4d194339282d8bc165ffa1b89e8e1cf298c2d343
2025-04-29 08:05:09 +00:00
Alf Eaton
c6ac06b51c Start adding client-side word count (#24892)
GitOrigin-RevId: 6c17d7bf7095794c003e17939a8302fc6b059262
2025-04-28 08:05:38 +00:00
Alf Eaton
9d290ae234 Add polyfills for AbortSignal.any and AbortSignal.timeout (#24958)
GitOrigin-RevId: d0fc041054e17f50b5b19343e06e857bd9635902
2025-04-28 08:05:04 +00:00
M Fahru
87bca3601d Merge pull request #25065 from overleaf/mf-schedule-refresh-features-stripe
[web] Refresh user features for stripe subscripton

GitOrigin-RevId: e0600e80bfc264f2c0229090f0d5ff7ef845d28e
2025-04-25 08:05:49 +00:00
Jakob Ackermann
8ed650f57a [web] make clsi-cache a premium feature (#25075)
* [web] stopOnFirstError=true does not conflict with =false locally

Allow stopOnFirstError to be enabled in the compile from cache and
disabled locally.
Compiles that passed with stopOnFirstError=true will also pass with
stopOnFirstError=false. The inverse does not hold, and we need to
recompile.

* [web] record event when using compile from cache

* [web] record event when falling back to clsi-cache

* [web] make clsi-cache a premium feature

* [k8s] clsi-cache: increase disk size for beta rollout

NOTE: As this is a premium feature and paid servers run in zones c+d, we
do not need to scale up clsi-cache in zone b for now.

* [web] enable full sampling of compile-result-backend events

* [web] fix frontend tests

* [web] be more verbose when determining access to clsi-cache feature

GitOrigin-RevId: 6fd663e16085187876eb225f7f33eeeaf69d2b2a
2025-04-25 08:05:33 +00:00
Tim Down
fb50d429b4 Merge pull request #24965 from overleaf/td-downshift-9-upgrade
Upgrade Downshift to version 9

GitOrigin-RevId: b36904ab0c82c09a633a25cd6fed651d7c8b19f7
2025-04-24 08:06:24 +00:00
Kristina
6166a51552 Merge pull request #24922 from overleaf/kh-add-customer-portal-links
[web] add stripe customer portal link

GitOrigin-RevId: 6baaf51d4dd89ef779229ad17603529db06cf396
2025-04-24 08:05:44 +00:00
Kristina
6f1f1ba744 Merge pull request #24848 from overleaf/mf-save-stripe-checkout-data-to-mongo-db
[web] Save stripe checkout data to mongodb

GitOrigin-RevId: 537778a041f92f43ccf6455c29a56c7a961ce765
2025-04-24 08:05:40 +00:00
Jimmy Domagala-Tang
f95bf41824 Merge pull request #24697 from overleaf/jdt-show-addons-via-wf
Display When Ai Assist Is Granted Via Writefull

GitOrigin-RevId: 91f6e1843e2e1d1f7b3a49d95f31603e838c5545
2025-04-23 08:05:30 +00:00
M Fahru
a29280a1fe Merge pull request #24833 from overleaf/kh-add-stripe-get-subscription
[web] fetch Stripe subscription

GitOrigin-RevId: bffc31224aece584f4f1e3294bb1285d17f99195
2025-04-18 08:05:44 +00:00
Antoine Clausse
b901bb6c75 [web] Update fetch-mock to version 12 (#24837)
* Update fetch-mock to version 12

* Replace `fetchMock.done` by `fetchMock.callHistory.done`

* Replace `…Mock.called` by `…Mock.callHistory.called`

* Replace `fetchMock.reset` by `fetchMock.hardReset`

* Replace `fetchMock.restore` by `fetchMock.hardReset`

* Replace `fetchMock.resetHistory` by `fetchMock.clearHistory`

* Replace `fetchMock.calls` by `fetchMock.callHistory.calls`

* Replace `fetchMock.flush` by `fetchMock.callHistory.flush`

* Update tests for fetch-mock version 12

See https://www.wheresrhys.co.uk/fetch-mock/docs/Usage/upgrade-guide

* Update stories for fetch-mock version 12

* Remove `overwriteRoutes` option

* Add `fetchMock.spyGlobal()` to storybook

* Remove deprecated `sendAsJson` param

* Replace `fetchMock.hardReset()` by `fetchMock.removeRoutes().clearHistory()`

* Fixup fetch-mock in storybook:

Call `mockGlobal` inside the hook, call `removeRoutes` and `unmockGlobal` on cleanup

Behaviour can be tested by navigating between

https://storybook.dev-overleaf.com/main/?path=/story/editor-ai-error-assistant-compile-log-entries--first-log-entry
https://storybook.dev-overleaf.com/main/?path=/story/editor-ai-error-assistant-compile-log-entries--rate-limited

https://storybook.dev-overleaf.com/main/?path=/story/project-list-notifications--project-invite
https://storybook.dev-overleaf.com/main/?path=/story/project-list-notifications--project-invite-network-error

And clicking the buttons

GitOrigin-RevId: 35611b4430259e4c21c3d819ad18b2e6dab66242
2025-04-17 08:06:24 +00:00
Kristina Hjertberg
f8f2585164 [web] mv PaymentService to modules
GitOrigin-RevId: 73d739f53d96ff9e9d51a535907dbdc878aa6624
2025-04-17 08:05:58 +00:00
Jakob Ackermann
39110d9da9 [clsi-cache] check compiler settings before using compile from cache (#24845)
* [web] provide an actual rootFolder from EditorProviders in tests

- Fixup SocketIOMock and ShareJS mocks to provide the complete interface
- Extend SocketIOMock interface to count event listeners
- Fixup test that did not expect to find a working rootDoc

* [web] expose imageName from ProjectContext

* [clsi-cache] check compiler settings before using compile from cache

* [web] avoid fetching initial compile from clsi-cache in PDF detach tab

GitOrigin-RevId: e3c754a7ceca55f03a317e1bc8ae45ed12cc2f02
2025-04-16 08:05:35 +00:00
Tim Down
832028e92d Merge pull request #24718 from overleaf/td-bs5-warning-bg
Fix for form warning text colour

GitOrigin-RevId: 48a6d710548d919a5968a04709b41e4f1b2cd004
2025-04-16 08:05:19 +00:00
Jakob Ackermann
f0edc7ba00 [web] update the projects lastUpdated timestamp when changing file-tree (#24867)
* [misc] freeze time before any other unit test setup steps

Freezing it after other work (notably sandboxed-module imports) will
result in flaky tests.

* [web] update the projects lastUpdated timestamp when changing file-tree

GitOrigin-RevId: b82b2ff74dc31886f3c4bd300375117eead6e0cd
2025-04-16 08:05:14 +00:00
Domagoj Kriskovic
30c5495b21 Update share modal copy for reviewer role (#24694)
* Update share modal copy for reviewer role

* fix ShareProjectModal test

* use "limited_to_n_collaborators_per_project"

GitOrigin-RevId: f5afcb18a3921a6b1132a4c323af9d8395a7d07b
2025-04-15 08:05:14 +00:00
Eric Mc Sween
42aea53307 Merge pull request #24754 from overleaf/em-promisify-history-controller
Promisify HistoryController

GitOrigin-RevId: e1783acb8c7ba7e00b109a4f4a514973cc3163d2
2025-04-11 08:05:52 +00:00
Kristina
9f22564ca3 Merge pull request #24680 from overleaf/kh-rename-recurly-namespace
[web] rename recurly namespace

GitOrigin-RevId: b7cfd26923d47bd7f3de4140be24d2d1ef20f6c8
2025-04-11 08:05:20 +00:00
Kristina
af46bcdace Merge pull request #24396 from overleaf/kh-rm-unused-recurly-subscription-property
[web] rm dead code in `SubscriptionViewModelBuilder`

GitOrigin-RevId: 64006e3f51f61c40e2d4e01fd04961546319ffdd
2025-04-11 08:05:16 +00:00
Jakob Ackermann
b831a0b3f7 [clsi-cache] frontend (#24389)
* [clsi-lb] forward ?clsiserverid=cache requests to clsi-cache

* [web] use clsi-cache in frontend

* [web] upgrade compile from cache to full compile when triggered inflight

* [web] fix pdf-js-viewer.spec.tsx tests -- add ?clsiserverid=foo to url

* [web] fix renamed reference after merge

* [web] fix download of other output files and use specific build

* [web] consolidate validation of filename into ClsiCacheHandler

* [web] remove unused projectName from getLatestBuildFromCache

* [web] avoid hitting the same clsi-cache instance first all the time

* [web] update documentation

GitOrigin-RevId: d48265a7ba89d6731092640e1492bc9f103f5c33
2025-04-10 08:05:22 +00:00
Jakob Ackermann
b538d56591 [clsi-cache] backend (#24388)
* [clsi-cache] initial revision of the clsi-cache service

* [clsi] send output files to clsi-cache and import from clsi-cache

* [web] pass editorId to clsi

* [web] clear clsi-cache when clearing clsi cache

* [web] add split-tests for controlling clsi-cache rollout

* [web] populate clsi-cache when cloning/creating project from template

* [clsi-cache] produce less noise when populating cache hits 404

* [clsi-cache] push docker image to AR

* [clsi-cache] push docker image to AR

* [clsi-cache] allow compileGroup in job payload

* [clsi-cache] set X-Zone header from latest endpoint

* [clsi-cache] use method POST for /enqueue endpoint

* [web] populate clsi-cache in zone b with template data

* [clsi-cache] limit number of editors per project/user folder to 10

* [web] clone: populate the clsi-cache unless the TeXLive release changed

* [clsi-cache] keep user folder when clearing cache as anonymous user

* [clsi] download old output.tar.gz when synctex finds empty compile dir

* [web] fix lint

* [clsi-cache] multi-zonal lookup of single build output

* [clsi-cache] add more validation and limits

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [clsi] do not include clsi-cache tar-ball in output.zip

* [clsi-cache] fix reference after remaining constant

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* [web] consolidate validation of filename into ClsiCacheHandler

* [clsi-cache] extend metrics and event tracking

- break down most of the clsi metrics by label
  - compile=initial - new compile dir without previous output files
  - compile=recompile - recompile in existing compile dir
  - compile=from-cache - compile using previous clsi-cache
- extend segmentation on compile-result-backend event
  - isInitialCompile=true - found new compile dir at start of request
  - restoredClsiCache=true - restored compile dir from clsi-cache

* [clsi] rename metrics labels for download of clsi-cache

This is in preparation for synctex changes.

* [clsi] use constant for limit of entries in output.tar.gz

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>

* [clsi-cache] fix cloning of project cache

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: 4901a65497af13be1549af7f38ceee3188fcf881
2025-04-10 08:05:17 +00:00
Kristina
7920cd9d3d Merge pull request #24519 from overleaf/kh-add-payment-service-low-delta
[web] add `PaymentService` to `buildUsersSubscriptionViewModel`

GitOrigin-RevId: 543531226bad38d34b225dae28cf00a5e02e5558
2025-04-10 08:05:06 +00:00
Tim Down
28468e134c Merge pull request #24660 from overleaf/td-bs5-remove-react-bootstrap-0
Remove react-bootstrap 0.33.1

GitOrigin-RevId: c320a6b18c576afdc0fd49559915d3d2f3a7a1ef
2025-04-10 08:04:50 +00:00