Merge pull request #29289 from overleaf/rh-compile-timeout-remove-info

Support compile-timeout-remove-info split test in paywalls

GitOrigin-RevId: d557417ab0bd63fce82f4ffb5d66e8e1c9b0b039
This commit is contained in:
roo hutton
2025-10-27 13:52:05 +00:00
committed by Copybot
parent 126f58ad37
commit ffb951d792
3 changed files with 23 additions and 11 deletions

View File

@@ -405,6 +405,7 @@ const _ProjectController = {
'editor-redesign-new-users',
'writefull-frontend-migration',
'chat-edit-delete',
'compile-timeout-remove-info',
].filter(Boolean)
const getUserValues = async userId =>

View File

@@ -12,12 +12,15 @@ import {
isNewUser,
useIsNewEditorEnabled,
} from '@/features/ide-redesign/utils/new-editor-utils'
import { getSplitTestVariant } from '@/utils/splitTestUtils'
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
export const ShortCompileTimeoutErrorState = () => {
const { t } = useTranslation()
const { isProjectOwner } = useCompileContext()
const newEditor = useIsNewEditorEnabled()
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
'compile-timeout-remove-info'
)
const { compileTimeout } = getMeta('ol-compileSettings')
const segmentation = useMemo(
@@ -79,9 +82,11 @@ export const ShortCompileTimeoutErrorState = () => {
}
iconType="running_with_errors"
extraContent={
<div className="pdf-error-state-info-box">
<ReasonsForTimeoutInfo />
</div>
!shouldHideCompileTimeoutInfo && (
<div className="pdf-error-state-info-box">
<ReasonsForTimeoutInfo />
</div>
)
}
actions={
isProjectOwner && (

View File

@@ -13,7 +13,7 @@ import {
useIsNewEditorEnabled,
useIsNewErrorLogsPositionEnabled,
} from '@/features/ide-redesign/utils/new-editor-utils'
import { getSplitTestVariant } from '@/utils/splitTestUtils'
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
function TimeoutUpgradePromptNew() {
const {
@@ -23,6 +23,9 @@ function TimeoutUpgradePromptNew() {
isProjectOwner,
} = useDetachCompileContext()
const newEditor = useIsNewEditorEnabled()
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
'compile-timeout-remove-info'
)
const { enableStopOnFirstError } = useStopOnFirstError({
eventSource: 'timeout-new',
@@ -55,12 +58,15 @@ function TimeoutUpgradePromptNew() {
isProjectOwner={isProjectOwner}
segmentation={sharedSegmentation}
/>
{getMeta('ol-ExposedSettings').enableSubscriptions && (
<PreventTimeoutHelpMessage
handleEnableStopOnFirstErrorClick={handleEnableStopOnFirstErrorClick}
lastCompileOptions={lastCompileOptions}
/>
)}
{getMeta('ol-ExposedSettings').enableSubscriptions &&
!shouldHideCompileTimeoutInfo && (
<PreventTimeoutHelpMessage
handleEnableStopOnFirstErrorClick={
handleEnableStopOnFirstErrorClick
}
lastCompileOptions={lastCompileOptions}
/>
)}
</>
)
}