Commit graph

687 commits

Author SHA1 Message Date
Eric Mc Sween
55c342134c Merge pull request #18659 from overleaf/em-crop-comments-tracked-deletes
Crop comments when processing tracked deletes

GitOrigin-RevId: 662c9ed86a8ed4959d1671ce466548487f334f45
2024-06-05 08:03:53 +00:00
Mathias Jakobsen
f14fdc7b7c Merge pull request #17958 from overleaf/mj-web-revert-file
[web] Initial version of file reverting

GitOrigin-RevId: ef500b2c3ddf21b0acb6650c2526edd10ab2cc18
2024-05-29 08:04:16 +00:00
Eric Mc Sween
3a1560894a Merge pull request #18516 from overleaf/em-web-resolved-comment-ids
Reintroduce resolved comment ids in getDocument()

GitOrigin-RevId: 591589efc643c815c40df440d1297158901f7a79
2024-05-28 08:04:01 +00:00
Eric Mc Sween
ea8f8d0651 Merge pull request #18506 from overleaf/em-revert-web-resolved-comment-ids
Revert #18398 - return resolved commentIds with getDocument()

GitOrigin-RevId: c5d2dd91d02d88029eb2702d73ac37cb8dbca32c
2024-05-27 10:24:25 +00:00
Eric Mc Sween
83e1452991 Merge pull request #18398 from overleaf/em-web-resolved-comment-ids
Return resolved comment ids with getDocument()

GitOrigin-RevId: 30234f72d52b90b313821290b6c63aa6cc6cb243
2024-05-27 10:24:13 +00:00
Andrew Rumble
71187a51ba Merge pull request #18289 from overleaf/ac-ar-eslint-return-await
Add ESLint rule @typescript-eslint/return-await to backend services

GitOrigin-RevId: 75e3e32597827fcc852e69d479515fc72e8f45e4
2024-05-27 10:22:49 +00:00
Eric Mc Sween
5d0190da0f Merge pull request #18342 from overleaf/em-tracking-props-none
Separate handling of "none" tracking type in operations

GitOrigin-RevId: b07ee5320ac1a9c63e3b0059aade1a1564819943
2024-05-17 08:04:46 +00:00
Mathias Jakobsen
655f9b50ae Merge pull request #18309 from overleaf/mj-add-comment-resolved
[overleaf-editor-core] Omit resolved: false for comments serialisation

GitOrigin-RevId: 909f20efd8f3c3e50d40e09366951d317a4c31bf
2024-05-16 08:04:46 +00:00
Brian Gough
6680bedf6c Merge pull request #16728 from overleaf/bg-clsi-timeout-fetchutils-connect-timeout
add connect timeout to fetch-utils using custom agents

GitOrigin-RevId: 877dbc1311197461cf1e9bfee74196bd5d3e42dc
2024-05-16 08:04:41 +00:00
Mathias Jakobsen
478a6157cc Merge pull request #18305 from overleaf/mj-add-comment-invert
[overleaf-editor-core] Make AddCommentOperation inversion restore state

GitOrigin-RevId: 5a47a2463e3650ba7a6b0a0f53c895fa6ec1b54c
2024-05-16 08:04:37 +00:00
Eric Mc Sween
e87df4a791 Merge pull request #18167 from overleaf/em-simpler-typescript-backend
Simpler Typescript setup in the backend

GitOrigin-RevId: 3a90f26a5ac8029d14203faa98008375ce933e7d
2024-05-07 08:04:00 +00:00
Eric Mc Sween
b75ba32774 Merge pull request #18114 from overleaf/em-resync-comments
Handle comments when resyncing history

GitOrigin-RevId: cd848fbd91f017a0a66e46df5c009bd16498d154
2024-05-06 08:04:25 +00:00
Jakob Ackermann
a540754f6e Merge pull request #18116 from overleaf/jpa-bulk-replace-localhost
[misc] bulk replace localhost with 127.0.0.1

GitOrigin-RevId: d238f3635302e8ff5500d611108c4d1bef216726
2024-04-26 08:04:39 +00:00
Eric Mc Sween
0e54a1078f Merge pull request #17931 from overleaf/em-invalid-ranges
Throw error when constructing invalid ranges

