4.4 KiB
HANDOFF — session state
Current operational state, read right after
TASKS.md. Trust this file as the truth of what is in flight — do not re-derive from git/fs unless it points at a problem. Conventions:schema.md. Rewrite this file at session end, compaction, or any interruption.
Session state (last updated: 2026-08-13)
-
Branch:
main. The game audio bar + mic status dot + always-on capture work is uncommitted (see list below). The last committed+pushed baseline isea250c0(social bar click-toggle). -
This session (audio UX follow-up): per the creator's requests —
- The MIC label is now a button with a status dot (
Models/MicStatus: green = capturing, yellow = requested mic problem, red = no device). - Mic capture runs for the app's lifetime (started at startup via
StartMicCaptureAsync, disposed inShutdown;BeginGoLive/StopStreamno longer start/stop the mixer) so both meters preview live. - A game audio bar (desktop/game — meter + mute + volume, mirror of the mic bar) sits centered beneath the preview and appears only while a full-screen game is producing sound (decision: fullscreen + loopback sound; silence never hides an active bar — the creator's final rule). Show after ~500ms of fullscreen+sound, hide ~1s after leaving fullscreen.
- The MIC label is now a button with a status dot (
-
Uncommitted files:
MainWindow.xaml/.cs,ViewModels/MainViewModel.cs,Services/Audio/{IAudioSource,WasapiMicAudioSource,WasapiLoopbackAudioSource,AudioMixer}.cs, newModels/MicStatus.cs, newServices/{IGameAudioDetector,GameAudioHysteresis,GameAudioDetector}.cs,ytLive.Tests/AudioMixerTests.cs, newGameAudioHysteresisTests.cs+GameAudioDetectorTests.cs, memory docs (TASKS.md, ai.md, Services/index.md, ViewModels/index.md, Models/index.md, HANDOFF). -
Verified: build 0 warnings, 0 errors; 167 tests passing (full suite, after the final rebuild).
-
Landmines:
- Never set a local
Canvas.SetTopon the social bar — a local value permanently overrides{Binding SocialBarTop}(theClearValuelesson from 5.5). AudioMixermeterPushis unconditional by design now:OnMicSample/OnLoopbackSamplecompute the level first, then raise the event — a?.Invoke(meter.Push(...))short-circuit skipped the meter update when nothing was subscribed (found byRestartMic_ResetsLevel, fixed).MicConnectedcomes from the sourceStartedevent, raised right afterStartRecording()succeeds — tests mustMarkStarted()the fake source before asserting connection state.- Zero mic devices at startup = red dot AND the mixer is never started, so loopback + the game bar can't run either (no capture at all) — acceptable.
- The game detector is polled on the UI thread via a 250ms
DispatcherTimer;OnGameAudioPollTickwrapsPoll()in try/catch +AppLog. - The pump reads the active scene on a background thread while the UI can still
edit it — a concurrent-mutation exception is contained (logged +
Failed+ the pump stops), not a crash. StopAsyncmust stop the encoder (closes stdin) before awaiting the pump loop — closing stdin unblocks a write stuck on pipe backpressure; the reverse order deadlocks.- Tests never instantiate
MainViewModeldirectly except the round-clip integration test (a realMainWindow), which never goes live — keep it that way. - Sandbox can't reach outbound HTTPS —
HttpSocialValidatorstub-handler tests only, never the real instance.
- Never set a local
-
Next step: commit + push the audio UX follow-up (the whole uncommitted set above in one commit). Then TASK 4 ship step 6 — health stats: bind
FramePump.HealthUpdated(bitrate/FPS/duration) into the bottom bar. Nothing else queued — do not expand the task queue on your own. Optional, not queued: rewriting the healed entry'sProfileUrltohttps://mastodon.llamachile.tube/@gramps(user must say the word). -
Secret/DB/port facts live: OAuth client id/secret in
Helpers/OAuthCredentials.cs; OAuth session token inHelpers/TokenStore.cs(DPAPI →%APPDATA%\ytLlive\ytLlive.auth); layout DB%APPDATA%\ytLlive\ytLlive.db(schema v8;SocialEntry.Softwarecolumn is a column-presence migration like the others, no version bump); OAuth callbackhttp://localhost:8765/oauth2/callback; crash log%APPDATA%\ytLlive\startup.log.