fix: resolve onboarding session not found warnings and frontend build OOM

- Use canonical Clerk user id (clerk_user_id) across all onboarding entrypoints to ensure consistent OnboardingSession.user_id lookup
- Fix API key persistence in api_key_manager.py to use correct APIKey model columns (session_id, provider, key)
- Increase Node heap for frontend build to 8GB and add build:nomap script to disable sourcemaps and reduce memory usage
- Update onboarding endpoints (endpoints_core.py, onboarding_control_service.py, step_management_service.py) to prefer clerk_user_id over id
- Fix frontend workflowStore.ts TypeScript error by returning WorkflowError instance
- Add website_automation_service.py for onboarding automation
This commit is contained in:
ajaysi
2026-03-09 12:35:13 +05:30
parent a25ec8302c
commit b3cc83ed6e
13 changed files with 1708 additions and 20 deletions

View File

@@ -37,7 +37,8 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "node --max_old_space_size=8192 node_modules/react-scripts/scripts/build.js",
"build:nomap": "node --max_old_space_size=8192 -e \"process.env.GENERATE_SOURCEMAP='false'; require('./node_modules/react-scripts/scripts/build');\"",
"test": "react-scripts test",
"eject": "react-scripts eject",
"analyze": "npm run build && npx source-map-explorer 'build/static/js/*.js' --html bundle-report.html",

View File

@@ -54,12 +54,12 @@ const toWorkflowError = (error: unknown, fallbackMessage: string): WorkflowError
if (error instanceof WorkflowError) return error;
const message = error instanceof Error ? error.message : fallbackMessage;
return {
return new WorkflowError({
code: 'WORKFLOW_ERROR',
message,
timestamp: new Date(),
recoverable: false,
};
});
};
const computeProgressAndNavigation = (workflow: DailyWorkflow): { progress: WorkflowProgress; navigation: NavigationState } => {