Skip to content

v0.9.1 — Refactor + reliability patch

Choose a tag to compare

@hoangperry hoangperry released this 24 May 19:44

Refactor + reliability patch

No new features. Internal cleanup for the two pieces of structural debt the v0.9.0 deliver-phase review flagged, plus 13 high-leverage tests covering paths that silently failed before. Upgrade is risk-free — every v0.9.0 setting, hotkey, binding, and toggle round-trips clean; all 306 existing tests stay GREEN with zero modifications.

Changed (internal)

  • TranslationWorkflow.swift split: 876 → 630 LOC, back under the 800-line guideline before any new workflow path lands.
    • New CaptureOrchestrator.swift — owns the v0.9.0 OCR-translate flow end-to-end.
    • New RewriteService.swift — owns the rewrite primitives (single-shot + refusal-retry + multi-variant + the 3 App Intents headless methods + the PickerEntry → TranslationStyle mapper). Previously duplicated in multiple sites; now one truth.
  • Behaviour byte-identical. Public API of TranslationWorkflow unchanged.

Fixed

  • No more silent Japanese fallback in the status-bar "Send Keigo" / "Send Casual" menu items. A Vietnamese-primary user with no formal/casual outbound binding used to get a hardcoded .japaneseBusiness / .japaneseCasual translation. v0.9.1 surfaces an actionable error toast pointing to Settings → Translation bindings.

Added (tests)

  • BackendStreamingURLTests (9 tests) — pin every branch of BackendProvider.streamingURL(for:). The 4-case path rewriter used to silently fall back to the configured endpoint on edge cases (/api/translate, trailing slash, non-default port); tests now lock the behaviour. Required marking streamingURL nonisolated static (honest — pure URL logic, no actor state).
  • WhatsNewHighlightsTests (4 tests) — pin the per-version highlight lookup that v0.9.0 introduced. Verifies v0.10.0 / v0.9.2 / older patches all fall into the nil catch-all branch correctly, so a future build can't silently mis-show stale highlights.

Deferred to v0.9.2

  • TranslationWorkflowClipboardRestoreTest — needs HUDPresenting + Pasteboarding protocol extraction (own refactor commit).
  • SettingsStore god-object split (extract SaaSConfig).
  • OCREngine protocol isolation alignment.

Install

  • Sparkle OTA: v0.6.1+ users auto-update from inside the app — no action needed.
  • Fresh install: download the DMG below → drag to /Applications.

Verify

  • App: 319 Swift / 69 suites GREEN (+13 from v0.9.0's 306).
  • Build: signed (Developer ID), notarized + stapled (DMG + Sparkle zip), EdDSA-signed appcast.