Files
LlamaCasty/Helpers/index.md
T
gramps a6aea5bf26 feat(ui): color and acknowledge pinned log errors
Add independent AppLog message types and explicit Class 1/2 severity. Wrap and color log rows, pin Class 1 above Class 2, and let acknowledgement return entries to the current-launch timeline without changing file format or rotation.

Ref: https://logtape.org/manual/levels
2026-11-02 18:17:18 -08:00

3.7 KiB

Helpers — index

Cross-cutting utilities. See schema.md for the memory-map conventions.

File Purpose
ViewModelBase.cs INotifyPropertyChanged + SetProperty<T>() — base for all ViewModels
RelayCommand.cs ICommand implementation for all button actions
AppLog.cs File logger to %APPDATA%\ytLlive\startup.log; startup checkpoints + unhandled-exception capture. Size-capped: rolls to startup.1.log at 5 MB (TASK 55). Also keeps the newest 500 formatted entries in a process-local buffer for the Logs tab, with independent message type and explicit Class 1/2 severity metadata; it never loads prior-launch file contents
LogRotation.cs The size-capped-rotation policy as a pure function over a path: roll startup.log → startup.1.log when it passes the cap, keeping N rolled copies. Separate from AppLog so the logger's 156-call-site surface never changes and the rule is testable alone (TASK 55)
FocusPreservingListBox.cs ListBox subclass that keeps selection/focus coherent when the selected item is deleted; IsSelectable predicate skips hidden scenes; drag-reorder guard
OAuthCredentials.cs Baked-in Google OAuth client ID/secret (desktop app; loopback callback)
TokenStore.cs DPAPI-protected OAuth session persistence (%APPDATA%\ytLlive\ytLlive.auth, CurrentUser scope); Save/Load/Clear — sign-in survives restarts
ImageCache.cs Image byte caching (assets live in the DB)
InverseBoolToVisibilityConverter.cs / NotNullToVisibilityConverter.cs XAML value converters for visibility bindings
AllTrueToVisibilityConverter.cs Multi-value AND-gate → Visible; gates the layer-row capture menu items on row-IsBackground + staged-scene-is-Live (TASK 25)
CameraConflictProbe.cs Best-effort diagnostic: when a camera won't start, enumerates running processes known to hold cameras (OBS, Zoom, Teams, NVIDIA Broadcast, browsers, etc.) — Windows doesn't expose "which process has this device" via any public API, so this is a suspect list, not a verdict
StripPool.cs Four DEDICATED background threads at BelowNormal priority that split one composite into horizontal row strips (the caller runs a strip too); started lazily, runs inline below 64 rows. UNIT 5 — do NOT demote the ThreadPool from Parallel.For, it leaks into unrelated work (see docs/ai/frame-pipeline.md → "Render budget")
FrameCadence.cs Pure arrival-cadence counter (FrameCadence + FrameCadenceSummary.Describe): frames, gaps, hitches, longest/avg gap for a window of a timestamped stream. Fed by MediaCaptureFrameSource (camera stamps vs our arrivals) and FramePump (distinct webcam Epochs that reached the output) — UNIT 0, see docs/ai/frame-pipeline.md → "Frame cadence"
HexToBrushConverter.cs A "#RRGGBB" hex string → SolidColorBrush (transparent on bad input), so a template can paint a colour swatch straight from the palette. Registered in the theme as HexToBrush — the theme paints the colour, never the UI code (TASK 63)
ClosedBoxTemplateSelector.cs An ItemTemplateSelector that gives a ComboBox's CLOSED box a different template from its drop-down rows: WPF calls it with the ContentPresenter's templated parent — the ComboBox for the closed box, the ComboBoxItem for a row. The only way to tell them apart (SelectionBoxItemTemplate is read-only and mirrors ItemTemplate) — TASK 63

Related: Themes/Controls.xaml styles the lists this class backs; Models/index.md and ViewModels/index.md for the objects it works on.