Repository navigation
English coach: batches, live mode, overview page - #26
Merged
Merged
Conversation
added 21 commits
November 23, 2026 03:44
Mic lines only (no system audio, gap or untranscribed markers, French), bounded requests for long meetings, failed parts kept as unanalyzed, correction time taken from the line, live findings not redone. coachAfterCall now takes the note's segments.
…-correction notes, plain time
Corrections now carry the time of their sentence and a feedback lists the sentences whose batch failed, both inside the summaries.content JSON (no migration). coachMeeting sends only microphone English lines (no markers, no French, no franglais), splits long meetings so nothing is cut, keeps the other batches when one fails. parseFeedback reads a prose 'nothing to correct' or [] as an empty feedback. Proved by coach_meeting_test (16/16).
Finalized English sentences of the user go in batches, at most one request per 20 s (first at once), only to an online provider: a local generation during a meeting slows transcription from 1.8 s to 6-24 s. Failures only set 'unavailable'; failed sentences stay for the post-call pass. Proved by live_coach_service_test (13/13).
coachAfterCall now takes the note's segments: it skips what the live coach
already coached for this note, merges both results without duplicates and
always stores the outcome (empty = 'Aucune correction', total failure = all
sentences unanalyzed). The live coach switch is off by default, kept in
prefs.json, started/stopped with the recording and fed by finalized
segments; its findings are stored on Stop even with the post-call coach off.
Proved by post_call_coach{,_batches,_routing}_test, live_coach_wiring_test,
summary_row_owners_test, local_model_selection_test,
live_switches_persistence_test.
Each correction shows its time in the note as plain mm:ss text; no correction is said as such even with an overall comment; a part that could not be analyzed is mentioned with a Retry that resends only those sentences and merges the result. The on-demand coach uses the batched coachMeeting. New French strings for the whole coach (coach.unanalyzed, coach.live.*, coach.corrections, coach.recurring.*, coach.no_correction), locale keys regenerated with easy_localization:generate. Proved by coach_section_test, coach_answer_shapes_test, coach_translations_test and the other note specs.
Settings and the live options bar get a 'Coach en direct' switch, off by default, enabled only when an online provider is configured and allowed (otherwise disabled with the reason). During a meeting the questions column ends with a small block: the 3 most recent corrections with their time, or 'Coach en direct indisponible' (never red). Proved by live_coach_panel_test, live_coach_settings_test and the live/shell specs.
The page lists every note the coach ran on (most recent day first, notes with corrections above zero-correction ones of the same day) with its correction count, opens the note scrolled to its coach section, and shows categories seen in 3+ notes (grammar = Grammaire). Everything is read from summaries.content, no migration; loading and read errors have a retry. Proved by coach_overview_test and the shell/history specs.
With the extra 'Coach en direct' switch the options bar overflowed at 900 px and hid 'Coach anglais'; the options now wrap as groups and the unavailability reason sits on a faint line below. render_screens.dart adds the Coach page, a note's coach section (corrections, none, unanalyzed), the live coach block (corrections, waiting, unavailable) and the switch in the live options and Settings, available or not. Checked by looking at every PNG, light and dark, 1280 and 900 px.
With the post-call coach off, sentences the live coach did not analyze (failed, pending, unavailable) are stored as unanalyzed instead of letting the note say 'Aucune correction'. The parser falls back to the JSON object when a leading [..] is not a list, and the language rule drops the questionLanguage veto that skipped English with an accented name. The live block no longer shows 'waiting' under 'indisponible'; the Settings switch never shows on while disabled. Renders add an all-unanalyzed note row.
…s kept at Stop, stop between batches
… yield - Language: skip a sentence only with two French function words or no English one; acronyms, names and homographs (EST, La Poste, pour me a coffee) were silently dropped. - A note with no English sentence of the user says 'Rien en anglais à analyser' (new nothingToAnalyse flag in the summaries JSON, no migration), in the note and on the Coach page. - Live findings are stored at Stop even with the post-call coach on, so they survive a failed pass or a quit. - coachMeeting takes shouldStop, read before each batch; the post-call pass stops when a recording is requested or active (or the server is held, as for the backfill) and marks the rest unanalyzed. Proved by coach_language_table_test, coach_stop_between_batches_test, coach_section_test, live_coach_keep_test, post_call_coach_batches_test.
Coach page row and the note's coach section for a meeting where the user said no English sentence. Checked by looking at the PNGs.
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.
What
summaries.content; older rows still load.Checked
Not checked