Commit graph

121 commits

Author SHA1 Message Date
Jakob Ackermann
577497b655 Merge pull request #19842 from overleaf/jpa-ro-mirror-on-client
[misc] add readonly mirror of full project content on the client

GitOrigin-RevId: 940bd93bfd587f83ca383d10fc44579b38fc3e88
2024-08-22 08:05:13 +00:00
Mathias Jakobsen
654d96ace6 Merge pull request #19743 from overleaf/mj-restore-project
[web+project-history] Add project version reverting

GitOrigin-RevId: 0f77cec730393187d531c0c6561faaa652bebf29
2024-08-21 08:05:08 +00:00
Brian Gough
bdbc17c374 Merge pull request #19951 from overleaf/bg-remove-unused-redis-from-project-history
Remove unused modules from project-history

GitOrigin-RevId: 668793c334b7ee1d6c16fccfc686bc758bf8ecb4
2024-08-16 08:04:40 +00:00
Eric Mc Sween
e10478f256 Merge pull request #19867 from overleaf/em-hide-history-resync-details
Hide history resync changes

GitOrigin-RevId: a36876ff637d0a4c34150b21f4b4e623dff0ab03
2024-08-14 08:04:54 +00:00
Jakob Ackermann
86f26043d2 Merge pull request #19847 from overleaf/jpa-rename-history-v1
[misc] rename docker compose service history_v1 to history-v1 in dev-env

GitOrigin-RevId: 0991ee4297bae1ed9e9068af1889966ceeeba66d
2024-08-09 08:04:29 +00:00
Jakob Ackermann
074de0cc02 Merge pull request #19790 from overleaf/jpa-silence-missing
[project-history] silence warning due to missing web hash

GitOrigin-RevId: 04ff878c1b356333ff9d515af6a5cba8b31a1ff2
2024-08-06 08:04:54 +00:00
Jakob Ackermann
d21874b076 Merge pull request #19741 from overleaf/jpa-check-filestore-write
[misc] verify file hash when downloading binary file in project-history

GitOrigin-RevId: 0ef56a0753cdfd55fdea921b3555dea48036766b
2024-08-06 08:04:49 +00:00
Jakob Ackermann
e26b6de51b Merge pull request #19740 from overleaf/jpa-linked-file-metadata
[misc] persist linkedFileData in full project history as file metadata

