fix: repeat-mode infinite loop and state desync; feat: word-highlight and repeat-phrase (issue #232) - #233
Merged
nmwael merged 3 commits intoAug 2, 2026
Conversation
…; fix repeat-mode infinite loop and state desync
…lsp permission, api key env fix; forward huggingface key into devcontainer
nmwael
deleted the
issue/232-feat-language-learning-features-word-highlight-and
branch
August 2, 2026 14:37
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY
Issue #232's language-learning features (word highlight + repeat phrase) exposed two bugs in
PlayerNotifier:currentIndex < entries.length, which is always true for a 0-based index, so repeat mode loops the last subtitle forever.isPlaying/isPausedwere never updated when a subtitle repeated, desyncing the UI state.WHAT
Word-highlight and repeat-phrase language-learning features plus repeat-mode fixes.
currentIndex < state.entries.length - 1.isPlaying: true, isPaused: falseand delegates to a shared private_repeatCurrent().HOW
Follows TDD with BDD: the tester first wrote failing red tests (
player_notifier_repeat_mode_test.dartwith a fakeTtsRepositoryexposing a repeat-call counter, plus the existing language-learning spec tests), then the developer made them green.dart analyzeanddart formatclean.