Skip to content

v0.10.1 — SaaS backend hotfix

Pre-release
Pre-release

Choose a tag to compare

@hoangperry hoangperry released this 26 May 10:51

SaaS backend hotfix

v0.10.0 shipped right as the production SaaS Edge Function at app.contextmt.dev went live, and the two wire formats turned out to be incompatible. Translates failed immediately with HTTP 400: target_language is required; once that cleared, a second failure surfaced — the streaming flow expected SSE on /translate/stream, but Supabase returns one-shot JSON, so the stream loop never saw a data:-prefixed frame and threw "The backend response did not include a translation."

Both fixes are backward-compatible with the legacy self-hosted FastAPI server.

Fixed

  • Dual wire formatBackendRequestBody now emits every routing field under both camelCase (legacy self-hosted FastAPI in translator-server/server.py) and snake_case (SaaS Supabase Edge Function). One payload, both backends. Pinned by a new bodyEmitsDualNamingConventions contract test so a future refactor cannot silently re-break one backend.
  • Streaming non-SSE fallbackBackendProvider.streamSSE sniffs Content-Type; if it's not text/event-stream (Supabase returns application/json), the body is drained and decoded as a one-shot TranslationResult then emitted as a single .done(...) update. Self-hosted SSE keeps its real streaming UX. Pinned by nonSSEJSONFallback test.

Tests

  • 377 tests pass (was 376; +1 fallback test).
  • Removed a stale "0.10.0" entry from WhatsNewHighlightsTests.unknownVersionReturnsNil — v0.10.0 added its own highlight set so the value moved out of the catch-all bucket.

Risk-free upgrade

UserDefaults + Keychain layout byte-identical to v0.10.0. Existing settings, hotkey bindings, register card, and glossary entries all round-trip clean.

Install

  • Sparkle — existing v0.10.0 installs will receive this update automatically via the appcast at https://hoangperry.github.io/hp-translator/appcast.xml.
  • Fresh install — download Contextual-Mac-Translator-v0.10.1-macos-arm64.zip below, unzip, drag the .app to /Applications. Signed (Developer ID JP4XV8A9JF) + notarized + stapled.

Apple Silicon only. macOS 14 or later.