Merge pull request #29916 from overleaf/dp-cleanup-editor-redesign-opt-out

Cleanup editor-redesign-opt-out feature flag

GitOrigin-RevId: 6a1dc6908fa6276181f9e3996e0b14cfb7537786
This commit is contained in:
David
2025-12-17 09:06:46 +00:00
committed by Copybot
parent efcf776a2d
commit 1d831b5776
13 changed files with 38 additions and 396 deletions
@@ -22,7 +22,6 @@ import { expressify } from '@overleaf/promise-utils'
import { acceptsJson } from '../../infrastructure/RequestContentTypeDetection.mjs'
import Modules from '../../infrastructure/Modules.mjs'
import OneTimeTokenHandler from '../Security/OneTimeTokenHandler.mjs'
import SplitTestHandler from '../SplitTests/SplitTestHandler.mjs'
async function _sendSecurityAlertClearedSessions(user) {
const emailOptions = {
@@ -412,18 +411,7 @@ async function updateUserSettings(req, res, next) {
user.ace.referencesSearchMode = mode
}
if (body.enableNewEditor != null) {
const assignment = await SplitTestHandler.promises.getAssignment(
req,
res,
'editor-redesign-opt-out'
)
const isOptOutStageEnabled = assignment.variant === 'enabled'
if (isOptOutStageEnabled) {
user.ace.enableNewEditorStageFour = Boolean(body.enableNewEditor)
} else {
user.ace.enableNewEditor = Boolean(body.enableNewEditor)
}
user.ace.enableNewEditorStageFour = Boolean(body.enableNewEditor)
}
if (body.darkModePdf != null) {
user.ace.darkModePdf = Boolean(body.darkModePdf)