Commit Graph
28711 Commits
Author SHA1 Message Date
Maria Florencia Besteiro Gonzalez 173081aa6f Add user affiliations to Library page to fix affiliation widget on Commons (#36522)
* load affiliations data when rendering library page

* address Copilot review feedback on PR #36522

- default userAffiliations to [] if getUserFullEmails fails, matching
  ProjectListController's error handling, so Library/Trash still render
  when the institutions service is unavailable
- stop mutating the affiliation object when attaching the email
- rename a misleading test title (affiliation is not necessarily confirmed)
- fix sidebar-ds-nav "hides the widget" tests: they were only waiting for
  the /api/project fetch to be called, not for the project list state to
  settle, so they passed even before the affiliations check ran

GitOrigin-RevId: 7d04ae7f7dc8d1526c2deb8959099f6e9fe9c4ee
2026-09-17 11:56:03 +00:00
Mathias Jakobsen 531718c874 Merge pull request #36521 from overleaf/mj-project-list-themed-modals
[web] Add theme support to most project list modals

GitOrigin-RevId: fd61f096c2a3f021795c30a490c7fe2d4dc13100
2026-09-17 11:55:59 +00:00
Antoine Clausse a6b7329e47 [web] Render address form above payment element on Stripe checkout (#36209)
* [web] render address form above payment element on Stripe checkout

Changing country across Stripe regions (US/CA vs rest) remounts the Elements
tree and clears any entered card details. Rendering the address form (which
contains the country selector) first lets users settle the country before
entering payment details.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* [web] gate checkout address-first order behind checkout-address-order split test

Per PR review: the reorder needs testing, so it is now behind the
checkout-address-order split test (default keeps the current payment-first
order). With the enabled variant the heading becomes "Payment details", since
"Select a payment method" no longer sits above the payment element.

Part of #36429

* Rename `checkout-address-order` to `checkout-address-first`

GitOrigin-RevId: 9c861b1013a284b10757fc416bcdc5610790d582
2026-09-17 11:55:56 +00:00
Antoine Clausse b2139b170c [web] Remove SubscriptionFormatters, format subscription dates in the frontend (#36409) (#36476)
* Reapply "[web] Remove SubscriptionFormatters, format subscription dates in the…"

This reverts commit 2939e71e5b919529cbb8a602916d5f597d117792.

* Fixup after rename conflict: `nextPaymentDueDate`->`periodEnd`

GitOrigin-RevId: c024a3a2cd08c1f8f9d4c99f9ba6f018d334439e
2026-09-17 11:55:52 +00:00
Jakob Ackermann a6792af5b1 Merge pull request #36225 from overleaf/jpa-zod-web-final
[web] fully adopt strict zod schema and enforce in tests

GitOrigin-RevId: 1bb03ed3a819be6de38c8ca5758b3909cfa23318
2026-09-17 11:55:44 +00:00
Jakob Ackermann de0d1a7226 Merge pull request #36219 from overleaf/jpa-zod-web-platform
[web] platform: adopt strict zod schema and extend test coverage

GitOrigin-RevId: e3a0b7b4c52ac116f28be0d284284e3bd3994cda
2026-09-17 11:55:40 +00:00
Jakob Ackermann 55c23b6812 Merge pull request #36223 from overleaf/jpa-zod-web-core-2
[web] core-2: adopt strict zod schema and extend test coverage

GitOrigin-RevId: f26d349fefb6bf9e042cb39117395120c3f7c877
2026-09-17 11:55:37 +00:00
Jakob Ackermann e2564f356c Merge pull request #36222 from overleaf/jpa-zod-web-core-1
[web] core-1: adopt strict zod schema and extend test coverage

GitOrigin-RevId: 6dc74a100989e6eca1565480a9ecb5f24404ef96
2026-09-17 11:55:33 +00:00
Jakob Ackermann f26a48fc4c Merge pull request #36221 from overleaf/jpa-zod-web-b2c
[web] b2c: adopt strict zod schema and extend test coverage

GitOrigin-RevId: 5c612e3ce83b81cfff7b8f1c5bc4522d6feb665a
2026-09-17 11:55:30 +00:00
Jakob Ackermann 784b9c64ec Merge pull request #36220 from overleaf/jpa-zod-web-b2b
[web] b2b: adopt strict zod schema and extend test coverage

GitOrigin-RevId: ae9bb04cfe1034ff36dec33ba5e77aceecd71db7
2026-09-17 11:55:27 +00:00
Eric Mc Sween 2d3474fbdb Merge pull request #36494 from overleaf/em-remove-visual-options
Remove the Options object from the visual editor extensions

GitOrigin-RevId: f06e60b88ef77d3a670d7d956d1a86c116d71873
2026-09-17 11:55:18 +00:00
Mathias Jakobsen 33e2a1e282 Merge pull request #36526 from overleaf/mj-command-palette-network-stall-files
[web] Avoid searching files when network is stalled

GitOrigin-RevId: 08707b1c8a7e0088e8fee6ead3e74bdd807514c7
2026-09-17 11:55:12 +00:00
Mathias Jakobsen 1edb50de7b Merge pull request #36505 from overleaf/mj-themed-url-field
[web] Enable dark mode url fields

GitOrigin-RevId: 97e820e773e9d1528a5e852f10fa31fab84a185b
2026-09-17 11:55:09 +00:00
ilkin-overleaf 0ee4158abe Merge pull request #36392 from overleaf/ii-audit-logs-survey-removal
[web] Remove the feedback survey link from audit logs page

GitOrigin-RevId: f0b662146cec72e1a805387a0566154aab82c892
2026-09-17 11:55:00 +00:00
ilkin-overleaf b42b9adbd8 Merge pull request #36447 from overleaf/lg-security-undici-729
[Security upgrade] bump undici to 7.29.0 in yarn.lock

GitOrigin-RevId: a7f50ff0fd2428f281de425025ed6b9cf39116e0
2026-09-17 11:54:57 +00:00
Malik Glossop f534349991 Merge pull request #36490 from overleaf/copilot/fix-flaky-test-sends-invites
Stabilize flaky ShareProjectModal invite JSDOM test

GitOrigin-RevId: c91abb89f1d16c0347de11287ee26f1c885edba8
2026-09-17 11:54:46 +00:00
Andrew Rumble ff14d94c04 Merge pull request #33538 from overleaf/ar-remove-web-transform-vitest
[web] remove mocha-to-vitest transform script

GitOrigin-RevId: b33f1587846640a8823ff963e789cde4aaae081f
2026-09-17 11:54:28 +00:00
Brian Gough 3edb312a35 Merge pull request #36460 from overleaf/lg-security-brace-expansion-root
[Security upgrade] bump brace-expansion in yarn.lock

GitOrigin-RevId: 6ffec751406ab8f20a664c180c11ade4a0f96f67
2026-09-17 11:54:22 +00:00
Brian Gough 6a74e50ba1 Merge pull request #36388 from overleaf/lg-tar-profiler-upgrade
[Security upgrade] remove tar 6.2.1 and bump tar to 7.5.22 in root workspace

GitOrigin-RevId: 7471e82d64bf0a951a25586c19027300ecdeee98
2026-09-17 11:54:18 +00:00
Kristina 42f441b498 [web] disable editor tabs in review panel tests (#36504)
GitOrigin-RevId: baefd7028b89c1a157a7f279452c953843031f08
2026-09-17 11:54:12 +00:00
Kristina 3e11985e59 [web] prevent dangling comments by using the thread's doc id in operations (#36423)
GitOrigin-RevId: 9f3ddf282a058e92419e772b583169ac8bfe4af9
2026-09-17 11:54:06 +00:00
Mathias Jakobsen 2cb515ac2f Merge pull request #36463 from overleaf/mj-themed-history-modals
[web] Add theme support to history modals

GitOrigin-RevId: 10cc2176b91213342e066fad8ff0eba265d868ec
2026-09-17 11:54:00 +00:00
Mathias Jakobsen 6a800028be Merge pull request #36474 from overleaf/mj-themed-file-tree-modals
[web] Add dark mode file tree modals

GitOrigin-RevId: 8bfd548eedd16fd6848a9d6460cdd7f1be50d759
2026-09-17 11:53:55 +00:00
Mathias Jakobsen 99f0b2d562 Merge pull request #36446 from overleaf/mj-themed-keyboard-shortcuts
[web] Add theme support to keyboard shortcuts modal

GitOrigin-RevId: c92088cbe81a58431627b2343df5d90b68f2bc60
2026-09-17 11:53:51 +00:00
Mathias Jakobsen 67478b1b56 Merge pull request #36453 from overleaf/mj-themed-table-generator-modals
[web] Add dark mode support for table generator modals

GitOrigin-RevId: aeb0d0e8eae2b4257c287cc322d1eb7b8d9b9a35
2026-09-17 11:53:48 +00:00
Mathias Jakobsen dfda63f060 Merge pull request #36470 from overleaf/mj-themed-uppy-figure-modal
[web] Use themed uppy in figure modal

GitOrigin-RevId: 54e92a40516a947befdd4d1f758dae631703672f
2026-09-17 11:53:44 +00:00
Mathias Jakobsen a7c830ee23 Merge pull request #36438 from overleaf/mj-themed-figure-modal
[web] Support theming in figure modal

GitOrigin-RevId: 31fcc5b8585cb9f81ff073fbc07b7b36e04ba54d
2026-09-17 11:53:41 +00:00
Mathias Jakobsen e8ee19d17d Merge pull request #36408 from overleaf/mj-context-menu-flag-teardown
[web] Tear down editor-context-menu flag

GitOrigin-RevId: 80cc2ebaf62ec1bd6064b0f96b884d159a9d4b5f
2026-09-17 11:53:38 +00:00
Mathias Jakobsen 38eb3ddfa6 Merge pull request #36426 from overleaf/mj-wrong-variable-removed
[web] Remove typoed themed variable

GitOrigin-RevId: ec23ed1819f78cfcfb42c578ebe58373ddbef6b1
2026-09-17 11:53:34 +00:00
Mathias Jakobsen 06b4124aca Merge pull request #36407 from overleaf/mj-tabs-teardown
[web] Tear down tabs feature flag

GitOrigin-RevId: c25a3abe5c4b85f9802751bb1882385ed9c50a4a
2026-09-17 11:53:28 +00:00
Mathias Jakobsen 57697c6c56 Merge pull request #36405 from overleaf/mj-remove-context-menu-survey
[web] Remove context menu survey

GitOrigin-RevId: 841705a3874e870ee38968aa56e7db7eea1c3f01
2026-09-17 11:53:25 +00:00
Domagoj Kriskovic 2ecbe6fb85 Zotero sync: treat the paged pull as a single snapshot (#35638)
* Zotero sync: treat the paged pull as a single snapshot

* fix zod after rebasing

* if extraHeaders, build a new client on each request

GitOrigin-RevId: b73829ad9fddaeb91753b3f9b80c5c5ae0cbfa50
2026-09-17 11:53:06 +00:00
Miguel Serrano 194de0b457 [web] Update CE/SP footer with copyright notice (#36065)
* [web] Update CE/SP footer with copyright notice

GitOrigin-RevId: b1e650e9512d8497b03ab167b29792b32053e95c
2026-09-17 11:52:58 +00:00
Kristina 00b594a14f [web] block idle connection-restored events (#36425)
GitOrigin-RevId: 74b142f72f7982e6df9e0208965d8372e23afc74
2026-09-17 11:52:55 +00:00
Antoine Clausse 07835f92b3 Merge pull request #36475 from overleaf/revert-36409-ac-remove-subscription-formatters
Revert "[web] Remove SubscriptionFormatters, format subscription dates in the frontend"

GitOrigin-RevId: d4c6bb600f7315c27016a45a8250a61b46de0119
2026-09-17 11:52:51 +00:00
roo hutton c461297b13 Merge pull request #36461 from overleaf/lg-security-sanitize-html-root
[Security upgrade] bump sanitize-html to 2.17.6 in yarn.lock

GitOrigin-RevId: 2a4629fca9d0c95cad7b0e993433ffcdb0f2b99c
2026-09-17 11:52:48 +00:00
Antoine Clausse ba4f024f34 [web] Remove SubscriptionFormatters, format subscription dates in the frontend (#36409)
* [web] Remove SubscriptionFormatters, format subscription dates in the frontend

Replace the server-formatted nextPaymentDueAt/nextPaymentDueDate/
trialEndsAtFormatted fields with the raw periodEnd date and format in
the React dashboard (same strings as before, English + UTC). Also
consolidate hand-rolled trial checks onto isInFreeTrial /
SubscriptionHelper.isInTrial.

* [web] Remove the now-unused dateformat dependency

* [web] Address review: payment-dates unit test, UTC dates in acceptance test

Add a dedicated unit test asserting the exact formatted strings from
formatPaymentDate/formatPaymentDateTime, and use explicit UTC timestamps
in the SubscriptionDashboard acceptance fixtures instead of
local-timezone Date constructors.

GitOrigin-RevId: 16ac4f1098b14ef9f1478d22cf39c1357ead7dea
2026-09-17 11:52:44 +00:00
Lucie GermainandClaude Sonnet 5 d0399bd09f bump nanoid in yarn.lock (#36457)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
GitOrigin-RevId: 5270797e8c3a3037d39e22c8ff83abf0704bba00
2026-09-17 11:52:33 +00:00
Malik Glossop 15bc30b596 Merge pull request #36140 from overleaf/mg-ai-usage-limit-show
Add 'ai-usage-limit-show' event for ai limits

GitOrigin-RevId: 887ecc8b3fea52bcd45cf771ab0d22b8f4539308
2026-09-17 11:52:30 +00:00
Jakob Ackermann 2566455740 [web] mock the changes/users request in EditorProviders (#36435)
GitOrigin-RevId: 5f8f5b9317d089ca52ff17ad1307d58d625709d5
2026-09-17 11:52:22 +00:00
Eric Mc Sween 62e4164269 Merge pull request #36345 from overleaf/em-library-design-review
[web] Library design review fixes

GitOrigin-RevId: dfd1846d275eb975906a2fe8a8c4dee057c51d1f
2026-09-17 11:52:11 +00:00
Antoine Clausse 1daed4efe4 [web] Add cancel-loss-messaging split test (#36363)
* [web] Add cancel-loss-messaging split test

Populate the cancel confirmation step with plan-specific losses when the
cancel-loss-messaging split test is enabled: "Are you sure you want to
cancel?" heading, the subscription end date, and a card listing what the
user loses moving to the Free plan (compile timeout, AI, collaborators,
history), with the lost benefit struck through next to its Free-plan
replacement.

Shown only to non-trial Student/Standard/Pro individual subscribers with
no other retention offer (trial extension or downgrade upsell) — those
keep the existing confirmation.

Copy matches the mockups in the ticket. No new analytics events; the
existing subscription-page-cancel-button-click / subscription-cancelled
funnel is used.

Part of #35765

* [web] Consolidate ActiveSubscription stories, add cancel confirmation story

Replace the 13 fixture-per-story exports with a single Dashboard story
driven by controls (subscription fixture select, flexible licensing,
cancel-loss-messaging variant), using the CSF factories pattern. Add a
CancelConfirmation story that renders the cancel confirmation step
directly so the cancel-loss-messaging variant can be previewed without
clicking through, with a Professional fixture available to see the Pro
loss rows.

* [web] Use withSplitTests for the ActiveSubscription stories

Register cancel-loss-messaging in defaultSplitTestsArgTypes and drive the
stories' variant from the shared withSplitTests decorator (radio control,
SplitTestContext provided from args) instead of hand-rolled meta tags and
SplitTestProvider. Generalize withSplitTests' typing so it composes with
CSF factories (preview.meta) as well as legacy meta objects.

* [web] Fix Storybook indexing of the ActiveSubscription stories

Storybook's static CSF indexer requires preview.meta() to receive an
object literal, so spread withSplitTests' argTypes/decorators into the
meta literal instead of wrapping the whole config in the helper call.

* [web] Compose ActiveSubscription stories from orthogonal controls

- Wrap the stories in #subscription-dashboard-root so the dashboard's
  scoped styles (e.g. the cancel-loss strikethrough) apply in Storybook
- Replace the single fixture dropdown with independent controls (group,
  plan, period, currency, trial, status, pending plan change, add-ons,
  coupons, pending license change), building the subscription from the
  fixtures' base + patches
- Guard impossible mixes with argTypes `if` conditions: individual-only
  controls hide when group is on, and pendingLicenseChange only shows
  for groups

* [web] Add student plan to the ActiveSubscription story controls

The cancel-loss-messaging variant has student-specific rows (AI
Assistant / 10 collaborators), so the plan control needs a student
option. Groups have no student plans, so for group subscriptions the
student choice maps to the Standard group fixture.

* [web] Provide ol-plans in the ActiveSubscription stories

The cancel confirmation's downgrade branch (monthly Standard is
isEligibleForDowngradeUpsell) looks up paid-personal in ol-plans and
spins forever when the meta tag is missing. Provide ol-plans and
ol-groupPlans from the fixtures, matching the test render helper.

GitOrigin-RevId: e8491c8d39ed059e42ea3442e8d70c3ef304b009
2026-09-17 11:52:02 +00:00
roo hutton dac6254831 Merge pull request #36320 from overleaf/rh-cio-split-tests
[web] require admin opt-in for split test assignments sent to customer.io

GitOrigin-RevId: 5a6f5c3726f3b65c2f432ab20720e6f8f5c53eb1
2026-09-17 11:51:56 +00:00
Brian Gough 3e8f2ebe31 update zod safePath validation to match existing behaviour in web (#36357)
* update zod safePath validation to match existing behaviour in web

* test SafePath from web against zod validation

GitOrigin-RevId: a159f5078b5bf75eac4365c97e34e21e716290eb
2026-09-17 11:51:30 +00:00
Lucie GermainandClaude Opus 5 9cf4fa8bf5 [web] gracefully handle failed oauth token exchange for reference managers (#36377)
* [web] gracefully handle failed oauth token exchange for reference managers

Mendeley/ReadCube redirect back to /:ref_provider/oauth/token-exchange with
`error` and `error_description` instead of `code` when a user declines consent.
completeAuth forwarded the whole query string on to third-party-references,
whose strict zod schema (d8c1679bb08) accepts only oauth_token, oauth_verifier
and code, so the exchange failed and the user got a 500.

The same forwarding also sent `state` on every callback, success or failure.
`state` is web's own CSRF token and is never read by third-party-references, so
it tripped the log-only schema on every single token exchange, and would have
broken linking outright under REQ_VALIDATION_MODE=enforce.

Forward only the credentials the exchange needs, and show a translated
notification in the Reference managers section rather than erroring. Validate
ref_provider against the known providers so the provider name can be
interpolated into the message without reflecting a URL segment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [web] fix providerName argument and validate before deriving refProvider

Address Copilot review on #36377:

- The token-exchange failure handler passed `false` positionally into the
  `providerName` slot of _redirectWithLinkingError, so a failed exchange would
  have rendered "your false account". Pass providerName and an explicit false.
- _getRefProviderBackendKey(req) ran before parseReq, so refProvider was derived
  from raw, unvalidated req.params. Parse first and derive from the validated
  params via _toRefProviderBackendKey; _getRefProviderBackendKey now delegates
  to it so the other handlers are unchanged.

The completeAuth tests kept their assertions inside ctx.res.callback without
awaiting the controller, so the callback fired after the test had already
returned and the assertions were never enforced — which is why the suite was
green with the providerName bug in it. Await the controller and assert inline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [web] add logOnly to the completeAuth schema and guard the provider lookup

logOnly returns the raw input on a schema failure, so ref_provider can be an
arbitrary URL segment. Check it against the display-name table rather than
trusting the schema: unknown providers 404 in both validation modes, and
providerName is guaranteed non-null for the rest of the handler.

Also covers the schema half under REQ_VALIDATION_MODE=enforce, so dropping
ref_provider from completeAuthSchema fails a test rather than passing unnoticed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: b98eb5414fe8b672f44aab8c3690f7637d434cd2
2026-09-17 11:51:27 +00:00
Rebeka Dekany 6e57b24811 Record a metric for Stripe API request statuses to monitor rate limiting (#35779)
* Record a metric for Stripe API request statuses to monitor rate limiting

* Add on() stub to Stripe mock in StripeClient unit tests

* Record the Stripe rate-limit reason for 429 responses

* Add acceptance test for Stripe rate-limit reason metric

GitOrigin-RevId: 1674b389f5a7fee403f980b6e813a3e2df81063c
2026-09-17 11:51:23 +00:00
Olzhas Askar b4880f691e Merge pull request #36346 from overleaf/oa-fix-counts
[web] Fix counts

GitOrigin-RevId: b1ec87eb19d41c897b205d2ff178ab2b600fb987
2026-09-17 11:51:17 +00:00
Andrew Rumble 66355e4372 Merge pull request #36361 from overleaf/ar-fix-postdoc-validation-errors
[docstore][document-updater] fix POST doc validation errors

GitOrigin-RevId: 9b5fbc667a3b56b30077ea8de9d81c17253db273
2026-09-17 11:51:12 +00:00
Alf EatonandClaude Opus 4.8 98842d4659 Add Draw mode to the symbol palette (#34868)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
GitOrigin-RevId: 4ea4f97023e65fdb8b018f610f77d7dd107c8e76
2026-09-17 11:51:03 +00:00
Alf EatonandClaude Fable 5 10f10ca95f Only show "Jump to command definition" for right-click on command name (#36191)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
GitOrigin-RevId: 05811783a327fb641f6c677eaa1efeb8a87668fc
2026-09-17 11:50:57 +00:00