Files
LlamaCasty/HANDOFF.md
T
gramps a9eb360288 TASK 18: local (record-only) recording pipeline + top-bar pills/light/Start-End button UX
Encoder dual-output: StreamEnabled/RecordEnabled/RecordPath options; per-output
ffmpeg block (stream ->flv, record ->mp4); throw unless at least one output.

RecordingFile: auto-name ty-<yyyymmdd>-<start hhmm>-0000.mp4, rename-on-stop to
ty-...-<len hhmmss>.mp4 with numeric-suffix on collision. LayoutStore persists
record folder. MainViewModel: REC/ON-AIR pills, status light, single Start<->End
button (replaces Start/Stop variants), StopStream no longer signs out, explicit
session timer. About overlay widened. Sign In label + spacing before Start.

Tests: 244 passed / 246 (2 pre-existing: AudioPipeline gains-mute, RoundClip).
Build 0 warnings. Scope check clean.

Memory-map correction (derived-solution rule, 2026-08-29): image-shrink recipe was
never recorded when first done, so it was re-derived. Added Derived-solution/recipes
rule to AGENTS.md; MyMistakes.md now a permanent recipes registry (records the
verified WPF-imaging shrink recipe); schema.md rows MyMistakes as registry; ai.md
points to the rule. README hero image replaced: 3.2MB screenshot -> 1400x794 ->
188KB docs/ytLlive-preview.jpg (JPEG q82).
2026-08-29 09:02:55 -07:00

76 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HANDOFF — Session State
## Branch / Commit State
**`main`**, working tree has an **uncommitted TASK 18 work unit** (record-only pipeline + top-bar
pills/light/button UX + About resize + now button-label Start/End simplification) **plus a docs/image
memory-map fix** (derived-solution rule + README hero image). `origin/main` and head are both at
**`1e633f9`** (spin-guard rule), already pushed. This session's changes are **NOT committed** yet — see
"Next steps".
No feature branches pre-1.0: all work lands on `main` per work unit (pending the creator's go-ahead to
commit + push).
## Memory-map corrections (2026-08-29 — "don't re-derive" fix)
- **Incident:** the image-shrink recipe (for `docs/ytLlive-preview.jpg`) was never recorded when first
done, so it was re-derived from scratch. Fixed by:
- **`AGENTS.md`** → Working rules: new **🔬 Derived-solution rule** (record a one-off solution in
`MyMistakes.md` the same session; grep it first on any "did this before?" wall).
- **`MyMistakes.md`** → contract expanded: per-task failure log **+ RECIPES REGISTRY** (permanent, NOT
truncated); recorded the verified image-shrink recipe.
- **`schema.md`** → file inventory now rows `MyMistakes.md` as the recipes registry.
- **`ai.md`** → Derivative-work section notes the derived-solution rule (registry reachable from map home).
- **`README.md`** + `docs/ytLlive-preview.jpg` → README hero image replaced (screenshot downscaled to
1400×794, 188KB JPEG).
## TASK 18 — Local recording (in progress, 2026-08-29)
**Shipped in this (uncommitted) change:**
- `EncoderOptions` + `FfmpegArgs` + `FfmpegEncoder`: independent `StreamEnabled`/`RecordEnabled`/
`RecordPath`; per-output blocks (`-f flv` stream, `-f mp4` record); encoder throws unless ≥1 output.
- `MainViewModel`: REC + ON-AIR pill toggles, status lights, dynamic `PrimaryButtonText`
(Start Streaming / Start Recording), `ShowPrimaryStartButton`/`ShowLogInButton`/`ShowEndStreamButton`,
`CanStartSession`, `AccountStatusLightToolTip`; `IsEditMode` += `!IsRecording`.
- `StartSession()` routes: ON-AIR → GoLive dialog then stream (± record); only-REC → `BeginRecordOnly()`
(no YouTube dialog). `StopStream()` no longer signs the creator out (explicit logout only) and runs
**rename-on-stop** to `ty-<yyyymmdd>-<HHmm start>-<hh2mm2 length>.mp4`.
- `Services/RecordingFile` (pure): auto-name `ty-…-0000.mp4` → rename-on-stop with hh2mm2 length.
- `LayoutStore.Load/SaveRecordFolder` + `ChooseRecordFolderCommand` (`OpenFolderDialog`), default
`%APPDATA%\ytLlive\recordings\`.
- `MainWindow.xaml`: REC/ON-AIR pill `ToggleButton`s + status lights, dynamic button, status-light tooltip,
About overlay border 520→650 / MaxHeight 560→700 / padding 24→28, About grid background `#171928`.
- Tests: `FfmpegEncoderTests` record-only + dual-output arg tests; `RecordingFileTests` (naming rules).
**Not done / parked:** manual rename dialog for the user (planned as a modal, needs a trigger since the
toast service has no actions) — parked; running-app verification of rename + dual output.
## Key facts / landmines
- **Pre-existing test failures (do not chase):** `AudioPipelineTests.Mix_HonorsProviderGains…` +
`RoundClipInteractionTests.Round_Clip_Corner_Is_Grabbable…` — fail on `main` with this change unapplied.
All other tests pass (incl. the 7 new recording tests).
- **App running locks `ytLive.exe`** → build fails MSB3027 until the creator exits the app.
- **Startup diagnostics:** `%APPDATA%\ytLlive\startup.log` (`Helpers/AppLog.cs`).
- **Real-MainWindow tests MUST set `LayoutPathOverride`** — DB pollution wiped real data once.
- **Good Dog Rule:** ONE integration test per change; no feature branches pre-1.0.
- **Scope Lock:** declared list below; run `scripts/scope-check.sh` before committing.
- **Every feature change ships memory updates in the SAME commit** — `TASKS.md` status + this file.
- No `CODING.md`; conventions live in `AGENTS.md` + `ai.md`.
## Commit scope (declared)
`Services/Encoder/EncoderOptions.cs Services/Encoder/FfmpegArgs.cs Services/Encoder/FfmpegEncoder.cs
Services/Encoder/FramePump.cs Services/RecordingFile.cs Services/LayoutStore.cs
ViewModels/MainViewModel.cs MainWindow.xaml ytLive.Tests/FfmpegEncoderTests.cs
ytLive.Tests/FramePumpTests.cs ytLive.Tests/RecordingFileTests.cs
AGENTS.md TASKS.md ai.md HANDOFF.md MyMistakes.md schema.md README.md
docs/ytLlive-preview.jpg docs/ytLlive-preview.png(deleted)`
## Next steps
1. Creator to decide: commit + push this TASK 18 work unit (scope list above), or refine first
(verify the rename + dual output in the running app before committing).
2. Continue queue: TASK 21 media source, TASK 22 audio sync offset.