GitOrigin-RevId: 9451e0f8d35372610d08530048e7ee2ca1ff2052
2024-04-25 08:04:54 +00:00
roo hutton
2469c93da4 Merge pull request #17870 from overleaf/bg-node-upgrade-18-20-2
upgrade node to 18.20.2

GitOrigin-RevId: e4ac30c740ced3885353f1472cf690eb5ec0ece1
2024-04-24 08:05:16 +00:00
roo hutton
d75024a7a1 Merge pull request #17974 from overleaf/rh-express-4192
Upgrade express to 4.19.2

GitOrigin-RevId: 383877c39670093033d802af0fae54ec578ba327
2024-04-23 08:05:01 +00:00
Mathias Jakobsen
36ad15c405 Merge pull request #17859 from overleaf/mj-project-history-ranges-at-version
[overleaf-editor-core+project-history] Add endpoint to fetch ranges from version

GitOrigin-RevId: fbe8e8ef3636b344006375a92057cfc580a74616
2024-04-22 08:04:11 +00:00
Eric Mc Sween
88fe3e2942 Merge pull request #17910 from overleaf/em-comment-ids
Include id in history Comment instances

GitOrigin-RevId: 25b897e8e9e8d7b19dfe2d90d7f0cafeb5e6e97f
2024-04-17 08:04:41 +00:00
Mathias Jakobsen
1116f9ea9a [overleaf-editor-core+project-history] Clean up TrackedChangeList api (#17740)
* [overleaf-editor-core+project-history] Mark TC list backing array as private

* [overleaf-editor-core] Add invariant for overlapping comment ranges

* [overleaf-editor-core] Assert that ranges are non-empty

GitOrigin-RevId: e60a3712eba2326e0767a75a3ffc75333311c057
2024-04-17 08:04:13 +00:00
Brian Gough
a9d1ddcb22 Merge pull request #17748 from overleaf/bg-node-security-upgrade-2024-04-05
upgrade node version to 18.20.1

GitOrigin-RevId: 28f8f7c7f63285f7b7355e65713d9ed2dbda8a0e
2024-04-08 08:04:41 +00:00
Mathias Jakobsen
815c29cf82 Merge pull request #17396 from overleaf/mj-version-filtering
[overleaf-editor-core+project-history] Filter tracked changes when fetching files

GitOrigin-RevId: 935e4c4712f31b77070aec545a849fc6fefedcd9
2024-04-08 08:04:17 +00:00
Mathias Jakobsen
178485715f Merge pull request #17642 from overleaf/mj-optimize-range-fetch
[overleaf-editor-core] Load ranges and content in parallel

GitOrigin-RevId: aa949ae7532965c5476c58bacf4bf068620791c0
2024-04-08 08:04:12 +00:00
Alf Eaton
6cc2db3cdd Merge pull request #17525 from overleaf/ae-upgrade-prettier
Upgrade Prettier to v3

GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
2024-03-26 09:04:05 +00:00
Mathias Jakobsen
ce19b5f568 Merge pull request #17359 from overleaf/mj-download-filtering
[overleaf-editor-core+history-v1] Filter tracked deletes when creating zip files

GitOrigin-RevId: 1c19d3cb849150d33e750772399ea81c280fdd57
2024-03-13 09:03:23 +00:00
Mathias Jakobsen
4ef7bc617b Merge pull request #17196 from overleaf/mj-tracked-deletes-filtering
[project-history] Filter tracked deletes from diff views

GitOrigin-RevId: 32c49a740932ef28534b82d390fe00e6500864ca
2024-03-13 09:03:19 +00:00
David
9ef084d73f Merge pull request #17430 from overleaf/dp-callbackify-class
Add callbackifyClass utility

GitOrigin-RevId: 762b800ce0eff2f146147908838162f7d32bd855
2024-03-11 09:03:59 +00:00
Mathias Jakobsen
a4b7c5f468 Merge pull request #17135 from overleaf/mj-ranges-tracker-error-logs
[ranges-tracker] Move data out of error message

GitOrigin-RevId: 9745661cf75eaed28a133e1ad5eba0bf77d6ecc3
2024-03-05 09:03:28 +00:00
ilkin-overleaf
bdc6b417e2 Merge pull request #17252 from overleaf/ii-catch-missing-dependency
Fix services to catch missing dependencies

GitOrigin-RevId: 4c466ad328449b32cddbc5751cd840931ff44c6c
2024-03-04 09:04:13 +00:00
David
84c3dc1fff Merge pull request #17268 from overleaf/dp-remove-old-mongo-metrics
Remove timeAsyncMethod mongo metrics

GitOrigin-RevId: 1ba3a1fd51b9d0766355c31791ae9836d832afe8
2024-02-29 09:04:19 +00:00
Mathias Jakobsen
b80d0e8634 Merge pull request #17047 from overleaf/mj-ranges-in-blobstore
[overleaf-editor-core] Store tracked changes and comments in blob-store

GitOrigin-RevId: 05cc69044bf26808b64b2687d81f2c40ef4cc972
2024-02-27 09:03:10 +00:00
Domagoj Kriskovic
5cb27f69d7 [overleaf-editor-core] SetCommentStateOperation (#17056)
GitOrigin-RevId: 6efb6e3c9cb4b0cb9fdbc522bc57b1c1934a5062
2024-02-27 09:03:07 +00:00
Miguel Serrano
f4454cfe7e [web] Make SamlLogHandler.log() calls asynchronous (#17207)
* [web] Refactor exports in ErrorController

* [web] Make SamlLogHandler.log() async

* [web] await for SamlLogHandler.log() in ErrorController

* [web] await for SamlLogHandler.log() in SAMLMiddleware

* [web] await for SamlLogHandler.log() async controllers

* [web] await for SamlLogHandler.log() in SAMLManager

* [web] Remove explicit wait when testing SAML logs

After making the logs asynchronouse the wait
is no longer needed

* [web] Avoid using async with SamlLogHandler.log on callbacks

* Add expressifyErrorHandler to promise-utils

* Tighten assertion in SAMLMiddlewareTests

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

* Updated SamlLogHandler.log to await for promise

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 3645923fae8096a9ba25dc9087f1a36231528569
2024-02-23 09:03:14 +00:00
David
b59326e96f Merge pull request #16873 from overleaf/dp-mongo-command-monitoring
Use mongo command monitoring to add timing metrics

GitOrigin-RevId: e7e5dd5cca1ba3802c02198ccf81058d4da3f1e7
2024-02-23 09:02:55 +00:00
Jakob Ackermann
06c839a230 Merge pull request #17237 from overleaf/jpa-s3-iam
[object-persistor] add support for IAM credentials in S3Persistor

GitOrigin-RevId: 4ff34082ca557b17d8a7803f700ee704a3d184c6
2024-02-22 09:04:52 +00:00
Eric Mc Sween
cd1773773e Merge pull request #17162 from overleaf/em-handle-comments
Handle comment updates in project-history

GitOrigin-RevId: 46f0043c1c20200bdb665e66643a7870c18d797f
2024-02-21 09:03:27 +00:00
Domagoj Kriskovic
c9b9ae4180 [overleaf-core-editor] Make comment properties immutable (#17022)
* make range class immutable

* rename variable

* use newRanges

* range readonly props

* skrinkBy test

* Fix range shrinking bug

* [overleaf-core-editor] Make comment properties immutable

* remove added line

* format fix

* make readonly array

* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation (#16871)

* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation

* added add comment op test

* delete comment op test

* import core to escape circle deps

* desctructure in tests

* require directly in builder

* invert of add comment is always delete comment

* no merging on compose

* NoOp if comment is not found

* use comment.clone()

* update test

* change CommentRawData type

* jsdoc assert type

* fix formating

* EditNoOperation

* return other in compose

* use ReturnType

* Revert "use ReturnType"

This reverts commit 2c7e04f1541310e9fc08963170a783a437ed1992.

* transorm add comment operation

* transform delete comment operation

* moved comment.js

* format fix

* fix transform addComment and textoperation

* fix merge

* test more complex test operations

* change to else if

* move range.js

* fix types

* fix AddComment and TextOperation transform

* fixed AddComment-TextOperation trasform, added test

* deletecommentoperation should win

* should not delete comment

* remove unused function, fix type

* fix format

* add resolved for existing comment

* transform EditNoOperation

* fix test description

* change the order of EditNoOperation

* fix DeleteCommentOperation-DeleteCommentOperation transform

* fix types after merging main

* refactor operation types

* fix errors after merging

* fix bad merge

* format fix

* removed comment.clone()

* return old comment

* remove unused var

GitOrigin-RevId: e31d723075cb04b0b7177e7cae0014c295f92a68
2024-02-21 09:03:21 +00:00
Mathias Jakobsen
826020effe Merge pull request #17099 from overleaf/mj-no-op-transform
[overleaf-editor-core] Fix transform for no-op Operation

GitOrigin-RevId: 20b8681153fb0788feb7d5d9954781a5432dbe69
2024-02-21 09:03:14 +00:00
Jakob Ackermann
39189978ac Merge pull request #17170 from overleaf/jpa-node-18-19-1
[misc] upgrade Node.js to 18.19.1

GitOrigin-RevId: 1bd2008682b585c3fccc65f74c90ba7fc9edc023
2024-02-20 09:04:55 +00:00
David
0f05623e16 Merge pull request #17084 from overleaf/dp-mongoose-callback-system-message-manager
Promisify SystemMessageManager and SystemMessageManagerTests

GitOrigin-RevId: b8fafdfdba817160c1b18cf7eb0270a27adf114c
2024-02-20 09:04:38 +00:00
Domagoj Kriskovic
2440f89be5 [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation (#16871)
* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation

* added add comment op test

* delete comment op test

* import core to escape circle deps

* desctructure in tests

* require directly in builder

* invert of add comment is always delete comment

* no merging on compose

* NoOp if comment is not found

* use comment.clone()

* update test

* change CommentRawData type

* jsdoc assert type

* fix formating

* EditNoOperation

* return other in compose

* use ReturnType

* Revert "use ReturnType"

This reverts commit 2c7e04f1541310e9fc08963170a783a437ed1992.

* transorm add comment operation

* transform delete comment operation

* moved comment.js

* format fix

* fix transform addComment and textoperation

* fix merge

* test more complex test operations

* change to else if

* move range.js

* fix types

* fix AddComment and TextOperation transform

* fixed AddComment-TextOperation trasform, added test

* deletecommentoperation should win

* should not delete comment

* remove unused function, fix type

* fix format

* add resolved for existing comment

* transform EditNoOperation

* fix test description

* change the order of EditNoOperation

* fix DeleteCommentOperation-DeleteCommentOperation transform

* fix types after merging main

* refactor operation types

GitOrigin-RevId: 6f127763a6dc50d4fe3524d9b25dc7526b6b0028
2024-02-19 09:04:15 +00:00
Eric Mc Sween
b55bdf7ced Merge pull request #17128 from overleaf/em-filter-out-comments
Do not send comments to project-history when ranges support is disabled

GitOrigin-RevId: 0c5e5e2c98ea3c2830ba4d5d114bf4730b440440
2024-02-19 09:04:00 +00:00
Mathias Jakobsen
28106dd66c Merge pull request #16885 from overleaf/mj-scanops-tracking-info
Add comment and tracking information to ScanOps

GitOrigin-RevId: 475dab73d44529f793c7d07bc5ae6873f8e0b257
2024-02-15 09:04:01 +00:00
Domagoj Kriskovic
8b571bae9c [overleaf-editor-core] Make range methods immutable (#16890)
* make range class immutable

* rename variable

* use newRanges

* range readonly props

* skrinkBy test

* Fix range shrinking bug

GitOrigin-RevId: ea9a568b28f53e74dec4c500be3d5dba65abf0ad
2024-02-14 09:05:49 +00:00
David
19aaed64f8 Merge pull request #17034 from overleaf/dp-remove-access-token-encryptor-mongo-dependency
Remove mongodb dependency for libraries/access-token-encryptor

GitOrigin-RevId: 47241e200df6a9cba34d1effc6ef3203ea95a8a7
2024-02-13 09:04:12 +00:00
Alf Eaton
7b3ffb9fae Standardise types for ranges (#16927)
GitOrigin-RevId: 28dd0eb67e1684e6bd0e452d15315ce1f9e3481a
2024-02-09 09:06:51 +00:00
Jakob Ackermann
63520c7076 Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup
[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
2024-02-09 09:04:11 +00:00
Mathias Jakobsen
ad0a8be0af Merge pull request #16807 from overleaf/mj-tracked-changes-history
[overleaf-editor-core] Add TrackedChangeList to StringFileData

GitOrigin-RevId: b2abce4860c5be6189beafca575de04e880b08f5
2024-02-06 09:03:54 +00:00
Mathias Jakobsen
09ff9526b8 Merge pull request #16872 from overleaf/mj-exclusive-ranges
[overleaf-editor-core] Make ranges exclusive

GitOrigin-RevId: 5b821d5bc1da8a6647305c268abc6185a7fa1f80
2024-02-06 09:03:51 +00:00
Mathias Jakobsen
63ff16843c [overleaf-editor-core] Introduce ScanOp and subclasses (#16695)
* [overleaf-editor-core] Introduce ScanOp and subclasses

* [overleaf-editor-core] Remove unused methods

* [overleaf-editor-core] Add tests for ScanOps

* [overleaf-editor-core] Simplify merge

* [overleaf-editor-core] Make ApplyContexts mutable

* [overleaf-editor-core] Remove unnecessary containsNonBmpChars check

* [overleaf-editor-core] Revert to using reduce

* [overleaf-editor-core] Modify inputCursor after using it

* [overleaf-editor-core] Rename DeleteOp to RemoveOp

* [overleaf-editor-core] Remove useless constructor

* [overleaf-editor-core] Mutate in mergeWith

* [overleaf-editor-core] Add check for out-of-bounds retain

* [overleaf-editor-core] Move error import

GitOrigin-RevId: d07bd58177579638551257d56f087e8967e5b52f
2024-02-02 09:03:32 +00:00
Domagoj Kriskovic
b87dad77d9 Added applyInsert/applyDelete methods to comments (#16572)
* Add CommentList to StringFileData

* added more types

* use toRaw

* using Map rather than array for comments

* using Range class

* Comment with ranges:Range[]

* Revert "Comment with ranges:Range[]"

This reverts commit 0783b1837562600637db03cc70c620129061c797.

* Comment with ranges:Range[]

* remove isDeleted

* commentList.toRaw()

* using toRaw

* commentId to id

* Revert "using toRaw"

This reverts commit 0c04ca5836f3befd5ec027bad5bf722e8b27f36c.

* fix merge

* make comment map internal to CommentList

* remove unused type

* fix parameter name in StringFileData

* import types more consistently

* more consistent type def

* Added moveOnInsert/moveOnDelete methods to comments

* use range helper methods

* mergeRanges function

* rename isAfter to startsAfter

* added @ts-checks

* using comment.isEmpty

* rename overlaps to covers

* remove ops in applyDelete

* mege, substract, isInRange

* ranges fixes, added tests

* rename to includes

* using pos,length in applyInsert

* simplify

* extendComment option

* check comment edges

* added inclusive option

* more specific touches()

* refactor mergeRanges()

* comment.addRange()

* remove inclusive option

* refactor using more helper methods

* fix typo

* inserting a comment between ranges tests

* test description fixes

* support only range

* more edge case testing

* added more range tests

* renamed to containsExcludingEdges

* endsAt check edge

* using firstIndex, lastIndex

* contains, containsIndex

* raturn -1 for lastIndex for empty ranges

* rename ranges in tests

* indexStartsAfter

* sort comment ranges

* rename to indexIsAfter, fix Range type

* add range if expandComment is true

* split the range when expandComment is false

* added moveBy and extendBy

* added more tests

* added comments

* prettier

* small fixes/typos

* rename indexIsAfter

* merge when deleting with overlaps

* added overlap test

* same range touches test

* test with overlapping comments

* delete duplicate test

* throw on empty range

GitOrigin-RevId: 1252e3d01f2f5dc1d00ce681c579506038e4d121
2024-02-02 09:03:28 +00:00