Skip to content

fix: repeat-mode infinite loop and state desync; feat: word-highlight and repeat-phrase (issue #232) - #233

Merged
nmwael merged 3 commits into
developmentfrom
issue/232-feat-language-learning-features-word-highlight-and
Aug 2, 2026
Merged

fix: repeat-mode infinite loop and state desync; feat: word-highlight and repeat-phrase (issue #232)#233
nmwael merged 3 commits into
developmentfrom
issue/232-feat-language-learning-features-word-highlight-and

Conversation

@nmwael

@nmwael nmwael commented Aug 2, 2026

Copy link
Copy Markdown
Owner

WHY

Issue #232's language-learning features (word highlight + repeat phrase) exposed two bugs in PlayerNotifier:

  1. The playback-completion listener guarded currentIndex < entries.length, which is always true for a 0-based index, so repeat mode loops the last subtitle forever.
  2. isPlaying / isPaused were never updated when a subtitle repeated, desyncing the UI state.

WHAT

Word-highlight and repeat-phrase language-learning features plus repeat-mode fixes.

  • Fix 1: the completion listener now compares currentIndex < state.entries.length - 1.
  • Fix 2: any repeat (auto or manual) sets isPlaying: true, isPaused: false and delegates to a shared private _repeatCurrent().
  • New unit / widget / BDD tests and regenerated goldens.
  • opencode subagent config (per-agent LSP permission, provider models maps), rebased cleanly onto the latest development while keeping PR chore: spread agent model assignments across providers to reduce rate limiting #231's provider-spread model assignments.

HOW

Follows TDD with BDD: the tester first wrote failing red tests (player_notifier_repeat_mode_test.dart with a fake TtsRepository exposing a repeat-call counter, plus the existing language-learning spec tests), then the developer made them green.

nmwael added 2 commits August 2, 2026 11:33
…; fix repeat-mode infinite loop and state desync
…lsp permission, api key env fix; forward huggingface key into devcontainer
@nmwael nmwael added the enhancement New feature or request label Aug 2, 2026
@nmwael
nmwael merged commit 7eb0d84 into development Aug 2, 2026
8 checks passed
@nmwael
nmwael deleted the issue/232-feat-language-learning-features-word-highlight-and branch August 2, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant