Skip to content

Async toolbox bootstrap and URL-param model load#284

Merged
milanofthe merged 6 commits intomainfrom
feat/async-toolbox-bootstrap
May 6, 2026
Merged

Async toolbox bootstrap and URL-param model load#284
milanofthe merged 6 commits intomainfrom
feat/async-toolbox-bootstrap

Conversation

@milanofthe
Copy link
Copy Markdown
Member

@milanofthe milanofthe commented May 6, 2026

Summary

  • Models loaded via ?model= / ?modelgh= URL params now appear immediately, in parallel with Pyodide init and toolbox installation. Previously the page blocked until every persisted toolbox finished bootstrapping.
  • Toolbox install is gated on a shared backendReady promise inside loadGraphFile and runs as a fire-and-forget side effect in defer mode. (missing) placeholders upgrade to real nodes via the existing registryVersion reactivity once their toolbox registers.
  • Extracted a single installAndRegisterToolbox helper used by both bootstrap and installRequiredToolboxes. It deduplicates concurrent calls keyed by toolbox id and reconciles selections against the persisted store, eliminating the duplication between the two paths.

Notes

  • loadGraphFile now fills the graph before installing required toolboxes (instead of after). For non-defer callers (manual file open) the awaited completion semantics are unchanged.
  • seedPreloadedToolboxes() is called synchronously on startup before any findMissingRequirements runs, so a fresh launch with a preloaded-toolbox model never prompts an unnecessary "install required toolboxes?" dialog.
  • Backend-agnostic: works the same with Pyodide and the Flask backend, since all toolbox operations go through installer.ts and the backend layer routes internally.

@milanofthe milanofthe merged commit 603056b into main May 6, 2026
4 checks passed
@milanofthe milanofthe deleted the feat/async-toolbox-bootstrap branch May 6, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant