Skip to content

v0.0.3: Split overlay mode, live translation, and stability fixes#1

Merged
9bow merged 5 commits intomainfrom
develop
Feb 20, 2026
Merged

v0.0.3: Split overlay mode, live translation, and stability fixes#1
9bow merged 5 commits intomainfrom
develop

Conversation

@9bow
Copy link
Copy Markdown
Owner

@9bow 9bow commented Feb 20, 2026

Summary

  • Split display mode: Separate recognition and translation into two independent overlay windows, each independently positionable and resizable
  • Live translation: Translations now appear incrementally as text is being recognized, not just after sentence finalization
  • Overlay stability fixes: Fixed invisible overlay windows blocking clicks (NSHostingView frame initialization), added screen boundary clamping to prevent off-screen windows
  • Improved text processing: Duplicate entry filtering, punctuation-only removal, always-on auto-scroll
  • Unified lock/unlock: Menu bar Lock Overlay toggle now syncs both windows simultaneously in split mode
  • Settings enhancements: Display Mode picker (Combined/Split), "Reset All Overlay Windows" button, per-window lock toggles
  • README overhaul: Comprehensive setup guide with step-by-step instructions, usage guide, troubleshooting table

Changes

New Files

  • RecognitionOverlayView.swift — Split mode recognition-only overlay
  • TranslationOverlayView.swift — Split mode translation-only overlay with .translationTask

Modified Files

  • AppState.swift — Live translation debouncing, duplicate detection, punctuation filtering, overlap detection
  • OSTApp.swift — Split mode lock sync
  • WindowManager.swift — Dual window management, side-by-side reset, screen-aware positioning
  • OverlayWindow.swift — Role-based frame persistence, explicit hosting view frame, screen clamping
  • UserSettings.swift — Display mode and overlay2 frame settings
  • FontSettingsView.swift — Display Mode picker, Reset All button, per-window controls
  • SettingsView.swift — Forward new callbacks
  • SubtitleView.swift — Always-on auto-scroll, bottom padding fix
  • build.sh — New source files added

Test plan

  • Build succeeds: ./build.sh
  • Combined mode: single overlay with recognition + translation (existing behavior preserved)
  • Split mode: two separate windows showing recognition and translation independently
  • Lock/Unlock from menu bar syncs both windows in split mode
  • Reset All Overlay Windows repositions both windows side-by-side on screen
  • Overlay windows stay within visible screen area on launch
  • Live translation appears incrementally during recognition
  • No duplicate or punctuation-only entries appear
  • Auto-scroll follows latest text in both locked and unlocked states

9bow added 5 commits February 19, 2026 01:06
…tion

- Remove translateWithContext which caused duplicate translations by
  including context translations in the output when Apple Translation
  didn't preserve newline structure
- Add extractCompleteSentences() that detects sentence boundaries via
  linguistic analysis and creates subtitle entries immediately on
  punctuation (. ! ?) instead of waiting for pause timer
- Simplify handlePartialTextStabilized() to consume remaining liveText
  directly as a fallback for unpunctuated speech
- Remove dead translateWithContext method from TranslationService
Add a very low-opacity background (5% black fill + 8% white border)
to the full overlay area so users can always see where the overlay
is positioned, even when no subtitles are displayed.
Wrap NSHostingView in NSView container to decouple window size from
content, add lock toggle and reset button in Settings > Display, and
fix click-through behavior so locked overlay passes clicks through
while unlocked overlay allows move/resize but blocks underlying clicks.
… tracking

- Fix duplicate subtitle entries caused by recognizer text reformulation:
  find longest common prefix instead of resetting consumed state entirely,
  add deduplication check (last 2 entries within 2s) before adding entries
- Fix race condition in stopCapture: set isCapturing=false before
  stopRecognition to prevent phantom entries from Combine sink
- Fix SystemAudioCapture: finish continuation before awaiting stopCapture
  to prevent dangling yields; remove force-unwrap on re-entry
- Fix SpeechRecognizer: handle partial result + error simultaneously
  to prevent recognition task from silently dying
- Fix scroll tracking: replace unreliable onAppear/onDisappear on
  zero-height view with onScrollGeometryChange for reliable bottom detection
- Fix handlePartialTextStabilized: use stored sink value instead of
  reading speechRecognizer.currentText directly (timing consistency)
- Fix lastConsumedTail: unconditionally clear after first use to prevent
  stale overlap stripping in subsequent recognition sessions
- Fix detectLanguageIfNeeded: check isCapturing before language change
- Fix LanguagePickerView: add defensive guard and correct swap announcement
- Fix MenuBarView: show "Auto" when source language is auto-detect
- Update README with comprehensive setup guide and feature documentation
… fixes

- Add dual display mode (combined/split) with independent recognition and translation windows
- Add live translation that shows translations as text is being recognized
- Fix invisible overlay blocking clicks by setting explicit hosting view frame
- Add screen boundary clamping to prevent overlay windows from appearing off-screen
- Add "Reset All Overlay Windows" button in Settings > Display Mode
- Add duplicate text filtering, punctuation-only entry removal
- Improve auto-scroll to always follow latest text
- Sync lock/unlock state across both overlay windows
- Update README with comprehensive setup guide, usage instructions, and troubleshooting
@9bow 9bow merged commit 3785d30 into main Feb 20, 2026
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