GitOrigin-RevId: f3e8ba947ea34b6796e210a076a248c57188d148
2024-08-06 08:04:44 +00:00
Domagoj Kriskovic
6afb067737 Hide history-resync updates from "All history" (#19435)
* [web] hide history-resync updates from "All history"

* Revert "[web] hide history-resync updates from "All history""

This reverts commit e9d5e7638eabe2baccf36f8c80bb4cd619e383ea.

* filter history resync update in summarizeUpdates

* used isHistoryResyncUpdate for merging

* remove merging for history-resync

* Revert "remove merging for history-resync"

This reverts commit 6ce48bc3f906867a64c0acc12e2dc61c05436c41.

GitOrigin-RevId: 0335eb9c05815fb66188d453a90dd09531504a55
2024-07-19 08:04:21 +00:00
Brian Gough
9babc70df7 Merge pull request #17362 from overleaf/bg-chai-object-id-tests
fix for chai object id tests

GitOrigin-RevId: 98123dbc930c6ee57be3a118177426120482c5f4
2024-07-16 08:04:46 +00:00
Jakob Ackermann
cbe7a2f5a9 Merge pull request #19282 from overleaf/jpa-filestore-sharding
[filestore] add sharding to test_acceptance in CI

GitOrigin-RevId: dd16a0370878d76a934d277838083e08ae0ad8c2
2024-07-15 09:05:11 +00:00
Eric Mc Sween
58ffefc8bb Merge pull request #19298 from overleaf/em-fix-restore-empty-file
Fix file restore when the file is empty

GitOrigin-RevId: be08305c9a41265acfb12046aeb2d003cda92b54
2024-07-15 09:00:51 +00:00
Eric Mc Sween
e4cc2a0816 Fix history diffs when deleting over many tracked deletes (#19193)
* Fix history diffs when deleting over many tracked deletes

As we are looping through tracked deletes, the offset between the result
positions and the source positions must be kept constant. Otherwise, the
tracked deletes are translated as we delete text and move the source
cursor.

GitOrigin-RevId: b2417a75219aaa16bf5c61e0ebcb0586cae6aef2
2024-07-01 08:04:25 +00:00
Eric Mc Sween
67dbf743e1 Merge pull request #19192 from overleaf/em-project-history-avoid-crash
Prevent project-history crashes when generating a diff

GitOrigin-RevId: 513fb846f0884a68d4550783497ae436e1cba00f
2024-06-28 08:05:05 +00:00
Eric Mc Sween
e73fdfba63 Merge pull request #18906 from overleaf/em-migrate-existing-histories-2
History ranges migration script - second attempt

GitOrigin-RevId: 60a2c04e2a72e76a58e9e179fefc4186a96fde32
2024-06-19 08:05:02 +00:00
Eric Mc Sween
9f0f42a012 Merge pull request #18930 from overleaf/em-resync-ranges
Fix resyncs when diffs move ranges

GitOrigin-RevId: 121c3a16cf19649538445e6ed8bc0a1129735eb9
2024-06-19 08:04:57 +00:00
Domagoj Kriskovic
4aa746a759 [web] show file restored change in history (#18792)
* add RestoreFileOrigin in overleaf-editor-core

* support source to be an object

* use sourceOrOrigin as param

* rename to originOrSource so the priority is more clear

* get timestamp from version

* fix test

* include version and min_count in getUpdatesFromHistory

* extractOriginOrSource util function

* fix RestoreManagerTests

* [web] show restore file change in history

* make sure two restore operations are not merged

* dont summarize updates for different paths

GitOrigin-RevId: d890484760a7379716e8bd65dd28e353d293492f
2024-06-18 08:04:43 +00:00
andrew rumble
ee31d44f03 Explicitly specify latest version of async
GitOrigin-RevId: 9112007de0f5eb4e75604de9f01c2d77b3b8b980
2024-06-17 08:04:00 +00:00
Mathias Jakobsen
801a17af27 Merge pull request #18838 from overleaf/mj-history-detached-ranges
[project-history] Handle detached ranges

GitOrigin-RevId: cdbe9b46a03d55fd7b865fdd87092aaad1920c62
2024-06-13 08:04:32 +00:00
Eric Mc Sween
c070c036af Merge pull request #18747 from overleaf/em-update-compressor-comment-ids
Propagate commentIds in UpdateCompressor

GitOrigin-RevId: 03315146c2dc816d02e69594df44d0d25f7952ca
2024-06-07 08:04:13 +00:00
Eric Mc Sween
6c9d4fb522 Merge pull request #18716 from overleaf/em-tracked-delete-undo
Fix translation of tracked deletes

GitOrigin-RevId: 4124db6953cbed46eea61f62118fc8e1ddfff4a0
2024-06-06 08:04:43 +00:00
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
Eric Mc Sween
c85f4ab5e5 Merge pull request #18491 from overleaf/em-filter-summarized-updates
Filter out comment ops from summarized updates

GitOrigin-RevId: 97a44821b6dc001cd1ea84115cf69c8d712e9946
2024-05-31 08:04:18 +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
8704e430a4 Merge pull request #18468 from overleaf/em-docupdater-resolved-comment-ids
Store resolved comment ids in docupdater

GitOrigin-RevId: 69f09ecf69deedbb9a3682f13356533799025ea8
2024-05-29 08:04:01 +00:00
Eric Mc Sween
6d216d4738 Merge pull request #18355 from overleaf/em-resync-tracked-changes
Handle tracked changes during resyncs

GitOrigin-RevId: 1d5b16a4cb17226da184a5430ebbcfc79ad9c7ce
2024-05-27 10:23:02 +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
Antoine Clausse
373b656e75 Remove @ts-check from SyncManagerTests.js (#18291)
Fix broken CI `project-history-pr-trigger`

GitOrigin-RevId: 3bfa666cbce57628f167567daebdd5ff0e1b1e47
2024-05-13 08:03:47 +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
Eric Mc Sween
501be34862 Merge pull request #18156 from overleaf/em-fix-queue-size-metric
Fix queue size by error metric in project history dashboard

GitOrigin-RevId: e837c6fc00acd23671f017c70cd9b2c643c02482
2024-04-30 08:04:47 +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
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
Eric Mc Sween
1cd4768ae8 Merge pull request #17960 from overleaf/em-force-resync-hard
Make the force_resync.js script do hard resyncs

GitOrigin-RevId: 8244881828238a92ad9429f01c4975c52f5895d7
2024-04-22 08:04:15 +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
Domagoj Kriskovic
c4437c69bc Send operations to project-history when accepting tracked changes (#17599)
* added getHistoryOpForAcceptedChange in RangesManager

* rename adjustHistoryUpdatesMetadata to be treated as public

* handle retain op in UpdateTranslator and updateCompressor

* send op to project-history in acceptChanges

* use promises.queueOps

* use ranges in getHistoryOpForAcceptedChange

* using rangesWithChangeRemoved

* acceptChanges acceptance test

* using change.op.hpos

* Revert "using change.op.hpos"

This reverts commit f53333b5099c840ab8fb8bb08df198ad6cfa2d84.

* use getHistoryOpForAcceptedChanges

* fix historyDocLength

* Revert "rename adjustHistoryUpdatesMetadata to be treated as public"

This reverts commit 2ba9443fd040a5c953828584285887c00dc40ea6.

* fix typescript issues

* sort changes before creating history updates

* fix tests

* sinon spy RangesManager.getHistoryUpdatesForAcceptedChanges

* added unit tests

* sort deletes before inserts

* use getDocLength function

* fix docLength calculation

* fix typo

* allow all retains

* fix lint error

* refactor RangesTests

* fix ts error

* fix history_doc_length calculation in RangesManager

* remove retain tracking check from UpdateCompressor

* use makeRanges() properly in tests

* refactor acceptance tests

GitOrigin-RevId: ab12ec53c5f52c20d44827c6037335e048f2edb0
2024-04-17 08:04:17 +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
Eric Mc Sween
1c0f5357aa Merge pull request #17843 from overleaf/em-fix-422-resyncs
Change in history 422 error messages

GitOrigin-RevId: 414642c838703c9084058e1204192ec1cbb1e0a3
2024-04-15 08:04:51 +00:00
Eric Mc Sween
ab17eb150d Merge pull request #17745 from overleaf/em-promisify-snapshot-manager
Promisify SnapshotManager

GitOrigin-RevId: 1fa7124da3aa3e0be5db372e68e286d63f496a97
2024-04-15 08:04:46 +00:00
Eric Mc Sween
d12a0b5f07 Merge pull request #17735 from overleaf/em-promisify-web-api-manager
Promisify WebApiManager

GitOrigin-RevId: 95addc9442845252aa51c353676486b2dbce0662
2024-04-12 08:05:39 +00:00
Eric Mc Sween
3b555ac9e6 Merge pull request #17731 from overleaf/em-promisify-error-recorder
Promisify ErrorRecorder

GitOrigin-RevId: 3736567272a09b4e3b9075118460392c1f66f0d7
2024-04-12 08:05:34 +00:00
Eric Mc Sween
f03e3fd51e Merge pull request #17729 from overleaf/em-promisify-sync-manager
Promisify SyncManager

GitOrigin-RevId: 134770d812a493e39410debb370ed4a58ffff4bf
2024-04-12 08:05:29 +00:00
Domagoj Kriskovic
8bde496da4 Send operations to project-history when resolving/unresolving comments (#17540)
* Send operations to project-history when resolving/unresolving comments

* small fixes

* added doc_id in web unit test

* Revert "added doc_id in web unit test"

This reverts commit f0b8251abfce17965d5e1b0e45d8784fcf1d9eed.

* fix mocked dependency in test

* wip: web unit tests

* document updater, reopen test

* document-updater tests

* format fix

* fix typo

* fix callsArgWith

* fix reopenThread calls in doc updater tests

* fix typos

* log error if chat api resolve failes

* log error when reopening thread

* sendStatus calls done() in tests

* using OError instead of logging

* removed timers

* preserve legacy endpoints

* update after merge

* Remove timer check in HttpControllerTest

* prettier

* added "legacy" in log

* remove metrics.timer

* fix promisify issues

* remove unused cb

GitOrigin-RevId: 849538c86996973a065c727835e93028e5429344
2024-04-10 08:04:08 +00:00
Domagoj Kriskovic
1557338775 [project-history] fix convertToDiffUpdates when track delete is moved by previous op (#17681)
* [project-history] fix convertToDiffUpdates

* fix test

* preserve source ranges for applyRetain

* use sourceRanges for applyDelete

* use cursor difference for offset

* move statement to closer to original

* handle deletion before tracked delete

* Revert "handle deletion before tracked delete"

This reverts commit 6f2570f22473bd64516c166b29a34639ec701230.

* using resultCursor and sourceCursor

* refactor, use scanCursor

* skip track delete properly

* prettier

* remove .sort() in applyRetain

* small test fixes

GitOrigin-RevId: 94755c219c90d6fedcdc64284d71137cf56d2442
2024-04-10 08:04:03 +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
7d7e5c9a8f Merge pull request #17782 from overleaf/mj-project-history-merge-test-fix
[project-history] Fix project history unit test

GitOrigin-RevId: 4a8c5c2337ee8a06d46638ceba18d4a0f8742b42
2024-04-08 08:04:21 +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