Skip to content

feat(demo): runUpdateDemo harness + per-OS pjsua2.jar split

Import User requested to merge feature/update-demo into main

Summary

  • Update demo harness (./gradlew runUpdateDemo): standalone Compose Desktop window that exercises every UpdateState (Idle → Checking → Downloading → Verifying → ReadyToInstall → Installing) plus the full failure catalog (VERIFY, DOWNLOAD, DISK_FULL, UNTRUSTED_URL, MALFORMED_MANIFEST), driven by a UpdateDemoDriver + auto-play script. Renders the real UpdateBadge, UpdateDialog, and UpdateDiagnosticsDialog — no Koin, no network, no installer process. Install handoff is mocked with an [INSTALL HANDOFF] stdout line instead of exitProcess, so the demo survives repeated Install clicks.
  • pjsua2.jar per-OS split: Mac and Windows SWIG builds differ and can't share a single jar. Moved to libs/mac/pjsua2.jar (408K) and libs/windows/pjsua2.jar (372K); build.gradle.kts now picks the right one via OperatingSystem.current(). Fixes the long-standing git-tracked-wrong-arch problem.
  • Renamed runDemorunSipDemo for symmetry with the new runUpdateDemo. CLAUDE.md Quick Commands updated.

Test plan

  • ./gradlew build green on macOS (259 tests pass)
  • ./gradlew runUpdateDemo launches the window, auto-play walks the full catalog, manual buttons interleave correctly
  • Install button prints [INSTALL HANDOFF] without exiting the JVM (verified 3× in a 9m 22s run)
  • Call-active defer works — install disabled while call active, enabled on call end
  • Diagnostics dialog opens and close/copy callbacks fire
  • Clean shutdown on window close (BUILD SUCCESSFUL, exit 0)
  • Windows CI build verifies the libs/windows/pjsua2.jar path (will run on merge via release.yml)

Out of scope

  • Real installer handoff is mocked — covered by the production UpdateManager.confirmInstall path, not the demo
  • No new unit tests: the demo reuses production composables, and the driver/auto-play/console-logger are thin glue over MutableStateFlow. All production state-machine behavior is already covered by the existing 259 tests.

🤖 Generated with Claude Code

Merge request reports

Loading