Commit graph

25466 commits

Author SHA1 Message Date
Rebeka Dekany
71094cb283 Fix the React version of Facebook logo (#25070)
GitOrigin-RevId: 8357f6d3fef31fdea9d5d77b11093946a4a7ceba
2025-04-28 08:06:11 +00:00
Domagoj Kriskovic
35722acb3d Update review panel entry header user width in mini view (#25027)
GitOrigin-RevId: cbb62889f58b913e874fb947b95c16b0e0882671
2025-04-28 08:05:56 +00:00
Domagoj Kriskovic
8870aa6e63 Fix AI assist links based on annual/monthly switch (#25052)
* Fix AI assist links based on annual/monthly switch

* use translations for annually discount

GitOrigin-RevId: eaf10720eb162c8ecbd891e8f73475db0c02b9f9
2025-04-28 08:05:51 +00:00
Domagoj Kriskovic
5a4cf8a003 Refactor Writefull init to always include overleafLabels (#25055)
GitOrigin-RevId: 416b2d1ea3a24e7c879779078e4f2a13ca6c3555
2025-04-28 08:05:47 +00:00
Alf Eaton
c732a02b38 Use toast notifications for SyncTeX errors and handle missing file errors (#24579)
GitOrigin-RevId: 88c6658ff0d11fdb43cef19c48b542a3b2206666
2025-04-28 08:05:42 +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
c378f0961c Add footnote and endnote commands to the LaTeX grammar (#24939)
GitOrigin-RevId: f0342156fa22a1bcf73ae2e8afdcc6f330ba5d37
2025-04-28 08:05:33 +00:00
Jakob Ackermann
a9780ccf96 [clsi] merge sandboxed compiles config from Server Pro and SaaS (#25062)
* [clsi] merge sandboxed compiles config from Server Pro and SaaS

* [clsi] reorder fallback env vars

Co-authored-by: Mathew Evans <matt.evans@overleaf.com>

* [server-pro] bump version of expected release with these changes

---------

Co-authored-by: Mathew Evans <matt.evans@overleaf.com>
GitOrigin-RevId: bada93fec89bcc3f2bab85b6e60b2e27de88b9c2
2025-04-28 08:05:21 +00:00
Alf Eaton
247b4e274d Upgrade PDF.js to v5 (#24948)
* Reapply "Upgrade PDF.js to v5 (#24646)" (#24946)
* Upgrade core-js, caniuse-lite and babel

GitOrigin-RevId: 63398189301b5f5adc8a17b332d92dccfc26d612
2025-04-28 08:05:09 +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
Brian Gough
ed9844b2ec Merge pull request #25088 from overleaf/bg-increase-verify-blob-timeout
increase script timeout to avoid flaky tests in backupVerifier

GitOrigin-RevId: 4a52178b0e03ca9a69f82f7ddfe866ce689592b7
2025-04-25 08:05:53 +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
M Fahru
bb3a123b8d Merge pull request #25041 from overleaf/mf-update-careers-footer-link
[web] Update careers footer link

GitOrigin-RevId: 25b797b16fa5829ec970b2854f93c6ab270ecf24
2025-04-25 08:05:41 +00:00
Jakob Ackermann
86d310c741 [web] clsi-cache: fix download of .blg files (#25083)
GitOrigin-RevId: 69c8f789b8f8fa4b241c7563722e9a1cb6f86244
2025-04-25 08:05:37 +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
Antoine Clausse
13270dee2d [web] Tear down sidebar-navigation-ui-update, Update project-list look in SP/CE (#24920)
* Remove hacks that conditionally hid `ds-nav` survey

* Remove `getAssignment` of `sidebar-navigation-ui-update`

* Remove `hasDsNav`: make it true everywhere

* Remove dead code

* Update Footer so thin footer is shown in SP/CE

* Run `web$ make cleanup_unused_locales` & `bin/run web npm run extract-translations`

* [server-pro] fix learn wiki tests following DS navigation changes

* [server-pro] tests: remove logout action before switching session

* [server-pro] tests: fix logout test

* [server-pro] tests: use new css class for sidebar on project dashboard

* Revert "should add a documentation entry to the nav bar" test change

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 93eb7a1b03bb4e54ad1770150d83778b8f7f6727
2025-04-25 08:05:29 +00:00
Tim Down
cf36767f03 Merge pull request #25080 from overleaf/revert-25073-td-upgrade-react-error-boundary
Revert "Upgrade react-error-boundary to version 5"

GitOrigin-RevId: 3301adb508eed26e4429c6aa912abf9e81c1d9f8
2025-04-25 08:05:25 +00:00
Tim Down
247f04557c Merge pull request #25073 from overleaf/td-upgrade-react-error-boundary
Upgrade react-error-boundary to version 5

GitOrigin-RevId: ebccd35e10084aa221c437c09ddfdb86f6272cf3
2025-04-25 08:05:20 +00:00
Rebeka Dekany
3c154955b2 [web] Ensure buttons and links have discernible text on the editor page (#25005)
* Use OLIconButton for buttons lacking visible text

* Ensure correct ARIA attr for the Layout dropdown

* Add a tooltip to Layout button

* Add "Open dev tool" aria-label

* Add accessible names to the rail tab items

* Remove unused IconProps export

GitOrigin-RevId: 185937384cf5ec87b32238111d6621ac07789fb4
2025-04-25 08:05:16 +00:00
Brian Gough
612981bedb Merge pull request #24993 from overleaf/bg-history-buffer-use-cache-in-persist-changes
use chunkBuffer in persistChanges

GitOrigin-RevId: dd4cdf39ba53c3becf306119fed7eacfe67de15d
2025-04-25 08:05:12 +00:00
Brian Gough
a7466a7291 Merge pull request #24966 from overleaf/bg-history-buffer-optimised-get
add getCurrentChunkIfValid function

GitOrigin-RevId: e947a99ac928b58048a87cea0be1da34fcf3a9f8
2025-04-25 08:05:04 +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
Antoine Clausse
8ec9cd21b4 [latexqc] Update vite version (#25056)
Fixes https://github.com/overleaf/internal/security/dependabot/1398

GitOrigin-RevId: e759d529609df79c63e0c6c45cda941d45fe7ec8
2025-04-24 08:06:19 +00:00
Antoine Clausse
5861e4160c [latexqc] Continue the ESM migration (#24743)
* Set `"type": "module"` in package.json

* Update imports to include file extensions

* Update imports to include file extensions in test files

* Convert webpack files to ESM

* Update configureStore.js for ESM

* Make static-assets CJS, and rename with .cjs

* Misc: update imports to `node:path`

* Add vitest; Remove chai, mocha, sinon, expect, jsdom

* Return promises in conversion-controller, to make testing easier

* Update tests to vitest syntax

* Fix JSON import syntax and babel config

* Import combobo from NPM

* Rename `app.js` to `app.cjs`

This should prevent errors in the production app (https://console.cloud.google.com/cloud-build/builds;region=us-east1/8b42465c-0d07-4a08-b856-aa18c13fae46?project=overleaf-ops)

### Before

```
node@ea395ce612a8:/overleaf/services/latexqc$ node app.js
[...]
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/overleaf/services/latexqc/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///overleaf/services/latexqc/app.js:2:1
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
```

### After

```
node@ea395ce612a8:/overleaf/services/latexqc$ node app.cjs
--------------------------
===>  😊 Starting Server . . .
===>  Environment: production
===>  Listening on port: 8082
--------------------------
```

* Rename `app.js` to `app.cjs` (Fixup forgotten one)

* Rename `app.js` to `app.cjs` (Fixup 2)

* Rename asset files to `.js`

Fixes:
```
Refused to execute script from 'https://staging-latexqc.ieee.org/assets/9d6cc24692a7f912ff06.cjs' because its MIME type ('application/octet-stream') is not executable, and strict MIME type checking is enabled.
```
GitOrigin-RevId: f0b618f7fc4062fb6bdc3779dfc5defc5f72d614
2025-04-24 08:06:14 +00:00
M Fahru
ec763c69a7 Merge pull request #24801 from overleaf/mf-swap-trial-cta-tear-down
[web] Tear down `swap-trial-cta` and use the `enabled` variant as the default

GitOrigin-RevId: 2ba2f5c864908871797420aff976918a4e224ad3
2025-04-24 08:06:06 +00:00
David
1cfd5ca948 Merge pull request #24950 from overleaf/dp-writeful-editor-switch
Expose isNewEditor in window.overleaf.unstable.store for use by writefull

GitOrigin-RevId: be68b3bc62ea1bfb631f349475888b1153e47cfd
2025-04-24 08:05:58 +00:00
Brian Gough
12b96e40a5 Merge pull request #24977 from overleaf/bg-history-buffer-improve-tests
add more tests for chunk buffer in history-v1

GitOrigin-RevId: 3cfa2492efd67597a2782ca7a5671889a67049d5
2025-04-24 08:05:53 +00:00
Brian Gough
626416ed02 Merge pull request #24945 from overleaf/bg-redis-buffer-stats-script
add script for listing buffer stats from redis

GitOrigin-RevId: 7836563d51a5c6ded264d0e709d5cfcda70596e3
2025-04-24 08:05:49 +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
Jakob Ackermann
dd3956f5f4 [document-updater] delete dead code for handling JSON documents (#25036)
GitOrigin-RevId: 59a2c5f0174cd041ebda1ea4898114e6fb6d41a5
2025-04-24 08:05:35 +00:00
David
52898ac83b Merge pull request #25031 from overleaf/dp-page-number-color
Fix pdf page number color in safari

GitOrigin-RevId: 14745d50a16df1aa5129b068d5dcf3ae5bc81e8b
2025-04-24 08:05:27 +00:00
Jakob Ackermann
fe1129c2cf [web] avoid accessing the sharejs snapshot directly (#25037)
* [web] avoid accessing the sharejs snapshot directly

* [web] limit API interface for sharejs types

GitOrigin-RevId: faece372128e4580376e32fa93aa8fedf1e02957
2025-04-24 08:05:15 +00:00
Jakob Ackermann
7f086b21c8 [document-updater] modernize ApplyingUpdatesToADocTests (#25038)
- use beforeEach to ensure tests do not interfere with each other
  Notably, the 'when the ops come in a single linear order' test suite
  had state-changing tests that were dependent on the correct order.
  Also, the assigment of 'this.firstOpTimestamp' was in a test.
- consolidate populating project and doc ids
  The doc reference in this.update was undefined.
- fix doc reference in updates
  There were two misuses of 'doc_id' instead of 'doc'.
- Move mocking of MockWebApi.getDocument to the top and use
  sinon.resetHistory() or sinon.restore() for controlling the stub.
- Add another test for simple transforming of updates
  See 'when another client is sending a concurrent update'.

GitOrigin-RevId: 61ca8a1b0172920ad6ab1b604a9b9259cebddaad
2025-04-24 08:05:10 +00:00
Jimmy Domagala-Tang
b225b55e8d Merge pull request #24990 from overleaf/dk-paywall-modal-updates
Updates to AI assist interstitial modal

GitOrigin-RevId: d2365aaf36f1f61a39a0bd52357f4518736e2a7d
2025-04-23 08:05:35 +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
David
d492512d9e Merge pull request #24878 from overleaf/mj-editor-redesign-experiment
[web] Move editor redesign to labs experiment

GitOrigin-RevId: 5f11ff29a6c392ff6e448a16450e2e65a2574097
2025-04-23 08:05:22 +00:00
Andrew Rumble
1c672e55f5 Minor bump of webpack and @pmmmwh/react-refresh-webpack-plugin
GitOrigin-RevId: 55421a1cd66e0ec7177470f38fe9f575837b6bac
2025-04-23 08:05:11 +00:00
David
9d858dcf0f Merge pull request #24961 from overleaf/dp-back-to-editor
Update toolbar in history view to add BackToEditorButton

GitOrigin-RevId: 4c260126a373b1b3a7c31f9f4b44f6ae7fba6f36
2025-04-23 08:05:06 +00:00
David
584db6c301 Merge pull request #24989 from overleaf/mj-ide-redesign-modal-content
[web] Update copy in editor redesign switcher modal

GitOrigin-RevId: 9df3d6d580fec2540d0254e1f3a65b3b059bc63f
2025-04-23 08:05:01 +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
Eric Mc Sween
315bde6f1b Merge pull request #24968 from overleaf/em-chunks-concurrency-postgres
Handle concurrency during chunk extension in the Postgres backend

GitOrigin-RevId: fd706b73deacf141cbd478d3ed47f298e6c6db72
2025-04-18 08:05:37 +00:00
Eric Mc Sween
2256697323 Merge pull request #24967 from overleaf/em-chunks-concurrency-pg-migration
Add closed column to PostgreSQL chunks

GitOrigin-RevId: 6babf7e94936ebfac31650aa7f190630e3288bbf
2025-04-18 08:05:29 +00:00
Jakob Ackermann
ee2338a33b [web] align criteria for fallback to clsi-cache (#24970)
* [web] rename helper for browser cache bug, avoid confusion w/ clsi-cache

* [web] align criteria for fallback to clsi-cache

Notably, avoid the fallback from inside pdf-caching when disabled.

GitOrigin-RevId: 3fd918de14eef59c45c28cc5b5e256048cb91528
2025-04-18 08:05:25 +00:00
Christopher Hoskin
94e12ec404 Merge pull request #24971 from overleaf/csh-issue-19131-diable-filestore-endpoints
Disable the old filestore endpoints if user_files not defined

GitOrigin-RevId: f7d188cef3fe53835070903448690baff4ebad98
2025-04-18 08:04:59 +00:00
Domagoj Kriskovic
26032d6b77 Add origin for ai assist interstitial modal (#24904)
GitOrigin-RevId: 035edf8791b0afdc8c320598d09d99f5e84acc47
2025-04-18 08:04:55 +00:00
Andrew Rumble
adb9723d62 Log a warning when a user is rejected from accessing real-time by CORS
GitOrigin-RevId: 04a7ffbc24654c876688db446164bf36a162828f
2025-04-18 08:04:47 +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
Antoine Clausse
fa62529d82 [clsi] Replace diskusage by fs (#24789)
* Replace `diskusage` by `fs` in clsi

* Replace `diskusage` by `fs` in clsi-cache

* Update disk space calculations to include block size in bytes

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

* Add warning comments about Docker-for-Mac fs stats being off by a factor

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 02ea07e531b89bb3d10ddfe780348b19cbddad1f
2025-04-17 08:06:16 +00:00
Andrew Rumble
cde7ff5d2f Don't run the verifier loop when app created from test
GitOrigin-RevId: e8a565ae00019de66cbbaf961e0ee3ace90f800e
2025-04-17 08:06:11 +00:00