File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 502502 const continueTooltip = { text: " Continue" , shortcut: " Shift+Enter" };
503503
504504 onMount (() => {
505- // Auto-detect same-origin Flask backend (pip package mode), then check URL params
506- autoDetectBackend ().then (() => initBackendFromUrl ());
507-
508- // Re-install runtime toolboxes from previous sessions and seed any
509- // preloaded catalog entries on first launch. Internally short-circuits
510- // when there's no work to do, so we can call it unconditionally.
505+ // Bring up the Python backend the moment the page loads so the
506+ // runtime is ready by the time the user clicks Run. Order matters:
507+ // detect the active backend first, then initialise it, then run
508+ // the toolbox bootstrap on top.
511509 (async () => {
512510 try {
511+ await autoDetectBackend ();
512+ await initBackendFromUrl ();
513+ await initPyodide ();
513514 await bootstrapToolboxes ();
514515 } catch (e ) {
515- console .error (' [toolbox bootstrap ]' , e );
516+ console .error (' [startup ]' , e );
516517 }
517518 })();
518519
You can’t perform that action at this time.
0 commit comments