Merge pull request #30393 from overleaf/dp-test-revert-2

Revert "Merge pull request #29916 from overleaf/dp-cleanup-editor-red…

GitOrigin-RevId: c2f14fb55e74a1fcb026e37822774724c36bc0dc
This commit is contained in:
David
2025-12-16 16:06:34 +00:00
committed by Copybot
parent 9aa7a36721
commit bf384683f0
13 changed files with 396 additions and 38 deletions
@@ -459,6 +459,7 @@ const _ProjectController = {
'wf-citations-checker-on-selection',
'writefull-asymetric-queue-size-per-model',
'pdf-dark-mode',
'editor-redesign-opt-out',
'email-notifications',
].filter(Boolean)
@@ -41,6 +41,13 @@ async function buildUserSettings(req, res, user) {
const enableNewEditorLegacy =
user.ace.enableNewEditor ?? defaultLegacyEnableNewEditor
const assignment = await SplitTestHandler.promises.getAssignment(
req,
res,
'editor-redesign-opt-out'
)
const isOptOutEnabled = assignment.variant === 'enabled'
return {
mode: user.ace.mode,
editorTheme: user.ace.theme,
@@ -57,7 +64,9 @@ async function buildUserSettings(req, res, user) {
mathPreview: user.ace.mathPreview,
breadcrumbs: user.ace.breadcrumbs,
referencesSearchMode: user.ace.referencesSearchMode,
enableNewEditor: enableNewEditorStageFour,
enableNewEditor: isOptOutEnabled
? enableNewEditorStageFour
: enableNewEditorLegacy,
enableNewEditorLegacy,
darkModePdf: user.ace.darkModePdf ?? false,
}