feat: implement splash screen handling in navigation and interactions

- Added a new function `waitForSplashScreenToDisappear` to manage splash screen visibility, ensuring it does not block user interactions.
- Integrated splash screen checks in various navigation functions and interaction methods to enhance user experience by waiting for the splash screen to disappear before proceeding.
- Updated test setup to disable the splash screen during tests for consistent testing behavior.
This commit is contained in:
webdevcody
2026-01-07 16:10:17 -05:00
parent 7176d3e513
commit 11b1bbc143
6 changed files with 124 additions and 2 deletions

View File

@@ -81,6 +81,9 @@ export async function setupWelcomeView(
if (opts?.workspaceDir) {
localStorage.setItem('automaker:lastProjectDir', opts.workspaceDir);
}
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
},
{ opts: options, versions: STORE_VERSIONS }
);
@@ -156,6 +159,9 @@ export async function setupRealProject(
version: versions.SETUP_STORE,
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
},
{ path: projectPath, name: projectName, opts: options, versions: STORE_VERSIONS }
);
@@ -189,6 +195,9 @@ export async function setupMockProject(page: Page): Promise<void> {
};
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
});
}
@@ -260,6 +269,9 @@ export async function setupMockProjectAtConcurrencyLimit(
};
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
},
{ maxConcurrency, runningTasks }
);
@@ -315,6 +327,9 @@ export async function setupMockProjectWithFeatures(
// Also store features in a global variable that the mock electron API can use
// This is needed because the board-view loads features from the file system
(window as any).__mockFeatures = mockFeatures;
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, options);
}
@@ -352,6 +367,9 @@ export async function setupMockProjectWithContextFile(
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
// Set up mock file system with a context file for the feature
// This will be used by the mock electron API
// Now uses features/{id}/agent-output.md path
@@ -470,6 +488,9 @@ export async function setupEmptyLocalStorage(page: Page): Promise<void> {
version: 2, // Must match app-store.ts persist version
};
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
});
}
@@ -509,6 +530,9 @@ export async function setupMockProjectsWithoutCurrent(page: Page): Promise<void>
};
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
});
}
@@ -560,6 +584,9 @@ export async function setupMockProjectWithSkipTestsFeatures(
};
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, options);
}
@@ -633,6 +660,9 @@ export async function setupMockProjectWithAgentOutput(
localStorage.setItem('automaker-storage', JSON.stringify(mockState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
// Set up mock file system with output content for the feature
// Now uses features/{id}/agent-output.md path
(window as any).__mockContextFile = {
@@ -749,6 +779,9 @@ export async function setupFirstRun(page: Page): Promise<void> {
};
localStorage.setItem('automaker-storage', JSON.stringify(appState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
});
}
@@ -769,6 +802,9 @@ export async function setupComplete(page: Page): Promise<void> {
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, STORE_VERSIONS);
}
@@ -880,5 +916,8 @@ export async function setupMockProjectWithProfiles(
version: 0, // setup-store.ts doesn't specify a version, so zustand defaults to 0
};
localStorage.setItem('automaker-setup', JSON.stringify(setupState));
// Disable splash screen in tests
sessionStorage.setItem('automaker-splash-shown', 'true');
}, options);
}