700 Commits

Author SHA1 Message Date
claude 045d458875 feat(editor): native Lezer grammar for Typst syntax highlighting
Build and Deploy Verso / deploy (push) Has been cancelled
Replace the StreamLanguage tokenizer with a full LR grammar compiled by
@lezer/generator, giving Typst the same parse-tree infrastructure that
LaTeX and BibTeX already use.

Grammar features:
- Headings (=, ==, …) via SOL-detecting external tokenizer
- Code expressions (#keyword, #func(args), #ident.method, #{…}, #[…])
- Named argument highlighting (key: value in function calls)
- Inline and display math ($…$)
- Strong (*…*) and emphasis (_…_) with bold/italic formatting
- Raw blocks (```lang…```) and inline raw (`…`)
- Nested block comments (/* /* */ */) via depth-tracking external tokenizer
- Labels (<name>) and references (@name)
- Backslash escapes

Infrastructure changes:
- lezer-typst/typst.grammar — new Lezer grammar
- lezer-typst/tokens.mjs — external tokenizers for context-sensitive lexing
- scripts/lezer-latex/generate.mjs — Typst added to grammars array so the
  existing lezer-latex:generate script (and Dockerfile step) compile it
- .gitignore — generated typst.mjs / typst.terms.mjs excluded from git

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 19:49:17 +00:00
Liam O'Brien f1282ee5cd Helper script for changing expiry of git pat (#34234)
* Helper script for changing expiry of git pat

* Validation fail for invalid date

GitOrigin-RevId: 6786d4e808e0e4e87ef1293f4c22236257948128
2026-06-04 08:05:51 +00:00
Liam O'Brien e53c6f2aea Notify users about expiring git PATs and expose PATs in admin panel (#33802)
* Allow admin access to user PATs

* Tests for new screen in admin panel

* Adding error for invalid token and way to parse error for OAuth 2

* Git bridge handles expired PAT

* Script for alerting on close to expiry and expired git tokens

* Refactoring and simplifying

* Updating email templates to match agreed docs

* tweak to email subject to include Overleaf

* Allowing dry run in scripts and general tidy up

* removing redundant tests and dry running script

* Fixing CI errors

* Adding new tab to admin test expectation

* Address PR feedback on oauth2-server changes

- Replace ad-hoc overleafErrorCode prop with a TokenExpiredError subclass
- Collapse listTokens/listTokensForAdmin into a single hook

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Adding cron definitions for alerting on expiring git pat

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
GitOrigin-RevId: 69b9fd901a201592a580c69abe7bd7d603e85d3a
2026-06-04 08:05:26 +00:00
Lucie Germain d52b5ae141 [Security upgrade] bump brace-expansion to 5.0.6 (#33915)
* Bump brace-expansion to 5.0.6 in linked-url-proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* drop unnecessary brace-expansion resolution; ^5.0.5 already permits 5.0.6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
GitOrigin-RevId: 837dcd88e5e0a6181d3ac2fe4f512a6ec1904002
2026-06-03 08:05:41 +00:00
Andrew Rumble bb7643f697 Merge pull request #33482 from overleaf/ar-mixpanel-labs-project
[web/analytics] Send labs user's events to separate mixpanel project

GitOrigin-RevId: 42612b71d2d7a082ffbe1ff614499a0b94553b90
2026-05-29 08:05:57 +00:00
Kristina 5f7e81aafc [web] add stats to process_notifications cron (#34049)
GitOrigin-RevId: ea6890f2726cba268f1e5eead0643d03757b8dff
2026-05-29 08:05:42 +00:00
Andrew Rumble 26b9d029f3 Merge pull request #33708 from overleaf/jlm-stripe-stage5-fixes
Stripe migration improvements from stage 5

GitOrigin-RevId: 897941bf1a51f8f1639489fcd3f542af671b7ac7
2026-05-28 08:07:04 +00:00
roo hutton 4f192564f2 Merge pull request #33345 from overleaf/rh-split-group-role
Update group_role in customer.io when changed

GitOrigin-RevId: d21866a9fe324a0468de74a45b6932dda27de8a1
2026-05-28 08:06:43 +00:00
Tim Down 287e619967 Merge pull request #33663 from overleaf/td-en-json-sort-hook
Sort staged locale files in the pre-commit hook

GitOrigin-RevId: fb3a155be52495305372c5c5cc54c2f50e88c417
2026-05-28 08:05:22 +00:00
Simon Gardner 5cfd7b6c6a [migration] re-use paypal methods if billing agreement ids match (#33720)
GitOrigin-RevId: 4a324c1cdde84dabf620a2616a0aa27242cf041e
2026-05-21 08:06:38 +00:00
Olzhas Askar bb0dc07d22 Merge pull request #33741 from overleaf/lg-sanitize-html-upgrade
[Security upgrade] Upgrade sanitize-html to 2.17.4 (GHSA-rpr9-rxv7-x643)

GitOrigin-RevId: 40a11361eac35d44a6fd7069e0d0d7c02a6628ec
2026-05-21 08:06:33 +00:00
Liam O'Brien b4a76fee6d [web] Implementing library search (#33604)
* Initial working version of library search

draft fetch allowing optional search param

draft debounce search

draft search bar

draft using  for search

draft search params

draft data index creation

draft prefix-regex search

draft add fields only on search

draft index setup

draft search tests

draft search tests for extra params

draft using correct display value from bib entry for tokenization

* Library search handles diacritics

* Library styling and refreshing table data without
reloading table

* Updating mongo search query and creating migration
scripts for existing data

* Using Mongo query for sorting results

* Moving copied files into shared directory

* Addressing review comments

* Pulling changes from bibtex-search-token for consistency with migration

* Fixing lint

* Using mongo collation for handling case and diacritics in search queries

* Boosting citation keys with  check for tokens

* Removing double foldLatinDigraphs call

* Matching figma designs for Library search component

* Adding cursor for paginated Library search results

* Re-fixing flash after searching library

* Unit test for cursor search

* Using same cursor object for search and get all results

* Data migration moved to manual script

GitOrigin-RevId: b7e6a1f07f775c8450dd97e7269cab3b68ca0eb3
2026-05-20 08:07:29 +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 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
Simon Gardner 8869dd5f32 Consistently import Stripe prices with interval: 12 monthly rather than yearly. (#33536)
* ensure imported annual prices are 12-monthly
* script to convert annual prices to 12-monthly

GitOrigin-RevId: b7af88156bde510ecdf080fc97384463fa77db13
2026-05-11 08:06:24 +00:00
Simon Gardner feb4f49859 [fix] use Stripe productId rather planCode when adding prices (#33344)
GitOrigin-RevId: 6e24317a0086332145c88a9be3b700b96d7a1187
2026-05-04 08:05:50 +00:00
Kristina 9a670805c4 [scripts] handle creating custom prices (#32607)
GitOrigin-RevId: 3950698ca21de5d8ee87d0531e1e9f562aeb76f8
2026-05-04 08:05:46 +00:00
Mathias Jakobsen a478c1a829 [web+project-history] Add lastResyncedAt field to projects and set after resync (#33240)
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: f679a190b88694a46f7816d51eff96446f338dec
2026-04-30 08:06:43 +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
Jimmy Domagala-Tang 730ff8f0ea feat: add a utilitty script for setting a users AI usage, useful for testing in staging (#33216)
GitOrigin-RevId: 71d4948235ccf37971142a4ed917cff2ef50cea9
2026-04-30 08:06:26 +00:00
Domagoj Kriskovic 9e677a2c1e Use overleaf CDN for loading pyodide packages
GitOrigin-RevId: e17ff3387166421a546a9519786d77ba12cdffc4
2026-04-30 08:05:23 +00:00
Mathias Jakobsen 92bbba5e50 Merge pull request #33046 from overleaf/mj-batch-history-resync-script
[web] Add script for batch history resyncs

GitOrigin-RevId: 2409475fa1ba12dadfaae9641a5fafdaa6c88e47
2026-04-29 08:06:12 +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
Anna Claire Fields 0d64a88a46 Yarn 4 Migration (#32253)
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode.

GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
2026-04-28 08:52:37 +00:00
Miguel Serrano 08701ca5aa [web] Add update_group_policy script (#31715)
* [web]  Add `update_group_policy` script

The script allows to update a policy for a subscription, or update
multiple policies via a file containing a list of subscription ids

GitOrigin-RevId: f3b3a6666eb62bb93d13c4c75d60b99f21f23db4
2026-04-24 08:06:35 +00:00
Olzhas Askar 050f00a4b5 Merge pull request #32553 from overleaf/oa-verify-prices
[web] Verify upcoming price changes

GitOrigin-RevId: c57af634be7360cf108d987c88307e187a7c3e50
2026-04-21 08:05:26 +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
roo hutton c02ba36b83 Merge pull request #32594 from overleaf/rh-cio-migration-mapping
Add customer.io fields for migration comms and marketing initiatives

GitOrigin-RevId: f11ffee255d9582cbfd4c7e285bd6690c0cf1e3c
2026-04-17 08:05:47 +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
Anna Claire Fields 1a7de4ddd8 Upgrades Node.js from 24.13.0 → 24.14.1 (#32498)
GitOrigin-RevId: edbe6969c4c28109e3077f48e94084fc5c910727
2026-04-14 08:04:32 +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
Antoine Clausse 2f35f2bb65 [web] Re-add remove_unwanted_ieee_collabratec_users script (#32603)
* Revert "Merge pull request #19398 from overleaf/rh-rm-ieee-notification"

This reverts commit 14ec3e50ed4913b815620f5215df59b17fc03054, reversing
changes made to 326352c7c459063bfddf98937e830565c5422ce2.

* Convert remove_unwanted_ieee_collabratec_users to ESM

* Use scriptRunner

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: f7d9a4c74173e38789b053792597f761d91efa4f
2026-04-03 08:05:43 +00:00
roo hutton 9197be0ec7 Merge pull request #32376 from overleaf/rh-cio-migrate-identifiers
Replace analytics id with user id as main identifier in customer.io

GitOrigin-RevId: 780671a51b652c73a940bc152d8fd6916dd611ce
2026-04-02 08:05:48 +00:00
Andrew Rumble 972c6e4710 Merge pull request #31327 from overleaf/ar-allow-split-test-ui-without-admin-privilege
[web/admin-roles] allow split test UI without admin privilege

GitOrigin-RevId: 1d10153d7762196dd7a8df835af6193b38670fbc
2026-04-01 08:06:25 +00:00
Alexandre Bourdin a1bd2e9b93 Merge pull request #32441 from overleaf/ab-script-insert-alpha-version-0
[web] Add script to insert missing 0% rollout alpha phase version to existing feature flag

GitOrigin-RevId: 56dc4c74e5f7f5141647fd71f64df71a1264734e
2026-03-30 08:05:41 +00:00
Kristina ad853d661a [migration] fix issues found in finalization script during stage 3b (#32472)
* accept taxInfoPending as tax id comparison point
* convert recurly unit amount to minor units correctly for no cent currencies
* Use original subscription currency in finalization check
* make it easier to spot migrated with tax info pending

---------

Co-authored-by: John Lees-Miller <jdleesmiller@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: d3c74032bc06369fcf6bafb4cfaff85c49a3cfef
2026-03-30 08:05:28 +00:00
Anna Claire Fields 6113c6c291 Enable TS noImplicitAny in web (#31636)
GitOrigin-RevId: 18881694770f2476c475f8fef4c6a2678a2a12fe
2026-03-27 09:05:30 +00:00
Kristina fe7dad5644 [migration scripts] detect account drift between Recurly and Stripe (#32315)
* add a script to detect drift between recurly and stripe
* only flag when Recurly updated since subscription created in Stripe
* add --comparison-date option instead of stripe subscription created time
* reduce API calls by checking Recurly update time earlier

GitOrigin-RevId: f0ecb5644f7445603da020a46e32622fcd2eebf4
2026-03-25 09:05:43 +00:00
Domagoj Kriskovic 6486ef3e1e [web] Add deletedReason parameter to project deletion methods (#32221)
* [web] Add deletedReason parameter to project deletion methods

* revert sinon.match.any in ProjectDuplicator negative assertion

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: d1595eefe0e36150231ee9646fe5eba0786fd1f5
2026-03-23 09:06:04 +00:00
Simon Gardner 6915989ce5 [stripe migration] less strict address validation on upsert script (#32207)
* less strict address validation

* remove redundant name and address coalescing functions

* update missing name handling

GitOrigin-RevId: 4d15b16c840fa3edc50df6592d33f324dd26722c
2026-03-19 09:06:50 +00:00
Jakob Ackermann efa01e6282 [web] fix incremental compile from history for old history ids (#32222)
* [saas-e2e] port history tests to old history

* [web] fix incremental compile from history for old history ids

* [saas-e2e] tweak return type

GitOrigin-RevId: 2c89b570647c292c720cd0d02b6188f66e3e3a69
2026-03-18 09:06:57 +00:00
Kristina d6ec60017e [web] update scripts to release migration schedules once migrated (#32150)
GitOrigin-RevId: 2fcf773649d2f87764c0cb93bb5623a17647b07c
2026-03-18 09:06:48 +00:00
Jakob Ackermann bfcd62883a [web] extend 'make sort_locales' to sort extracted-translations.json (#32193)
GitOrigin-RevId: 19ad8ea5a8b7fb3eadfccb11affe6794bee84050
2026-03-17 09:05:30 +00:00
Kristina 6c6c807ca0 [web] add script for checking tax estimations (#31404)
* add script to query taxes
* Use full address to determine tax
* use all applied taxes
* include status in tax script output
* add warning to the script
* only normalize US and CA
* default to RoW if no countries specified
* use RateLimiter and pqueue
* only normalize US postal codes

---------

Co-authored-by: John Lees-Miller <jdleesmiller@gmail.com>
GitOrigin-RevId: 01ecc1b1461e955b6c6a798a3a568e5b5f6bbcdb
2026-03-11 09:06:02 +00:00
Jessica Lawshe e032d79980 Merge pull request #31856 from overleaf/jel-unconfirmed-emails-removed-v1-fix-script
[web] Fix script to remove v1 affiliation for unconfirmed emails

GitOrigin-RevId: 1e3bb663d8d4fd811173ceb1c59fcfddb59852a1
2026-03-06 09:17:43 +00:00
Jakob Ackermann 81b7121408 [clsi] initial implementation of compile from history (#31883)
* [clsi] initial implementation of compile from history

* [clsi] copy changes

* [saas-e2e] extend test case with nested folder

* [saas-e2e] add test case for tracked changes

* [web] fix accumulating changes from multiple chunks

* [web] optimize size check for compile request payload

* [clsi] deduplicate globalBlobs

* [clsi] add validation for request body details

* [clsi] add metrics for compile from history

* [clsi] download binary files concurrently

* [clsi] skip download of empty file blob

* [clsi] break down e2e compile time metric by compileFromHistory

GitOrigin-RevId: 0dadef93e89d8a172c35cb130a1042d9d1bec42a
2026-03-06 09:12:07 +00:00
Simon Gardner 89e8044a25 Further improvements to Recurly -> Stripe Customer Upsert script
* handle billingInfo / account discrepancies

* fix rate limiting behaviour of fetchRecurlyActiveSubscription

* make force-invalid-tax aware of stripe tax validation errors

* clear taxInfoPending if vatNumber is now valid or not present on second runs

* re-instate pre-validation of tax ids in dry-run mode

* handle tax exemption

* fix tax pre-validation tests

* fix comment typos

* remove redundant hadConflict

* re-use normalizeName function

* throw if more than 1 active recurly subscription when resolving conflict

---------

Co-authored-by: Simon Gardner <simon.gardner@overleaf.com>
GitOrigin-RevId: a88cad87887bd9e043fb457091e999c1d555f546
2026-03-06 09:10:28 +00:00
Jessica Lawshe 0c9382e36a Merge pull request #31543 from overleaf/jel-unconfirmed-emails-removed-v1
[web] Script to remove v1 affiliation for unconfirmed emails removed in web

GitOrigin-RevId: c698297c57bfeb6bd3743978d772673efe6fc3ad
2026-03-06 09:09:12 +00:00
Andrew Rumble de75ea6d3b Merge pull request #31818 from overleaf/ar-actually-dedupe
[monorepo] run npm dedupe

GitOrigin-RevId: 6133acd7b28b536b777962024fd318c9c4d6c091
2026-03-06 09:09:07 +00:00
Simon Gardner fcac73e27f Improvements to Recurly -> Stripe customer upsert script (#31539)
* migrate Recurly ccEmails to Stripe additional_emails.cc

* improve tax error reporting

* remove redundant call to recurly.getBillingInfo

GitOrigin-RevId: fa26fd5312d2b7ac5734fc78118ede6e1cfa17c8
2026-03-06 09:08:51 +00:00