fix(onboarding): prevent no-auth auto settings modal races

This commit is contained in:
Richard R 2026-05-29 09:20:34 -06:00
parent c5b39f5312
commit c6047ffaa4
3 changed files with 9 additions and 10 deletions

View file

@ -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,

View file

@ -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();

View file

@ -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
*/