Skip to content

feat: ambitious refactor and release v1.0.0 - #15

Merged
evanlindsey merged 9 commits into
mainfrom
feat/refactor-and-release-3-5
Mar 10, 2026
Merged

feat: ambitious refactor and release v1.0.0#15
evanlindsey merged 9 commits into
mainfrom
feat/refactor-and-release-3-5

Conversation

@evanlindsey

@evanlindsey evanlindsey commented Mar 5, 2026

Copy link
Copy Markdown
Owner

Summary

Plugin Overhaul

  • Namespace: all types in UnityWebGLSignalR
  • SignalROptions for auth, transport, timeouts, reconnect config
  • Invoke(string, params object[]) replaces 10 overloads
  • IsConnected property, IDisposable support
  • Assembly definition (UnityWebGLSignalR.asmdef) for proper references

Bug Fixes (8)

  • Memory leak in jslib invokeCallback (malloc without free)
  • Falsy argument bug in InvokeJs (empty string, "0", "false")
  • Null handler crash, async void crash, duplicate On() crash
  • Reconnecting NRE (Editor and jslib)
  • Event handler race condition (Editor and jslib — handlers now registered before start())
  • WebGL Dispose() static dictionary leak

Testing

  • 28 EditMode tests (options serialization, plugin logic)
  • 5 PlayMode integration tests (connect, disconnect, invoke/on round-trip)
  • Playwright e2e smoke test for WebGL jslib verification

CI/CD

  • ci.yml — Runs on PRs: test → build → smoke
  • release.yml — Runs on merge to main: version → build WebGL + export .unitypackage (parallel) → commit wwwroot → tag → GitHub Release
  • test.yml — Reusable workflow used by CI
  • setup-unity composite action for shared runner setup
  • Release dry-run mode via workflow_dispatch

WebGL Template

  • Custom template (Assets/WebGLTemplates/SignalR/) with SignalR JS client baked in

Cleanup

  • Removed version.txt — version derived from git tags
  • ExportPackage namespaced to UnityWebGLSignalR.Editor
  • jslib reduced from 240 to ~170 lines
  • signalr.ps1 switched from nuget CLI to dotnet restore
  • TestScript uses [SerializeField] instead of GameObject.Find

Test Plan

  • EditMode tests — 28 passing
  • PlayMode tests (Editor) — 5 passing
  • PlayMode tests (WebGL player) — 5 passing in browser
  • Scene play in Editor — 4-line output displays correctly
  • CI workflow validates on PR push (test → build → smoke)
  • First release: add version:1.0.0 label

Repository owner deleted a comment from nightandwknd Mar 10, 2026
@evanlindsey
evanlindsey merged commit 5da7fc6 into main Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant