diff --git a/src/main/services/playwright-browser/download-service.ts b/src/main/services/playwright-browser/download-service.ts index ed62c7c..5b0e7ef 100644 --- a/src/main/services/playwright-browser/download-service.ts +++ b/src/main/services/playwright-browser/download-service.ts @@ -60,7 +60,7 @@ export interface DownloadConfig { const DEFAULT_CONFIG: Required = { s3Client: null as unknown as S3Client, bucket: 'erpauto', - prefix: 'erpauto/resources/ms-playwright/', + prefix: 'resources/ms-playwright/', // ✅ Fixed: removed 'erpauto/' prefix destDir: path.join(process.env.APPDATA || '', 'erpauto', 'ms-playwright') } @@ -176,7 +176,8 @@ export class DownloadService { /** * List all S3 objects under the configured prefix - * Filters to only chromium-* folders + * Filters to include ALL Chromium files (regular + headless) + * Simple filter: includes 'chromium' keyword */ async listObjects(): Promise { log.info('Listing S3 objects', { bucket: this.config.bucket, prefix: this.config.prefix }) @@ -196,8 +197,10 @@ export class DownloadService { for (const obj of response.Contents || []) { if (!obj.Key) continue - // Only include chromium-* folders, skip firefox and webkit - if (!obj.Key.includes('chromium-')) { + // Simple filter: only download Chromium-related files + // This includes: chromium-1200, chromium-1208, chromium_headless_shell-1200, chromium_headless_shell-1208 + // Excludes: firefox, webkit, ffmpeg, winldd, .links, .settings + if (!obj.Key.includes('chromium')) { continue } diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index aff2ed5..b1425a9 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -34,12 +34,15 @@ function App(): React.JSX.Element { openUpdateDialog, handleInstallUserRelease, handleAdminDownloadAndInstall, - refreshUpdateDialogState + refreshUpdateDialogState, + initializeAuth } = useAppBootstrap() const handlePlaywrightDownloadComplete = React.useCallback(() => { setShowPlaywrightDownload(false) - }, [setShowPlaywrightDownload]) + // Re-trigger authentication after download completes + void initializeAuth() + }, [setShowPlaywrightDownload, initializeAuth]) const shouldShowLogout = currentUser?.userType === 'Admin' || isSwitchedByAdmin diff --git a/src/renderer/src/hooks/useAppBootstrap.ts b/src/renderer/src/hooks/useAppBootstrap.ts index f728ab9..4ef9be3 100644 --- a/src/renderer/src/hooks/useAppBootstrap.ts +++ b/src/renderer/src/hooks/useAppBootstrap.ts @@ -330,6 +330,7 @@ export function useAppBootstrap() { openUpdateDialog, handleInstallUserRelease, handleAdminDownloadAndInstall, - refreshUpdateDialogState + refreshUpdateDialogState, + initializeAuth } }