Skip to content

English coach: batches, live mode, overview page - #26

Merged
9clg6 merged 21 commits into
mainfrom
oats-coach
Nov 23, 2026
Merged

9clg6 merged 21 commits into
mainfrom
oats-coach

Conversation

@9clg6

@9clg6 9clg6 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What

  • Post-call coach works on the note's segments: microphone lines only, markers excluded, French sentences skipped (two French function words, or no English one), bounded batches; a failed batch is reported as "not analysed" with a retry instead of being dropped; each correction carries the time of its sentence. A model that says in prose there is nothing to correct gives "Aucune correction"; a note with no English sentence says there was nothing to analyse.
  • The post-call pass stops between batches when a new recording starts and marks the rest not analysed.
  • Live coach, optional and off by default: the user's finalized English sentences go in batches, at most one request per 20 s, only to an online provider that is configured and allowed; never to the local model. Up to three recent corrections show in the live panel; they are stored with the note at Stop and skipped by the post-call pass.
  • "Coach anglais" page: notes with their correction count, most recent first, and categories seen in three or more notes.
  • No schema change: feedback stays in the JSON of summaries.content; older rows still load.

Checked

  • Tests: app, core_data, core_domain; analyze clean; debug build.
  • Renders of the new screens, light and dark, 1280 and 900 px.

Not checked

  • Any real model, local or hosted; a real meeting.

Clement Guyon 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.
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.
… 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.
@9clg6
9clg6 merged commit f5dbba9 into main Nov 23, 2026
2 checks passed
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