Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/chrome-extension/src/offscreen/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,12 @@
);
await ownedSpool.dispose().catch(() => undefined);
}
// Reset the "creating" status so later status syncs do not report a
// phantom in-progress recording.
if (status.phase === "creating") {
// Reset the status this attempt set so later status syncs do not report
// a phantom in-progress recording. "recording" is already set before
// recorder.start(), so a throw there would otherwise leave a capture
// phase with no session behind it: stop becomes a no-op and the idle
// self-close never fires.
if (status.phase === "creating" || status.phase === "recording") {
status = isUserCancellationError(error)
? { phase: "idle" }
: {
Expand Down Expand Up @@ -1429,7 +1432,7 @@

const pauseRecording = () => {
const recording = activeRecording;
if (!recording || recording.recorder.state !== "recording") {

Check warning on line 1435 in apps/chrome-extension/src/offscreen/recorder.ts

View workflow job for this annotation

GitHub Actions / Lint (Biome)

lint/complexity/useOptionalChain

Change to an optional chain.
return status;
}
const now = Date.now();
Expand All @@ -1449,7 +1452,7 @@

const resumeRecording = () => {
const recording = activeRecording;
if (!recording || recording.recorder.state !== "paused") {

Check warning on line 1455 in apps/chrome-extension/src/offscreen/recorder.ts

View workflow job for this annotation

GitHub Actions / Lint (Biome)

lint/complexity/useOptionalChain

Change to an optional chain.
return status;
}
const now = Date.now();
Expand Down
Loading