debug replay fixes

- initial selection without changing the radio button in the dialog would select 1 hour (rather than 1 minute)
- use CLIPS_DIR instead of CACHE_DIR so that longer replay clips don't cause tmpfs cache overflows
This commit is contained in:
Josh Hawkins
2026-04-30 08:47:33 -05:00
parent ea0f4b6a0f
commit 2967aa1436
3 changed files with 5 additions and 11 deletions
@@ -391,10 +391,8 @@ export default function MobileReviewSettingsDrawer({
className="flex w-full items-center justify-center gap-2"
aria-label={t("title", { ns: "views/replay" })}
onClick={() => {
const now = new Date(latestTime * 1000);
now.setHours(now.getHours() - 1);
setDebugReplayRange({
after: now.getTime() / 1000,
after: latestTime - 60,
before: latestTime,
});
setSelectedReplayOption("1");
@@ -541,11 +539,9 @@ export default function MobileReviewSettingsDrawer({
return;
}
const hours = parseInt(option);
const minutes = parseInt(option, 10);
const end = latestTime;
const now = new Date(end * 1000);
now.setHours(now.getHours() - hours);
setDebugReplayRange({ after: now.getTime() / 1000, before: end });
setDebugReplayRange({ after: end - minutes * 60, before: end });
};
content = (
+1 -3
View File
@@ -728,10 +728,8 @@ export function RecordingView({
setShareTimestampOpen(true);
}}
onDebugReplayClick={() => {
const now = new Date(timeRange.before * 1000);
now.setHours(now.getHours() - 1);
setDebugReplayRange({
after: now.getTime() / 1000,
after: timeRange.before - 60,
before: timeRange.before,
});
setDebugReplayMode("select");