Skip to content

Protect recordings from empty captures and stale deletions - #7444

Merged
ComputelessComputer merged 3 commits into
mainfrom
fix/multi-device-capture-safety
Sep 7, 2026
Merged

Protect recordings from empty captures and stale deletions#7444
ComputelessComputer merged 3 commits into
mainfrom
fix/multi-device-capture-safety

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Discard only confirmed empty scheduled desktop audio. Preserve unseen recording and note content across synced deletions while keeping intentional deletion and mobile recording behavior intact.


Note

High Risk
Changes E2EE session deletion and restoration semantics plus automatic local audio removal; incorrect guards or reconciliation could delete valid recordings or resurrect or drop synced session data.

Overview
Scheduled desktop captures can now be dropped when they turn out to be empty: auto-starts are tagged as automatic, lifecycle markers remember pre-recording audio state and the initial title, and on stop the app runs discardEmptyAutomaticCapture before cataloging audio or batch work. That path uses a new audio_has_speech fs-sync command (VAD in fs-sync-core) and only deletes local audio when speech is confidently absent and the note is still unchanged, empty, and unattached; manual starts stay manual even if a scheduled waiter exists.

Synced session deletions gain observation-based reconciliation so notes are not lost to tombstones the deleter never saw. Migrations add content_version on documents/transcripts, deletion_context on sessions, a session_content_observations view, local restore triggers when real content arrives offline, and reconcile_session_deletion during E2EE replica apply. Intentional deletes still stick once observed content matches; empty/metadata-only writes do not resurrect deleted sessions.

Reviewed by Cursor Bugbot for commit 4f1bdbf. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for anarlog canceled.

Name Link
🔨 Latest commit 4f1bdbf
🔍 Latest deploy log https://app.netlify.com/projects/anarlog/deploys/6a9ee0c95d58d300087c0826

@ComputelessComputer
ComputelessComputer force-pushed the fix/multi-device-capture-safety branch from f2a9c88 to 3f047a1 Compare September 7, 2026 15:02

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread apps/desktop/src/stt/empty-automatic-capture.ts
Comment thread crates/db-app/src/session_deletion.rs
Discard only confirmed empty scheduled desktop audio. Preserve unseen recording and note content across synced deletions while keeping intentional deletion and mobile recording behavior intact.
Handle SQLite boolean attachment flags during safe automatic cleanup and accept both string and structured attachment versions when reconciling synced deletions.
@ComputelessComputer
ComputelessComputer force-pushed the fix/multi-device-capture-safety branch from 3f047a1 to 4296ffa Compare September 7, 2026 15:47

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread crates/db-app/src/e2ee/replica_apply.rs
Restore unseen local transcripts, notes, and audio immediately while preserving deletion observations for later sync. Keep empty writes and intentional deletions unchanged, with regression coverage for offline writes.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4f1bdbf. Configure here.

@ComputelessComputer
ComputelessComputer merged commit 8a39c78 into main Sep 7, 2026
30 checks passed
cursor Bot pushed a commit that referenced this pull request Sep 7, 2026
main's #7444 added automatic, preserveExistingAudio and initialTitle to
CaptureLifecycleMarker. The shell writes them for its manual captures
(false / true / the session title at start), parses them from the web view's
markers and keeps them through recovery, so both shells read each other's
markers unchanged.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
main's #7444 added automatic, preserveExistingAudio and initialTitle to
CaptureLifecycleMarker. The shell writes them for its manual captures
(false / true / the session title at start), parses them from the web view's
markers and keeps them through recovery, so both shells read each other's
markers unchanged.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
main's #7444 added automatic, preserveExistingAudio and initialTitle to
CaptureLifecycleMarker. The shell writes them for its manual captures
(false / true / the session title at start), parses them from the web view's
markers and keeps them through recovery, so both shells read each other's
markers unchanged.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Sep 8, 2026
main's #7444 added automatic, preserveExistingAudio and initialTitle to
CaptureLifecycleMarker. The shell writes them for its manual captures
(false / true / the session title at start), parses them from the web view's
markers and keeps them through recovery, so both shells read each other's
markers unchanged.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
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