Skip to content

fix(wasm): resolve browser origin via JSImport, thread-safe model synchronization, and bump to v3.10.0 - #24

Merged
spelech merged 1 commit into
mainfrom
fix/wasm-origin-sync-v3.10.0
Aug 31, 2026
Merged

fix(wasm): resolve browser origin via JSImport, thread-safe model synchronization, and bump to v3.10.0#24
spelech merged 1 commit into
mainfrom
fix/wasm-origin-sync-v3.10.0

Conversation

@spelech

@spelech spelech commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR addresses silent WebAssembly network failure when accessed over remote or custom URLs, resolves race conditions in model library loading, fixes dynamic engine health indicator dot bindings, and bumps the application version to v3.10.0.

Key Changes

  1. Dynamic Origin Resolution via [JSImport]:
    • In LocalLLMServerManager.Web/Program.cs, binds [JSImport("globalThis.getOrigin")] to dynamically inspect window.location.origin upon WASM initialization.
    • Configures MainViewModel.DefaultHttpClient.BaseAddress with the detected browser origin.
  2. Centralized HttpHelper Factory:
    • Added LocalLLMServerManager.Shared/Services/HttpHelper.cs to ensure sub-viewmodels (CivitaiSearchViewModel, HuggingFaceSearchViewModel, SettingsViewModel, TelemetryViewModel, AudioStudioViewModel) construct clients with valid BaseAddress values when calling relative API routes in WASM.
  3. Thread-Safe Model Loading:
    • Added SemaphoreSlim synchronization to OllamaLibraryViewModel.LoadInstalledModelsAsync to prevent concurrent ObservableCollection race conditions during automatic startup polling.
  4. Dynamic Health Dot Data Binding:
    • Replaced static theme brushes in TelemetryHeaderControl.axaml with dynamic color properties (OllamaStatusColor, ForgeStatusColor, ComfyStatusColor).
  5. Version Bump to v3.10.0:
    • Synchronized v3.10.0 across all project files, release scripts, installers, documentation, and test assertions.

Verification Pass

  • npm run lint passed (0 errors)
  • npx tsc --noEmit passed (0 errors)
  • dotnet test LocalLLMServerManager.sln passed (311 passed, 1 skipped, 0 failed)
  • Playwright WASM browser E2E test passed cleanly

@spelech
spelech merged commit f8355a0 into main Aug 31, 2026
2 checks passed
@spelech
spelech deleted the fix/wasm-origin-sync-v3.10.0 branch August 31, 2026 01:35
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