fix(onboarding): prevent no-auth auto settings modal races
This commit is contained in:
parent
c5b39f5312
commit
c6047ffaa4
3 changed files with 9 additions and 10 deletions
|
|
@ -179,7 +179,11 @@ export function OnboardingFlowProvider({ children }: { children: ReactNode }) {
|
|||
|
||||
if (!local.firstVisitSettingsOpened) {
|
||||
await setFirstVisit(true);
|
||||
openSettingsNow();
|
||||
// In no-auth mode (used by local/CI e2e), avoid background modal opens
|
||||
// that can race with interactions and steal pointer events.
|
||||
if (authEnabled) {
|
||||
openSettingsNow();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -263,6 +267,10 @@ export function OnboardingFlowProvider({ children }: { children: ReactNode }) {
|
|||
}, [advanceFlow, authEnabled]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!authEnabled) {
|
||||
return () => { };
|
||||
}
|
||||
|
||||
return scheduleChangelogCheck({
|
||||
authEnabled,
|
||||
isSessionPending,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import {
|
|||
dispatchHtml5DragAndDrop,
|
||||
expectDocumentListed,
|
||||
expectNoDocumentLink,
|
||||
dismissBlockingModals,
|
||||
} from './helpers';
|
||||
|
||||
test.describe('Document folders and hint persistence', () => {
|
||||
|
|
@ -63,7 +62,6 @@ test.describe('Document folders and hint persistence', () => {
|
|||
// Reload and verify persisted folder + membership
|
||||
await page.reload();
|
||||
await page.waitForLoadState('networkidle');
|
||||
await dismissBlockingModals(page);
|
||||
const myFolderRowAfter = folderRow(page, 'My Folder');
|
||||
await expect(myFolderRowAfter).toBeVisible();
|
||||
await myFolderRowAfter.click();
|
||||
|
|
|
|||
|
|
@ -177,13 +177,6 @@ async function dismissOnboardingModals(page: Page): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismiss startup/settings overlays that can intermittently appear after reloads.
|
||||
*/
|
||||
export async function dismissBlockingModals(page: Page): Promise<void> {
|
||||
await dismissOnboardingModals(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for the play button to be clickable and click it
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue