TASK 18: manual rename modal for finished recordings

RenameRecordingDialog (themed, mirrors GoLiveWindow chrome): pre-fills the auto stem,
Enter/OK saves, Esc/Cancel keeps the auto name, strips stray .mp4, rejects invalid
filename chars. FinalizeRecordingAsync shows it before UniquePath rename. Naming logic
still covered by RecordingFileTests; UI shell is pure. verify.sh gate: 0 warnings,
244/246 (2 known).
This commit is contained in:
2026-08-29 09:24:13 -07:00
parent be529a46d7
commit 46f4696db6
5 changed files with 116 additions and 6 deletions
+10 -2
View File
@@ -3380,9 +3380,17 @@ public class MainViewModel : ViewModelBase
return;
}
_recordLength = _liveElapsed;
var finalName = RecordingFile.BuildFinalName(_recordStartTime, _recordLength) + ".mp4";
var autoStem = RecordingFile.BuildFinalName(_recordStartTime, _recordLength);
var dir = Path.GetDirectoryName(startPath)!;
var finalPath = UniquePath(Path.Combine(dir, finalName));
// Manual rename modal: give the creator a chance to name the recording;
// null = keep the auto name (or the default recorded above).
string stem = autoStem;
var dialog = new RenameRecordingDialog(autoStem);
if (dialog.ShowDialog() == true && !string.IsNullOrEmpty(dialog.ResultFileName))
stem = dialog.ResultFileName;
var finalPath = UniquePath(Path.Combine(dir, stem + ".mp4"));
File.Move(startPath, finalPath);
AppLog.Write($"Recording saved: {finalPath}");
_notifications.Info("Recording saved",