Commit Graph
100 Commits
Author SHA1 Message Date
Jakob Ackermann a6c98365d9 [web] use client-side filtering for split tests in admin panel (#34975)
* [web] use client-side filtering for split tests in admin panel

Filtering on non-indexed fields is not allowed with notablescan.

* [web] add initial value for DEFAULT_FILTERS.active

* [web] unset error before fetching split tests

GitOrigin-RevId: 0813873c5a90d57c4fdbfd0043fcc325f00408aa
2026-06-26 08:08:10 +00:00
Jakob Ackermann 1b553c0455 [migrations] only apply non-blocking migrations in CI (#34665)
* [migrations] only apply non-blocking migrations in CI

* [migrations] use "yarn run migrations" instead of "npm run migrations"

GitOrigin-RevId: d9f96db398adf2febcd82333295fb8d5eab741bb
2026-06-26 08:08:05 +00:00
Jakob Ackermann 9fd0d644cf [agents] refine guidance for running tests (#34977)
* [monorepo] fix handling of quoted MOCHA_GREP

* [agents] refine guidance for running tests

- nudge it towards scoped module targets
- nudge it to really run e2e tests when changed
- nudge it towards a11y cypress matchers
- recommend quoting for MOCHA_GREP

* [web] fix forwarding of mocha args from module Makefile

* [monorepo] use BRANCH_NAME_TAG_SAFE for building the ci image name

* [web] also make BRANCH_NAME_TAG_SAFE available in module Makefile

(It's not really needed, but will make copilot happy.)

GitOrigin-RevId: bfda3c8fe2b4f857ef111ac63f94b35a82ad75f8
2026-06-26 08:07:37 +00:00
Jakob Ackermann a8b4f2dc55 [web] reduce mongo lookups for compile requests (#34890)
* [web] _getUserCompileLimits: use owner.analyticsId directly

* [web] deduplicate project lookups for compile requests

* [web] add test case for prefetched project

GitOrigin-RevId: 0e140619c874accf8673153ed90af2ce70cf9234
2026-06-24 08:06:18 +00:00
Jakob Ackermann 1cc18dd0f0 [web] avoid UserAnalyticsIdCache for split-test assignments (#34803)
* [web] split-tests: add helpers to using an already fetched mongo user

* [web] split-tests: add ignoreOverrides option to getAssignment

* [web] split-tests: reuse already fetched mongo users where possible

* [web] notifications: fetch users in bulk for split-test assignment

* [web] split-tests: use session for assignment where possible

* [web] split-tests: pass req/res down into domain-capture hook

* [web] split-tests: explicitly throw early

* [web] split-tests: refine jsdoc types

* [web] mark analyticsId and labsProgram as required in user model

* [web] split-tests: refine jsdoc types

* Revert "[web] split-tests: pass req/res down into domain-capture hook"

This reverts commit 897a158384cd2b3e416fc34495b20d1e2a0e68f0.

GitOrigin-RevId: ea4afd15c2506f369827b5193fd16d220d3c7d0e
2026-06-23 08:06:42 +00:00
Jakob Ackermann 6b084424b5 [monorepo] fix running make lint from root (#33559)
* [monorepo] remove spurious package-name field from buildscript.txt

* [monorepo] align variables/paths across build script variants

* [monorepo] align linting/test setup for jobs/libraries

* [monorepo] fix "make lint/lint_fix" from root

* [wiki-algolia] integrate with yarn workspace

GitOrigin-RevId: a0954f2936d03cd4a69b3f2c8098d9ee2e361993
2026-06-23 08:06:37 +00:00
Jakob Ackermann 88267716a3 [web] adopt free/premium compile backend class (#34846)
* [web] adopt free/premium compile backend class

* [rails] adopt free compile backend class for pdf conversion

GitOrigin-RevId: e12c99a27363f5654132c2fcdc6c5d8ccc591868
2026-06-23 08:05:59 +00:00
Jakob Ackermann 3be2f320f8 [web] fix preference of new/old clsiServerId in double-compiles (#34862)
GitOrigin-RevId: 81cbbcec9fef79ebd0c5e7d90048fc4bda302108
2026-06-23 08:05:42 +00:00
Jakob AckermannandAndrew Rumble 6323fddbd8 [web] avoid UserAnalyticsIdCache (#33121)
* [web] always provide an analyticsId when registering new users

* [web] add recordEventForMongoUser and use it during login

* [web] use recordEventForMongoUser/recordEventForSession where possible

* [web] use session cache for analyticsId when refreshing features

* [web] add setUserPropertyForMongoUser and use it where possible

* [web] use setUserPropertyForSessionInBackground where possible

* [web] use mongo user for analyticsId when setting utm user properties

* [web] admin-panel: user updated user when sending events

* [web] enforce labsProgram being populated on user object

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

* [web] revert FeaturesUpdater.refreshFeatures change

* [web] labs: move session maintenance into handler

* [web] analyticsMiddleware: ensure that all users have labsProgram field

* [web] migrate a few more events to recordEventForSession

* [migrations] mark back-fill of db.users.analyticsId as required

* [web] setUserPropertyForSessionInBackground: throw early

---------

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: 19c26bc36abd8c11f0a8f458d25abfb7cbda0bb7
2026-06-17 08:08:32 +00:00
Jakob Ackermann d44e862a0c [web] throw early in UserCreator.createNewUser with missing analyticsId (#34664)
* [web] throw early in UserCreator.createNewUser with missing analyticsId

* [migrations] rerun back-fill of db.users.analyticsId

GitOrigin-RevId: eabf16326192fca4dbea00ad643cee4315c426c6
2026-06-17 08:06:59 +00:00
Jakob Ackermann 6bc9f1dae4 [server-ce] test: the first startWith must resetData when using dataDir (#34671)
* [server-ce] test: the first startWith must resetData when using dataDir

* [server-ce] test: fix order of creating user and resetting DB

GitOrigin-RevId: 2a6e6344919fe48d41704e1a3cb39c6e22b5a924
2026-06-17 08:06:54 +00:00
Jakob AckermannandAndrew Rumble f2ebe46506 [web] add migration for back-filling db.users.labsProgram=false (#34632)
* [web] add migration for back-filling db.users.labsProgram=false

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

* [web] include user.labsProgram=false in session

---------

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: 0b3322007f6a36d2999d646869dc84f2c6ad4d2d
2026-06-16 08:06:43 +00:00
Jakob Ackermann cb9e834a1f [project-history] return status "423 Locked" when redis lock is taken (#34429)
GitOrigin-RevId: f40230bc98e8ed8a5358e6db5c515cb2a58f9b85
2026-06-16 08:06:38 +00:00
Jakob Ackermann b11027d58f [monorepo] add clsi-sharded mode (#34614)
* [monorepo] provide clsi-sharded dev-env setup

* [monorepo] provide sharded clsi-nginx when using clsi-sharded

* [clsi-perf] run on all instances again

* [monorepo] switch default TL to 2025.1 in clsi (same as web)

* [monorepo] avoid starting base clsi when running clsi-perf with clsi-sharded

* [clsi-lb] use 3s check interval in clsi-sharded mode

GitOrigin-RevId: 3cae8f0c1db69dbd76b94b45dc45b3abb2fa0a83
2026-06-16 08:06:34 +00:00
Jakob Ackermann b193fe7121 [real-time] flag mismatching update.doc field and add fallback (#34531)
GitOrigin-RevId: ade5aefc473a74da8a99df7cc33a88bc49885d5d
2026-06-15 08:08:05 +00:00
Jakob Ackermann 58970cd6ea [clsi] prepare for non-representative clsiServerIds (#34546)
* [clsi] forward instanceType to web

* [clsi] expose zone in compile response

* [clsi-perf] add new fields for instanceType and zone

* [clsi] expose isPreEmptible flag in compile response

* [clsi-perf] also add isPreEmptible field

* [clsi] rename isPreEmptible -> isSpotInstance

GitOrigin-RevId: 2bc2d772e0b14da83afb51f5f3e4fefd3f60b733
2026-06-15 08:08:00 +00:00
Jakob Ackermann d5384d9fdb [web] add LRU cache for geoip details (#34521)
GitOrigin-RevId: 0c96b53228b3e4fd764ac09e029db8b3f2b45de7
2026-06-15 08:07:55 +00:00
Jakob Ackermann 6c9bf3774d [editor-core] speed up non-bmp detection (#34542)
* [editor-core] avoid duplicate non-bmp check on InsertOp.insertion

* [editor-core] remove non-bmp check from StringFileData

Existing content may contain non-bmp characters. New edits with non-bmp
input are rejected via non-bmp check in InsertOp constructor.

GitOrigin-RevId: e9ef3a4a8c4696e8dc751325608a788351791d1c
2026-06-15 08:07:46 +00:00
Jakob Ackermann 9743c7006e [clsi] tests: remove verbose after hook for printing metrics (#34532)
This was useful when iterating on the pdf-caching feature.
PDF caching has been stable for years. We can remove the logging now.

GitOrigin-RevId: 826c91c1e45d3dae1bb3ce5aeb7b6a3f9283392c
2026-06-15 08:06:23 +00:00
Jakob Ackermann 62c8fd37ac [clsi-lb] speed up refreshing server list from GCP (#34478)
* [clsi-lb] move retries to the individual GCP API call

* [clsi-lb] fix docker-compose.gcp.yml

* [clsi-lb] collect per-zone/per-group instances in parallel

* [clsi-lb] re-use the compute GCP client

GitOrigin-RevId: 46f7f89b0ddea061ed4df4df2fdbcb315f19cbaa
2026-06-10 11:58:57 +00:00
Jakob Ackermann 52453edfa5 [clsi-lb] migrate to node.js (#34242)
* [clsi-lb] migrate to node.js

- Add env var for dynamically defining backends
- Reuse the server params across template and haproxy admin commands
- Keep the exact same rendering of the template

* [clsi-lb] fix WORKDIR for CI

* [k8s] clsi-lb: populate PROJECT_ID

* [k8s] clsi-lb: c3d compile backend class sports c3d and c3 instances

* [clsi-lb] update build scripts

* [clsi-lb] adopt @overleaf/stream-utils

* [clsi-lb] enable --watch mode in dev-env

* [clsi-lb] update build scripts

* [clsi-lb] update build scripts

GitOrigin-RevId: e05165b04a09d8200ce7f3a2321f9f2556544788
2026-06-10 08:07:10 +00:00
Jakob AckermannandAnna Claire Fields a8a58f59a4 [monorepo] remove haproxy from service-to-service communication (#34391)
* [web] gracefully handle notifications being down on project dashboard

* [monorepo] remove haproxy from service-to-service communication

Co-authored-by: Anna Claire Fields <acfields11@gmail.com>

* [monorepo] fix OVERLEAF_LATEXQC_API_BASE_URL in dev-env

* [SaaS test fix] update history v1 export base url

---------

Co-authored-by: Anna Claire Fields <acfields11@gmail.com>
GitOrigin-RevId: cf355ef061412a1b57b5383cb60d4be574055af5
2026-06-10 08:05:37 +00:00
Jakob Ackermann 7f5af99ee9 [web] determine rootResourcePath if not set in compile request (#34398)
* [web] determine rootResourcePath if not set in compile request

This affects the following compile requests:
- compile request from "Download PDF" button on project dashboard
  Pre-resolving the rootResourcePath for all projects is too expensive.
  Adding an endpoint to resolve it is too slow and doubles project auth
  check.
- custom frontends
  Can't do much about these. I tried blocking them, requests still come
  in after weeks of returning 400s.

The rootDoc maintenance methods now return {rootResourcePath,rootDocId}
rather than just the rootDocId. This avoids an extra project lookup when
the rootDocId was updated.

GitOrigin-RevId: ab7c539b7ffd162bde0903fe1040a48834a245f5
2026-06-09 08:07:36 +00:00
Jakob Ackermann fc2abf5b24 [web] fix submit modal in Codespaces (#34137)
GitOrigin-RevId: dc057ed736e97265a901b1cf21995c1f391339a5
2026-06-05 08:06:15 +00:00
Jakob Ackermann 0501586743 [latexqc] migrate to local s3, add codespaces support, add e2e tests (#34136)
GitOrigin-RevId: 167171103c14ed3c4ba2939d80231c343645e53a
2026-06-05 08:05:59 +00:00
Jakob AckermannandBrian Gough df61bfc788 [clsi] initial version of /convert/pdf-to-jpeg (#33752)
* [monorepo] consolidate clsi-lb host/ip env-vars

Target env-var is CLSI_LB_HOST. Keep CLSI_LB_IP populated for a week.

* [clsi] initial version of /convert/pdf-to-jpeg

* [rails] use fake-secrets in CI and Codespaces

* [rails] adapt tests for using clsi to convert PDFs to image

* [rails] add rake task for comparing clsi conversion with transloadit

* [clsi] double check that output.jpg is a regular file

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

* [clsi] fix composing basename

* [monorepo] fix clsi-lb host env-var post merge

* [monorepo] sort dev-environment.env hosts

* [rails] use local pdf file rather than downloading it again

Download from the old renderer code path still. It's dead code.

* [terraform] clsi: enable pdf to jpg conversion

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 5ecaa8559d299486340bb3961f06b29f7c4dfcca
2026-06-05 08:05:55 +00:00
Jakob Ackermann 6869ad5bdf [misc] remove HTTP method override capability (#34243)
GitOrigin-RevId: 2d88b9cdb63c7861e0604bb19d0e0c924701f3e4
2026-06-04 08:06:22 +00:00
Jakob Ackermann ec84a88eb3 [server-ce] tests: build git-bridge latest locally in CI (#34177)
GitOrigin-RevId: 78bf654eee77a62185a53b1abdf2cd9ae0662802
2026-06-02 08:08:39 +00:00
Jakob Ackermann 3c763015ce [monorepo] consolidate clsi-lb host/ip env-vars (#33894)
* [monorepo] consolidate clsi-lb host/ip env-vars

Target env-var is CLSI_LB_HOST. Keep CLSI_LB_IP populated for a week.

* [monorepo] sort dev-environment.env hosts

GitOrigin-RevId: 95d12753c86ffb91264f8971e1c2c412c60de790
2026-06-01 08:04:31 +00:00
Jakob Ackermann e7a202a0bf [clsi] fix duplicate import of Errors module (#34068)
GitOrigin-RevId: e1dec5e5d439e5d178f9f7400c0873e0be6e90f8
2026-05-28 08:08:10 +00:00
Jakob Ackermann 7e4820f0b0 [clsi] migrate convert project to document to compile from history (#33985)
* [clsi] add request flag for isCompileFromHistory

* [clsi] derive cacheKey for history snapshot from compile dir

* [clsi] migrate convert project to document to compile from history

* [clsi] address review feedback

* [web] determine root doc at the time of converting the project

* [web] wait for flush before starting document conversion

* [saas-e2e] add tests for root doc override when converting project

GitOrigin-RevId: 71c578030949b89f3a74e7f7ab882dfa9c98c17a
2026-05-28 08:08:06 +00:00
Jakob Ackermann 666788be70 [clsi] nginx: use a fixed project id for the content domain access check (#33291)
GitOrigin-RevId: 7801fa001e42b1b96d851f74efff396bc6471980
2026-05-28 08:08:02 +00:00
Jakob Ackermann d610f404e7 [history-v1] increase timeout for downloading the latest content as zip (#34045)
Remove the default timeout as it's too low and a big footgun.

GitOrigin-RevId: 42e26a2a288ad3e38252bc98b909a4bc8b10f70c
2026-05-28 08:06:47 +00:00
Jakob Ackermann 984b8e3f4a [web] add a hook for discovering the current root doc (#34027)
GitOrigin-RevId: d1930e6b13ca18dbae927dc15a5c6507351f71c8
2026-05-28 08:06:08 +00:00
Jakob Ackermann c7b56ff295 [monorepo] remove contacts service (#33550)
GitOrigin-RevId: 15478243e4d6a56b81eee28f76f9ef7dc54a45d7
2026-05-27 08:07:19 +00:00
Jakob Ackermann c0111fec29 [monorepo] run format_fix and trigger prettier on .agents changes (#33759)
* [monorepo] run format_fix and trigger prettier on .agents changes

* [monorepo] cleanup stale prettier ignore rule

* [monorepo] tweak format:monorepo-check:fix

GitOrigin-RevId: e6c29a0c601fbf388a048eb42706f9bd0a18344f
2026-05-19 08:04:48 +00:00
Jakob Ackermann 1f8371e0a3 [document-updater] flush_all: log progress after every 1k projects (#33757)
GitOrigin-RevId: b5b68f6f53bece51234799fb626d0d6a2a5b590c
2026-05-19 08:04:41 +00:00
Jakob Ackermann 293d89a4cb [web] inline contacts service into web (#33546)
GitOrigin-RevId: d5e84d4f80f5ad4e951934d6dcdc332b0d26f3d0
2026-05-19 08:04:34 +00:00
Jakob Ackermann 99148d5956 [web] silence customer.io integration when not configured in dev/CI (#33731)
GitOrigin-RevId: c9498f57f0dacb3d18cd7617388df11d5cf029de
2026-05-19 08:04:17 +00:00
Jakob AckermannandBrian Gough b1a0bb16db [migrations] delete expired oauth access tokens after 24h (#33575)
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 7f67a7e6949472c66f5f75a6053161d8e359f5df
2026-05-19 08:04:09 +00:00
Jakob Ackermann 0c8e93bb33 [server-pro] fix tag name for branches with slash (#33685)
GitOrigin-RevId: 25ee2d340b17ce7c758ec8c7e156a67928ab6c73
2026-05-14 08:06:38 +00:00
Jakob Ackermann 75a12dda17 [web] resync_projects: use the secondaries for all reads (#33684)
* [docstore] add useSecondary flag to projectHasRanges

The rev-check for unarchiving always consults with the primary.

Two extra changes:
- Add a projection argument to peekDoc in order to skip lines download
   from projectHasRanges.
- Add one retry to peekDoc to reduce chances of surfacing a rev-check
   violation.

* [web] resync_projects: use the secondaries for all reads

* [web] add default value for useSecondary

* [docstore] add default value for useSecondary

* [k8s] docstore: set MONGO_HAS_SECONDARIES=true

GitOrigin-RevId: f15ec4fdc1cabe74c1eab87bec85f28d6f7a587d
2026-05-14 08:06:26 +00:00
Jakob Ackermann b62d4814c3 [monorepo] turn throw statements in callback code into callback calls (#33524)
* [eslint-plugin] add rule for throw inside callback code

* [monorepo] enable our custom eslint plugins globally

* [monorepo] fix running make lint from root

* [monorepo] turn throw statements in callback code into callback calls

* [monorepo] add eslint-plugin libraries to all the Dockerfiles

* [monorepo] install eslint-plugin library at the root level

* [linked-url-proxy] add eslint-plugin library into Dockerfile

* [latexqc] add our eslint-plugin to eslint config

GitOrigin-RevId: b05e3ebbefb62370f2422e83880dd3913815270d
2026-05-14 08:05:47 +00:00
Jakob Ackermann 7c50dc9990 [history-v1] add endpoint for downloading latest zip (#33181)
* [history-v1] add endpoint for downloading latest zip

* [web] address review feedback

* [web] tests: do not overwrite db.projects.overleaf, extend it

* [web] set includeReferer flag from downloading zip

GitOrigin-RevId: e63e549f004230086f82eccf03b43fd62bde6071
2026-05-13 08:06:53 +00:00
Jakob AckermannandAnna Claire Fields b1931d0b3b [web] cleanup archived split-test assignments from user record on login (#33365)
* [web] cleanup archived split-test assignments from user record on login

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [migrations] purge archived split tests from all users

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [web] add missing mock and update snapshot test

* [web] gracefully access db.users.splitTests

---------

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>
GitOrigin-RevId: bd185074a402556d7b7c812208cf834dd52b27a5
2026-05-13 08:06:49 +00:00
Jakob Ackermann 6a911e4ec3 [web] do not send a second response from api error handler (#33526)
GitOrigin-RevId: 6974f5d5f7042d5170eb2a755715b2d139f06130
2026-05-12 08:06:25 +00:00
Jakob Ackermann 1df98c028d [web] add includeReferer flag to SplitTestHandler.getAssignment (#33235)
* [web] add includeReferer flag to SplitTestHandler.getAssignment

* [web] tests: migrate User.getSplitTestAssignment to async/await

I don't want to fight with callbacks and optional arguments. Just move
it to async/await. New tests should use async/await, so there is no
point in making this work in callback-hell.

* [web] remove unused URL import

GitOrigin-RevId: 6251001e6ba7354f704fa663be8ef365ca0b9d23
2026-05-12 08:06:21 +00:00
Jakob Ackermann 44efc9d745 [monorepo] avoid corepack network requests (#33502)
* [monorepo] avoid corepack network requests

- Download yarn via corepack as the first step in all the docker files
- Turn off networking in corepack
- Do not run things in the upstream node image
  Instead, use the monorepo image, or base layer in all the services.
- Always build the base layer when running tests (uses cache)

* [monorepo] install corepack in shared place

* [clsi-lb] remove unrelated changes

* [web] add missing DC_RUN_FLAGS

* [monorepo] only rebuild test images locally

Also remove spurious build config in docker-compose.ci.yml.

* [server-ce] test: make yarn files available to host-admin and e2e

* [monorepo] put the corepack install snippet in a few more places

GitOrigin-RevId: 38005016ae5a708e12295e246269d6c18fece937
2026-05-08 08:08:57 +00:00
Jakob Ackermann d97a659f92 [web] make double compile test parameters configurable via env vars (#33406)
* [web] make double compile test parameters configurable via env vars

* [k8s] web: enable double compile test for free compiles on n4 instances

GitOrigin-RevId: 3a5cb8ed6d044fcf3f4c0d2b9d252326bac48511
2026-05-06 08:07:28 +00:00
Jakob Ackermann 1aa6f03b3c [web] fix make test_unit_watch (#33370)
* [web] check for missing module tsconfig in CI

* [web] add missing tsconfig into test_unit container

GitOrigin-RevId: 7b861f8e68f961e3455b72b5660cf3825389c656
2026-05-06 08:06:26 +00:00
Jakob Ackermann d61e3f5521 [web] fix caching of session.analyticsId (#33300)
* [web] fix caching of session.analyticsId

* [web] disable analyticsIdMiddleware tests for Server Pro/CE

GitOrigin-RevId: 2acf76f937adabd62b1e9f876a858211ef7a13c6
2026-05-05 08:06:09 +00:00
Jakob Ackermann 37cc65ec7e [web] consolidate clsi downloads and add zod validation (#33069)
* [web] consolidate clsi downloads and add zod validation

* [validation-tools] make prettier happy

* [web] make clsiServerId optional

* [web] fix type of buildId

* [web] gracefully handle ObjectId

* [web] fix type of buildId

* [monorepo] address review feedback

- cjs export
- update module path in comments
- skip adding ?clsiserverid if not set
- allow nested output file download for submissions and add tests

* [web] address review feedback

* [web] cache one more zod schema

* [web] fix unit tests

GitOrigin-RevId: 0a1e618955983e035defd6d3c0528b81e0e85c95
2026-05-05 08:06:05 +00:00
Jakob AckermannandDavinder Singh 50abfe8f0c [migrations] add migration for back filling db.users.analyticsId (#33115)
* [migrations] add migration for back filling db.users.analyticsId

Co-authored-by: Davinder Singh <davinder.singh@overleaf.com>

* [web] add acceptance test for backfilling db.users.analyticsId

---------

Co-authored-by: Davinder Singh <davinder.singh@overleaf.com>
GitOrigin-RevId: a0840969ac0c4c84e874c6f00cf0a78857a4bb06
2026-04-30 08:06:38 +00:00
Jakob Ackermann 4e138e6f99 [web] make labs releases available to E2E tests/Codespaces (#33242)
GitOrigin-RevId: a4e6a6bd6ffb7f3e9331aa81daf19e22b894d771
2026-04-30 08:06:34 +00:00
Jakob Ackermann da11cf2669 [monorepo] fix running tests locally (#33186)
* [monorepo] fix running tests locally

* [web] fix east invocation

* [web] move corepack into entrypoint

* [web] fix running module acceptance tests locally

* [web] fix merged module targets

* [web] remove spurious change

GitOrigin-RevId: 84cf7f8d768d3429c8a98c789acf76f6cecd6e3e
2026-04-29 08:05:42 +00:00
Jakob Ackermann 68c41e9b66 [history-v1] fix re-running test_acceptance_run (#33183)
* [history-v1] fix re-running test_acceptance_run

Preserve the contents of the migrations collection. Deleting the entries
does not "undo" the migrations. On re-run east would try applying all
migrations and fail as things were already applied.

* [history-v1] remove guard migration before running tests

GitOrigin-RevId: e6eeafd58215e5148dd70c37c7a87d84e0a12bf3
2026-04-29 08:05:16 +00:00
Jakob Ackermann f3ec774e6b [github] code spaces: add extra-split-tests.json (#33015)
* [github] code spaces: add extra-split-tests.json

* [github] address review feedback

* [github] add missing bind mount

* [monorepo] mount split test configs with :ro

* [monorepo] only mount backup/split-tests into web

GitOrigin-RevId: 6334a44599a2c8bb79bf1ad698e656c8bee3992b
2026-04-29 08:05:08 +00:00
Jakob Ackermann 633705e604 [server-ce] tests: extend debug logs (#33098)
GitOrigin-RevId: 5283eb8ab39f94ae8389cc4ccc3f288d401d3e52
2026-04-27 08:05:51 +00:00
Jakob Ackermann 5c317644bd [server-ce] test: Add debugging in Jenkins (#33019)
GitOrigin-RevId: dd38d580109e870a966d1442a7c4133cd05ca3a3
2026-04-23 08:06:22 +00:00
Jakob Ackermann 926d6bccd7 [clsi] reduce write traffic to clsi-cache from free users (#32958)
GitOrigin-RevId: c01cc21c3c82f361c7d82843e65bb087b21434ed
2026-04-22 08:05:59 +00:00
Jakob Ackermann 4ce5620b1d [web] add metrics for mongo access in split test system (#32920)
GitOrigin-RevId: cd93401bace60c003a63914e2898cf1f0defdabc
2026-04-21 08:05:14 +00:00
Jakob Ackermann ad79c85cea [web] collect mongo stats on native client (#32909)
* [metrics] mongo: fail when command monitoring is not available

* [metrics] mongo: add optional client label to pool metrics

* [web] collect mongo stats on native client

* [metrics] mongo: record namespace of find commands

* [metrics] mongo: add counter for all the commands with collection label

* [web] add missing mock

GitOrigin-RevId: 9f378d8aa8d7167f56cf512681d63ef115c6dd98
2026-04-20 08:05:44 +00:00
Jakob Ackermann 78adc2ae18 [monorepo] Try to get make install working in copilot (#32800)
* [monorepo] move building of nginx proxy into Makefile

* [v1] add fake-secrets.env

* [github] add copilot-setup-steps.yml workflow

* [make] debug permissions

* [monorepo] use the host uid/gid for monorepo service

* [web] populate DOCKER_USER for test_frontend_ct

* [github] run npm install outside docker in Copilot sandbox

* [monorepo] add comment for building nginx-proxy image locally

* [monorepo] change uid/gid of node user in cypress image

* [monorepo] low-level rewrite of passwd and groups to match host user

GitOrigin-RevId: d74a5801f0318bab7e7f460374255426706002a3
2026-04-20 08:04:35 +00:00
Jakob Ackermann 53e6da5e98 [monorepo] make format_fix/lint_fix easier to use (#32865)
* [monorepo] run npm install before top-level lint/format

* [monorepo] extend lint_fix for web

* [monorepo] bin/run: silence docker compose

We do not need it to print the newly created containers name.

* [monorepo] run format:fix

* [monorepo] run all the tasks or services/web/lint_fix_other in docker

GitOrigin-RevId: 997b360d1136f466c8e6bf8c5ad0e1189406d1f1
2026-04-17 08:07:12 +00:00
d56477565c [web] deduplicate getting the project when loading the editor (#32762)
* [web] enable async local storage on all the endpoints

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

* [web] deduplicate getting the project when loading the editor

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

* [web] use ProjectAccess state for computing analytics segmentation

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

* [web] restore ownership of active flag and deferredTpdsFlushCounter

* [web] add missing await

* [web] update unit tests

* [web] add metrics for project access caching

* [web] add missing test mock

* [web] invalidate async local storage when changing project access

* [web] deduplicate project lookup when checking for token access

* [web] add helper function for getting cached ProjectAccess

* [web] add acceptance test for caching of ProjectAccess

* [web] account for saas-only project access in tests

* Revert "[web] enable async local storage on all the endpoints"

This reverts commit 1b82f3b935040e8cfd180d1f6bf4183a655580e2.

* [web] add async local storage to project endpoints in top-50

* [web] invalidate async local storage for project access from modules

Co-authored-by: Jessica Lawshe <jessica.lawshe@overleaf.com>

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Jessica Lawshe <jessica.lawshe@overleaf.com>
GitOrigin-RevId: 3eea7956b24e6f937dc1c17948681063d4dca3ea
2026-04-17 08:07:08 +00:00
Jakob Ackermann 6117feef1b [chat] clone comment threads when cloning project with ranges (#32852)
* [project-history] add best effort flush when cloning project

* [web] update labels in clone project modal for admins

* [project-history] do not shadow history flush failure

* [web] fix accessible label for 'Add comment' button

* [chat] clone comment threads when cloning project with ranges

GitOrigin-RevId: ef30204c8a94b3d6204d56dcca2f62a46319996b
2026-04-17 08:07:03 +00:00
Jakob Ackermann 933c0c2943 [web] use default nav-bar color for admins in dev-env (#32798)
GitOrigin-RevId: e3608ce699ac38ef33805618df456c94c6bf587b
2026-04-17 08:06:59 +00:00
Jakob Ackermann 5a5763884e [github] code spaces: tweaks from initial feedback (#32834)
* [github] code spaces: add more standard users with a common password

* [github] code spaces: automatically share dev-env with Overleaf org

* [github] code spaces: merge split tests rather than replacing them

* [github] code spaces: ts-check the setup script in web

GitOrigin-RevId: 1a86ac7e0304d47e68290352f58a0e193eed1d77
2026-04-16 08:06:10 +00:00
Jakob Ackermann be2e875bc5 [web] gracefully handle old history resyncs without origin (#32822)
GitOrigin-RevId: 6e9d878234fea8bdb74534b1f23ee127e5c2daaf
2026-04-16 08:05:31 +00:00
Jakob Ackermann 3dc8899334 [web] add admin page for project history failures (#32751)
GitOrigin-RevId: c9564e07239b761851c9a86894f9ef3023dfcf2b
2026-04-15 08:05:57 +00:00
Jakob Ackermann 7faa4c5db4 [project-history] normalize failure messages (#32748)
* [project-history] normalize failure messages

* [project-history] add tests for normalizing failure messages

GitOrigin-RevId: ec15fdba97215047067c10c3fd16ad64696af20b
2026-04-15 08:05:53 +00:00
Jakob Ackermann 5a6c066847 [web] allow admins to clone projects with ranges and entire history (#32739)
* [web] add consistent aria-label to editing/reviewing toggle

* [docstore] add endpoint for getting all docs with ranges

* [history-v1] fix schema of chunkId when deleting old history chunk

* [web] skip duplicate project lookup for resolving rootDocPath

* [web] ignore new limits for root doc path when making debug copy

* [web] allow admins to clone projects with ranges and entire history

* [web] fix tests

* [history-v1] re-order params for cloning project

* [web] fix duplicate import of logger after merge

* [project-history] re-order params for cloning project history metadata

GitOrigin-RevId: 7fa35b4f90885dd453150a348d491ba0ec8de412
2026-04-15 08:05:49 +00:00
Jakob Ackermann 917d2700c8 [web] use a global shared mock for the metrics module (#32799)
GitOrigin-RevId: 72874ba6c06c2a602b01cc029bc9c71ce3ce8892
2026-04-15 08:05:38 +00:00
Jakob Ackermann b893ba36e2 [monorepo] add integration for GitHub Code Spaces (#32722)
* [web] serve site manifest as application/json

* [monorepo] bail out early from dev-env-setup when inside devcontainer

* [monorepo] move utils for waiting for services into shared bash script

* [monorepo] move domain related env-vars into dedicated .env file

The .env file will be overridden in GitHub Code Spaces.

* [monorepo] remove unused initial_mongo_setup Make target

It was previously used for the mongo replica set setup.
That setup is a docker init script now.

* [monorepo] add flag for silencing docker build output

* [monorepo] add integration for GitHub Code Spaces

* [web] make prettier happy

* [web] restore no use-credentials for manifest outside code spaces

* [monorepo] run make install as part of post-start again

GitOrigin-RevId: 8c2cc3b969b7e3e8f9c5dac778192c9412cbf4df
2026-04-13 08:04:22 +00:00
Jakob Ackermann 3f62eac181 [web] add button for removing collaborator via project admin page (#32585)
* [web] useAsync: clear previous error on retry

* [web] add button for removing collaborator via project admin page

GitOrigin-RevId: c5efaef81600787265d669b5919fb9b1cfdd3ef3
2026-04-10 08:04:44 +00:00
Jakob Ackermann 95793037e6 [web] turn nav-bar and toolbar red when having admin powers (#32582)
GitOrigin-RevId: 69c518ea113b6988002156c4ab6a97bbb9704d19
2026-04-10 08:04:41 +00:00
Jakob Ackermann ad508b1882 [project-history] migrate simple request usages to fetch-utils (#32539)
* [project-history] remove unused getQueueCounts in tests

* [project-history] migrate simple request usages to fetch-utils

GitOrigin-RevId: 0e299a9d2ea968b87d7f0f2fc1626393ca4e4fdc
2026-04-01 08:05:41 +00:00
Jakob Ackermann 7a4ee32af3 [history-v1] fix missing linked file metadata when adding file (#32524)
* [overleaf-editor-core] rename stats field for file metadata

* [history-v1] fix missing linked file metadata when adding file

* [history-v1] address review feedback

* [saas-e2e] remove extra login call

GitOrigin-RevId: 178254993f9a9803b160ad8bb661f480144a3cf2
2026-03-31 08:08:14 +00:00
Jakob Ackermann 8a67258461 [project-history] remove unused DocumentUpdaterManager (#32537)
GitOrigin-RevId: f2806187e2ae4e768f48a724712daffd4168e4fb
2026-03-31 08:07:43 +00:00
Jakob Ackermann 0544aded40 [clsi] handle draft mode and tikzexternalize as part of sync phase (#32516)
* [clsi] handle draft mode and tikzexternalize as part of sync phase

* [clsi] emit empty string from SafeReader on ENOENT

* [clsi] persist history state after clearing dirty state without changes

GitOrigin-RevId: d9dcd2e6887017f7935b5e95bdbdc6e11a3b18f5
2026-03-31 08:07:19 +00:00
Jakob Ackermann 9f8f77e56f [web] extend history debugging with estimate on snapshot size (#32502)
GitOrigin-RevId: 6ee75d227c0d093e4698324f6cc018b077076730
2026-03-30 08:06:09 +00:00
Jakob AckermannandAnna Claire Fields d66a856baa [clsi] remove locking from docker actions (#32373)
* [clsi] remove locking from docker actions

Start:
- We have an in-memory lock on the compile request

Destroy:
- as part of run: see above
- as part of cleanup: we check the last access time now, so it cannot
  happen concurrent to compiling anymore.

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>

* [clsi] update comment

---------

Co-authored-by: Anna Claire Fields <anna.fields@overleaf.com>
GitOrigin-RevId: a58df45416ae31c0b38d5efec7f9371d747303df
2026-03-27 09:06:28 +00:00
Jakob Ackermann 5ded3f5f90 [monorepo] fix prettier formatting (#32483)
* [monorepo] fix prettier formatting

* [monorepo] use a single prettier invocation for monorepo-check

GitOrigin-RevId: cf0cc2293b228be707ff23bdb3c5781c1f8d69f3
2026-03-27 09:06:15 +00:00
Jakob Ackermann dec809913c [web] block malformed compile requests from known other frontends (#32461)
The req.body.rootResourcePath has been shipped three weeks ago, so it's
unlikely to trip up stale editor sessions.

For now, only block node-fetch and log the rest.

GitOrigin-RevId: 541189675f68fdcab09f4b409b4143024a29f94a
2026-03-27 09:06:10 +00:00
Jakob Ackermann 828e196a69 [web] switch /status/compiler/:projectId to compile from history (#32458)
GitOrigin-RevId: d55b0078a3fa59af4f8f1eb60d29d2dc68397f9a
2026-03-27 09:06:06 +00:00
Jakob Ackermann 8fa18e6296 [web] try harder at flushing projects during soft deletion (#32454)
GitOrigin-RevId: 2e35e75d4219b720e7d12ff7a5534bf1ed302d98
2026-03-27 09:06:01 +00:00
Jakob AckermannandBrian Gough be67efb4d7 [web] migrate compile of templates/example project to history mode (#32453)
* [web] migrate compile of templates/example project to history mode

* [saas-e2e] give clsi-cache more time to process the jobs

* [web] add comment on in-memory project update

Co-authored-by: Brian Gough <briangough@users.noreply.github.com>

* [saas-e2e] add retries to clsi-cache check

* [saas-e2e] remove spurious retry trigger

* [saas-e2e] remove broken assertion

---------

Co-authored-by: Brian Gough <briangough@users.noreply.github.com>
GitOrigin-RevId: 8766662cbe0ab5520c5c79d86fa6f774e012b3da
2026-03-27 09:05:56 +00:00
Jakob AckermannandMalik a8abc22e6c [web] extend project admin page for history debugging (#32437)
* [web] extend project admin page for history debugging

* [web] address review feedback

Co-authored-by: Malik <malik.glossop@overleaf.com>

---------

Co-authored-by: Malik <malik.glossop@overleaf.com>
GitOrigin-RevId: 01866e8c8529bc8332c49baf4ad281e300f8cdd4
2026-03-27 09:05:52 +00:00
Jakob Ackermann 205573c01a [web] fetch file-tree in fallback to old compile mode (#32403)
* [web] fetch file-tree in fallback to old compile mode

* [web] tweak unit test

GitOrigin-RevId: 1c5f8cb1f0cb15c91efc46babec343d228631019
2026-03-24 09:06:22 +00:00
Jakob Ackermann adef5b26fb [web] gracefully handle broken histories when compiling from history (#32386)
* [web] gracefully handle broken histories when compiling from history

* [web] trim down schema

GitOrigin-RevId: 97d59b31eb25644d7de1194a45281def6982b130
2026-03-24 09:06:18 +00:00
Jakob Ackermann 01f7bba166 [web] populate clsi-cache for all users (#32369)
GitOrigin-RevId: ebe5c6b40aa98217de599f15a5bf63b6facf060b
2026-03-23 09:06:43 +00:00
Jakob Ackermann 52c73e9247 [web] handle 502 from clsi-lb like 503 (#32357)
GitOrigin-RevId: 3e2ec7f85e57e749131507d1fd823cf4b25ad4ae
2026-03-23 09:06:27 +00:00
Jakob AckermannandEric Mc Sween 07397bbdde [clsi] avoid server error when clearing cache while compiling (#32349)
* [clsi] avoid server error when clearing cache while compiling

* [clsi] tweak API around releasing locks

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

---------

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: d3f171467d3bc26941758dd333f30049b37a05c8
2026-03-23 09:06:18 +00:00
Jakob Ackermann c9ba2ac025 [web] enable clsi-cache for all compiles for 20min during outages (#32337)
* [web] enable clsi-cache for all compiles for 20min during outages

* [web] populate clsi-cache when compile from history is enabled

* [web] hide history snapshot from frontend

GitOrigin-RevId: e46c8b5ab401ebdc2407e44eb95439e4d43400da
2026-03-23 09:06:00 +00:00
Jakob Ackermann 3aa69c6ffa [k8s] clsi-cache: double the number of shards (#32323)
* [k8s] clsi-cache: double the number of shards

* [monorepo] add missing clsi-cache env vars to dev-env

* [clsi] flip direction of clsi-cache shard migration

* [clsi] remove upper bound from clsi-cache shard migration

GitOrigin-RevId: a325a11c3ac9e22a12ad2d8ea802b91d2e175e24
2026-03-20 09:07:11 +00:00
Jakob Ackermann 6377624d25 [clsi] ignore download errors for binary files in compile from history (#32263)
GitOrigin-RevId: 3c1940b2d56701ec4b07d1457ee1af2de317a047
2026-03-19 09:07:00 +00:00
Jakob Ackermann 69a7927267 [clsi] shard clsi_compiles_total metric by syncType (#32255)
GitOrigin-RevId: 43111697323ec6697ef5f42cf17807ea564181a0
2026-03-19 09:05:55 +00:00
Jakob Ackermann c2130dccb9 [clsi] use cheapest gzip compression level for history snapshot (#32251)
memoir manual with 1.5MiB snapshot:

level |load/decompress time | store/compress time |  size   | ratio | total sync time
 ---  | ---                 | ---                 |  ---    | ---   | ---
 6    | 18ms                | 57ms                |  412KiB | 26%   | 88ms
 1    | 17ms                | 28ms                |  509KiB | 32%   | 53ms
 0    |  8ms                | 10ms                | 1578KiB | 0%    | 33ms

total sync: read snapshot, walk dir, sync files to disk, save snapshot

GitOrigin-RevId: a2b1ee063af5aa749014f942db5e08bb1e685848
2026-03-19 09:05:50 +00:00
Jakob Ackermann f2614f44c5 [web] add link to v1 admin page from template (#32229)
GitOrigin-RevId: 01a95038faca6e2b85b274b7ed045dd4cb8e9367
2026-03-19 09:05:42 +00:00
Jakob Ackermann f947b549e4 [clsi-perf] migrate to compile from history mode (#32234)
* [clsi] only download history snapshot from clsi-cache when enabled

* [clsi-perf] migrate to compile from history mode

GitOrigin-RevId: 2dd54e032bd85d6335488741c039a5a1bd60090d
2026-03-18 09:07:51 +00:00