Problem
PromptFlow creates an object URL for each recorded take so the user can review, download, or share it in the browser. The current URL is revoked when a recording finishes and replaces an existing review URL, and also when the user dismisses the take.
There is one gap: starting a new recording clears recordedUrl with setRecordedUrl('') before the next recorder.onstop callback gets a chance to revoke the previous URL. That can leave the old blob: URL alive until the page reloads.
Relevant code: src/App.tsx, around the beginRecording, dismissRecording, and recording review state.
Proposed fix
Revoke the existing recorded take URL before clearing it when a new recording starts. Keep the existing dismiss behavior intact.
Acceptance criteria
- Starting a new recording revokes any previous recorded take object URL.
- Dismissing a take still revokes the current object URL.
- Repeated record/review/record cycles do not leave stale object URLs behind.
- Download and share behavior for the latest take still works.
Verification
- Run
npm run lint.
- Run
npm test.
- Run
npm run build.
- If possible, manually record two short takes in a row and confirm the latest take can still be reviewed/downloaded.
Problem
PromptFlow creates an object URL for each recorded take so the user can review, download, or share it in the browser. The current URL is revoked when a recording finishes and replaces an existing review URL, and also when the user dismisses the take.
There is one gap: starting a new recording clears
recordedUrlwithsetRecordedUrl('')before the nextrecorder.onstopcallback gets a chance to revoke the previous URL. That can leave the oldblob:URL alive until the page reloads.Relevant code:
src/App.tsx, around thebeginRecording,dismissRecording, and recording review state.Proposed fix
Revoke the existing recorded take URL before clearing it when a new recording starts. Keep the existing dismiss behavior intact.
Acceptance criteria
Verification
npm run lint.npm test.npm run build.