Skip to content

feat(transcript): Clear button + actually delete persisted transcript#7

Merged
preston176 merged 1 commit into
mainfrom
feat/clear-transcript
Jun 9, 2026
Merged

feat(transcript): Clear button + actually delete persisted transcript#7
preston176 merged 1 commit into
mainfrom
feat/clear-transcript

Conversation

@preston176

Copy link
Copy Markdown
Owner

Fixes: removing the video left the transcript behind, and there was no way to re-pick a model.

Cause: setDoc(null) only clears the in-memory doc — it never deletes the persisted copy (deliberately, since undo/redo round-trips through setDoc). So on refresh the stored transcript reloaded, and while a doc exists the model picker (EmptyState) stays hidden — no way to re-transcribe.

Fix:

  • TranscriptStore.clearDoc() — nulls the doc and deletes the persisted transcript for the active project (deleteTranscript({ projectId })).
  • Toolbar "Clear" button (confirms first) → resets status to idle, clears selection/search → returns to the model picker + Generate.
  • Tests: clearDoc nulls+notifies, and deletes the persisted transcript (4 store tests, mocked storage).

Verification: tsc clean; 42 tests pass.

Removing the video left the transcript behind: setDoc(null) only clears the
in-memory doc and never deletes the persisted copy, so a refresh reloaded it —
and with a doc present the model picker (EmptyState) stays hidden, so there was
no way to re-pick a model and re-transcribe.

- TranscriptStore.clearDoc(): nulls the doc AND deletes the persisted transcript
  for the active project (setDoc(null) is left untouched — undo/redo rides it)
- transcript panel: a 'Clear' button in the toolbar resets status to idle and
  clears selection/search, returning to the model picker + Generate
- tests: clearDoc nulls+notifies, and deletes the persisted transcript
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscript Ready Ready Preview, Comment Jun 9, 2026 8:23am
openscript-app Ready Ready Preview, Comment Jun 9, 2026 8:23am

@preston176 preston176 merged commit 98d011a into main Jun 9, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant