5.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 audio UX follow-up (9f9ed34) and round 2 (18abe42) are committed and pushed. -
This session (round 3 — mic mute icon + REC sign):
- Mic mute icon: the mic bar gained a microphone glyph (same 16px style
as the speaker, white → red + slash when muted,
ToolTip=MicMuteText) between the meter and the speaker — both mutes adjacent with spacing between the icons; click reuses the sameMicSpeaker_MouseLeftButtonUphandler →ToggleMicMuteCommand. No VM/code-behind change. - REC sign (top center): the old LIVE badge (hidden when offline) became an
always-visible REC chip — dark gray dot (#555) + dim "REC" (#888) offline,
bright red (#e94560) + "REC" + elapsed while live, darker red (#8f1f1f)
when live with a private stream. Driven by new VM props
RecDotBrush/RecTextBrush/RecDotOpacity/IsLivePrivate(notified from theStreamStatusandStreamVisibilitysetters), privacy read off the dialog's chosen visibility (StreamVisibility == "Private") — the stream service still hardcodesprivacyStatus = "public", so the private-REC state only lights once that's honored (TASK 4 ship step 7). The dot pulses while live;LiveIndicatorVisibleandLivePulseOpacitywere removed. - Voice filters queued as task 22 — bass boost, treble, noise suppression, compressor on the mic input channel, KISS, always on (before the meter/encoder mix).
- Mic mute icon: the mic bar gained a microphone glyph (same 16px style
as the speaker, white → red + slash when muted,
-
Mic status contract (creator's rule, verified — do NOT "fix"): the status dot is red until a mic resource is actually connected.
MicStatusstartsNotConnected(red); it goes green ONLY when the mixer'sMicConnectedfires, which comes strictly from the mic source'sStartedevent raised afterStartRecording()succeeds. Zero devices at startup → stays red and the mixer is never started; capture failure → yellow. Green must never be raised earlier (e.g. on loopback start or onStart()being called). -
Uncommitted: this round-3 work —
ViewModels/MainViewModel.cs(REC props,_recDotPulse, StreamVisibility/StreamStatus notifications,LiveIndicatorVisible/LivePulseOpacityremoved),MainWindow.xaml(REC chip + mic mute icon),TASKS.md(task 22 + round-3 audio note),ai.md,ViewModels/index.md,HANDOFF. -
Verified: pending (build + full test run right before commit).
-
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.- The mic dot is red until a resource connects (see contract above) — green
only after
Started, yellow onFailed. - 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 round 3 (one commit). Then TASK 4 ship step 6 — health stats: bind
FramePump.HealthUpdated(bitrate/FPS/duration) into the bottom bar. Also queued: task 21 (logo + About hub), task 22 (voice filters). 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.