Repository navigation
Menu bar panel - #24
Merged
Merged
Conversation
added 19 commits
November 23, 2026 02:20
…e waits The real startSession awaits the previous post-processing before it marks the note recording, so two panel clicks in that window could start twice; the fake now waits there too, so the double-start spec needs a real guard. Real-VM specs wait up to 10 s like the calendar specs (3 s flaked before). Proof: dart analyze reports only the missing production names.
The native panel reads only this map, so the speaker label and the suggestion title/detail now live in one function each, shared with the live screen and the shell prompt instead of being copied. Proof: status_panel_snapshot_test.dart, 23 green.
…ts clicks The panel lives in another process space (AppKit), so Dart owns the state: statusPanelSyncProvider sends the snapshot at launch, on each change (at most every 250 ms, last state always sent) and in full on 'ready', and maps the panel's clicks onto the same paths as the window (startOrShowNote, stopSession, suggestion start/dismiss, retry). Double clicks are folded by in-flight guards; quit stops and saves the note, waits for a finalisation started from the window, then asks the native side to terminate. The live view model now fills sessionTitle. RootAppWidget mounts the sync once the kernel is ready. Proof: test/features/status_panel/, 58 green.
During a call in another app the Oats window is out of sight, so the
recording state, the last lines, the live question and the meeting
suggestion now live in an NSStatusItem with an AppKit panel that never
activates the app. It renders only the last Dart snapshot, sends the
clicks back, and asks for a fresh snapshot ('ready') when opened.
Closing the main window now hides it (performClose -> orderOut) and the
app no longer quits with its last window; the Dock click and
'showWindow' bring it back; 'terminate' quits through NSApp.
Proof: flutter build macos --debug succeeds; an offscreen render of the
real panel views (swiftc against the built FlutterMacOS, invented
content) was looked at in light and dark. The live menu bar behaviour
was not run.
flutter analyze reported two unused imports left by the shared speaker label and the sync provider.
…ck restore An offscreen check showed the red close button calls close() without going through performClose(_:), so the override would have really closed the window. windowShouldClose(_:) is called for both the button and Cmd+W (checked with a swiftc script) and, per its doc, not on quit. Reopen now returns true when a window is visible (minimized counts), so AppKit still restores a minimized window from the Dock. Proof: flutter build macos --debug succeeds.
…ithin a bound Quit (panel, Cmd-Q, Dock) must stop the note, then every server Oats launched, then terminate; skip the finalisation; be idempotent; send terminate within 30 s even if a stop hangs or a signal fails. The tail must drop both marker kinds without losing a line. Proof: new specs red (servers alive at terminate, no skip, two terminates, untranscribed marker shown; stopAll missing); existing panel specs green.
Main now writes a second marker kind (Passage non transcrit). The panel reuses the grouping's marker predicate, made public, instead of a second copy, so neither kind takes one of the three lines. Proof: status_panel_snapshot_test.dart green.
A model server of several GB outlived the app until the next launch. Quit (panel, and soon Cmd+Q / Dock) now stops and saves the note, skipping a finalisation (the audio is on disk, the backfill resumes at next launch), then stops every process in the registry through the new OwnedProcessRegistry.stopAll() (group signals, failures logged and left for the next launch's cleanup), then sends terminate. Each step is time-boxed (10 s + 18 s) so terminate always leaves within 30 s, and a repeated quit reuses the same run. Proof: status_panel_quit_test, owned_processes_stop_all_test and the other panel and platform specs, 222 green.
Cmd+Q, the app menu, Dock › Quit and logout bypassed the note save and left the model servers running. applicationShouldTerminate now answers terminateLater, sends 'quit' to Dart and replies when Dart calls 'terminate' — or after 35 s, or at once if Dart has no handler or errors — so the app can never refuse to quit. The vibrancy material rendered mid-grey with filled grey buttons. The panel now draws the app tokens (oats_tokens.dart) per appearance: white or near-black ground, hairline border and separators, outlined 6 px buttons with a single filled primary, and the accent green only on the recording dot. Proof: offscreen renders of the real views, light and dark, for idle, recording with an answer, finalising and both suggestions, looked at.
…owStart key Review of PR #24. Quit skips the finalisation then kills the server, so the session must already be pending on disk (attempt not counted) when terminate is sent; the next launch then restores the sentence once, at its time. Each new suggestion key sends one 'suggest' call (never while recording or dictating, window hidden included); the snapshot's 'showStart' hides the generic start while a suggestion shows. Proof: quit-backfill red (no pending file at terminate; relaunch half checked green with the expected disk state); suggest red (no call); showStart red (key missing).
Quit skips the finalisation and stops the server, promising the backfill resumes at next launch; but an attempt in flight wrote the pending file only after its outcome, so quitting mid-attempt left nothing on disk and the skipped text was stranded. The session is now written as pending (count unchanged) before the attempt starts; only a finished attempt that reached the server increments the count. Proof: status_panel_quit_backfill_test (both cases) and the backfill specs under test/application/services green.
A suggestion shown only in the snapshot stays unseen until the panel is
opened. Dart now sends 'suggest' {key, kind, title, detail} once per new
key, never during a note or a dictation, so the native side can open the
panel. The snapshot gains showStart (idle and no suggestion) so only one
'Démarrer la note' is ever shown, and 'truncated' also covers answers
shortened by the new parser (the contract has a single key for it).
Proof: status_panel specs, 85 green.
…p Nap terminateLater runs the loop in NSModalPanelRunLoopMode: Flutter messages still flow (FlutterRunLoop uses common modes, engine 3.38.4), but DispatchQueue.main blocks do not (checked with a swiftc script), and AudioCapturePlugin answers through the main queue, so stopping a note could stall until the bound; the 35 s safety block itself would never have fired. Cmd+Q and Dock Quit now cancel, let Dart quit, then call terminate again (as FlutterAppDelegate does). Logout/restart/shutdown (quit Apple event with a reason, or willPowerOff) still use terminateLater so they are not aborted, bounded by a timer added in common modes. 'suggest' opens the panel without activating the app nor taking key focus, and closes it after 12 s unless the pointer is inside; never over an open panel. The generic start button follows showStart and the suggestion's start is the filled primary. A recording holds a userInitiated activity so a hidden window is not napped. Proof: debug build; offscreen renders of the suggestion states (panel visible, not key, app not active).
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
com.icitranscript/status_panel); the snapshot is built by a pure Dart function and pushed at most ~4 times per second.Checked
Not checked