Skip to content

feat: add premium on-device noise cleanup#106

Merged
TheOrcDev merged 4 commits into
mainfrom
codex/noise-cleanup-premium
Jul 13, 2026
Merged

feat: add premium on-device noise cleanup#106
TheOrcDev merged 4 commits into
mainfrom
codex/noise-cleanup-premium

Conversation

@TheOrcDev

@TheOrcDev TheOrcDev commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary\n\n- add Premium one-click Noise Cleanup to finished Videorc recordings in Library\n- process locally with the bundled FFmpeg afftdn filter; no upload or quota\n- publish a validated, non-destructive managed derivative while preserving the original\n- persist cancellable and restartable jobs in SQLite and let capture preempt background cleanup\n- add an explicit noise-cleanup entitlement, typed RPC/events, focus/timer refresh, and fail-closed backend enforcement\n- require afftdn, AAC, and pcm_s16le in macOS and Windows package probes\n- promote the promise in the companion web draft: https://github.com/TheOrcDev/videorc-web/pull/6\n\n## Product behavior\n\n- Basic users see a truthful Premium affordance.\n- Premium and Developer users start cleanup with one click.\n- Queued, cleaning, validating, cancel, retry, completed, missing, imported, live, reconnecting, and derivative states are explicit.\n- MP4 outputs use AAC 192 kbps; MKV outputs use pcm_s16le; video is stream-copied.\n- Imported, no-audio, multi-audio, test-tone, unsupported, live, missing, unfinished, and already-cleaned inputs fail closed.\n- Completed outputs appear as Noise Cleaned Library sessions with durable provenance.\n\n## Safety and durability\n\n- backend owns authorization, source-path resolution, identity, job state, process ownership, and publication\n- full SHA-256, sampled content, and filesystem-object identity protect against replacements and mid-run changes\n- app-owned cancellation only; no broad process scans\n- capture cancels or preempts every long identity/media phase and queued work resumes later\n- output allocation reserves every Library-owned database path, including temporarily missing media\n- unavailable volumes never delete derivative metadata\n- entitlement HTTP refresh has an 8-second request timeout inside the 10-second RPC deadline\n\n## Verification\n\n- TypeScript typecheck, lint, format check, production build: PASS\n- JS production advisory audit: PASS\n- Desktop tests: 1,034 passed, 1 existing skip across 127 files\n- Node script tests: 618 of 618 passed across 120 suites\n- Rust: fmt and clippy PASS; 1,300 tests passed, 8 ignored\n- Bundled MP4 and MKV artifact smoke: PASS\n - MP4: 3.4 dB noise reduction, 2.0 dB SNR gain, 0.1 dB voice delta, 0.0 ms duration delta\n - MKV: 3.1 dB noise reduction, 2.0 dB SNR gain, 0.0 dB voice delta, 1.0 ms duration delta\n - source hashes unchanged; video packet hashes match; maintained A/V analyzer passed\n- macOS release backend, helper, universal addon build, and package preflight: PASS\n- Recording Studio aggregate: steps 1 through 23 PASS, including Noise Cleanup, all-layout artifacts, captions, native preview lifecycle/window/surface, interaction, and stress\n- Web companion: 305 of 305 tests, typecheck, build, and Vercel preview PASS; one unrelated existing contributors-image lint warning\n- final read-only review: no actionable findings\n\nDetailed evidence: docs/acceptance/2026-07-13-noise-cleanup.md\n\n## Release-stage blockers\n\nThis remains draft until:\n\n- an owner completes the real-voice by-ear panel\n- Windows native/package preflight and MP4/MKV smoke run on a Windows host\n- desktop dark/light, narrow/wide, and keyboard manual QA is completed\n- the host/device ScreenCaptureKit row is rerun where a native screen source is available\n\nThe current macOS host exposes no ScreenCaptureKit screen source, so aggregate step 24 and the separately run Notes-window real-screen smoke are explicitly environment-blocked. Hosted Windows CI is green, including the installer and bundled Noise Cleanup artifact proof; physical-device release QA remains a separate rollout responsibility.

Summary by CodeRabbit

  • New Features

    • Added one-click Noise Cleanup for Library recordings, producing non-destructive cleaned copies.
    • Added progress, cancellation, retry, output-opening, and source-reveal actions.
    • Added responsive status badges and accessibility support for cleanup states.
    • Added Premium entitlement gating with upgrade options.
    • Added durable processing that resumes interrupted jobs and protects active sources from conflicting actions.
  • Bug Fixes

    • Improved entitlement refresh and cleanup-job state synchronization.
    • Added media validation and bundled FFmpeg capability checks for reliable MP4 and MKV output.
  • Documentation

    • Added Noise Cleanup acceptance criteria and updated capability guidance.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5856c7e-ddbd-462f-a433-b2044186ad95

📥 Commits

Reviewing files that changed from the base of the PR and between 0bb757c and ca4ea0c.

📒 Files selected for processing (35)
  • apps/desktop/src/renderer/src/components/tabs/library-noise-cleanup.test.ts
  • apps/desktop/src/renderer/src/components/tabs/library-tab.tsx
  • apps/desktop/src/renderer/src/hooks/studio-provider.integration.test.ts
  • apps/desktop/src/renderer/src/hooks/use-studio.tsx
  • apps/desktop/src/renderer/src/lib/entitlement-ui.test.ts
  • apps/desktop/src/renderer/src/lib/entitlement-ui.ts
  • apps/desktop/src/renderer/src/lib/entitlements.test.ts
  • apps/desktop/src/renderer/src/lib/entitlements.ts
  • apps/desktop/src/renderer/src/lib/noise-cleanup-view.test.ts
  • apps/desktop/src/renderer/src/lib/noise-cleanup-view.ts
  • apps/desktop/src/shared/backend-rpc-contract.test.ts
  • apps/desktop/src/shared/backend-rpc-contract.ts
  • apps/desktop/src/shared/backend.ts
  • crates/videorc-backend/src/entitlements.rs
  • crates/videorc-backend/src/main.rs
  • crates/videorc-backend/src/noise_cleanup.rs
  • crates/videorc-backend/src/protocol.rs
  • crates/videorc-backend/src/state.rs
  • crates/videorc-backend/src/storage.rs
  • crates/videorc-backend/src/support_bundle.rs
  • crates/videorc-backend/src/videorc_api.rs
  • docs/acceptance/2026-07-13-noise-cleanup.md
  • docs/distribution.md
  • package.json
  • scripts/lib/noise-cleanup-artifact.mjs
  • scripts/lib/noise-cleanup-artifact.test.mjs
  • scripts/lib/recording-studio-gates.mjs
  • scripts/lib/recording-studio-gates.test.mjs
  • scripts/lib/repair-encoder-capabilities.mjs
  • scripts/lib/repair-encoder-capabilities.test.mjs
  • scripts/lib/windows-ffmpeg-capabilities.mjs
  • scripts/lib/windows-ffmpeg-capabilities.test.mjs
  • scripts/preflight-macos-package.mjs
  • scripts/preflight-windows-package.mjs
  • scripts/smoke-noise-cleanup.mjs

📝 Walkthrough

Walkthrough

Noise Cleanup adds durable local processing with Premium gating, persisted job lifecycle management, Library actions and derivative presentation, entitlement/RPC synchronization, FFmpeg artifact validation, and platform packaging preflight checks.

Changes

Noise Cleanup

Layer / File(s) Summary
Contracts and entitlement model
apps/desktop/src/shared/*, crates/videorc-backend/src/protocol.rs, crates/videorc-backend/src/entitlements.rs
Adds Noise Cleanup job types, RPCs, events, runtime validation, session provenance fields, and Premium entitlement gates.
Durable job persistence and backend lifecycle
crates/videorc-backend/src/noise_cleanup.rs, crates/videorc-backend/src/storage.rs, crates/videorc-backend/src/main.rs
Persists jobs and derivatives, runs cancellable FFmpeg processing, validates outputs, resumes interrupted work, and blocks conflicting mutations.
Renderer state and Library actions
apps/desktop/src/renderer/src/hooks/use-studio.tsx, apps/desktop/src/renderer/src/components/tabs/library-tab.tsx, apps/desktop/src/renderer/src/lib/noise-cleanup-view.ts
Synchronizes jobs and entitlements, derives action states, exposes start/cancel flows, updates Library rows, and handles completion navigation and notices.
FFmpeg artifact and packaging verification
scripts/lib/noise-cleanup-artifact.mjs, scripts/lib/*ffmpeg-capabilities.mjs, scripts/preflight-*.mjs, scripts/smoke-noise-cleanup.mjs
Measures cleanup quality and media preservation, requires FFmpeg filters and encoders, and runs MP4/MKV smoke proofs during packaging.
Integration validation and release gates
apps/desktop/src/renderer/src/hooks/studio-provider.integration.test.ts, scripts/lib/*test.*, docs/acceptance/*, docs/distribution.md
Adds lifecycle, artifact, capability, gate-plan, acceptance, and distribution coverage for the integrated Noise Cleanup behavior.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Library
  participant StudioContext
  participant BackendRPC
  participant NoiseCleanupRegistry
  participant Database
  participant FFmpeg

  Library->>StudioContext: startNoiseCleanup(sessionId)
  StudioContext->>BackendRPC: noiseCleanup.start
  BackendRPC->>NoiseCleanupRegistry: start(params)
  NoiseCleanupRegistry->>Database: create or load durable job
  NoiseCleanupRegistry->>FFmpeg: process source with afftdn
  FFmpeg-->>NoiseCleanupRegistry: progress and cleaned output
  NoiseCleanupRegistry->>Database: validate and commit derivative
  Database-->>BackendRPC: completed NoiseCleanupJob
  BackendRPC-->>StudioContext: job result and status event
  StudioContext-->>Library: update row and completion actions
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/noise-cleanup-premium

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TheOrcDev

Copy link
Copy Markdown
Owner Author

Hosted Windows evidence supplement\n\nBoth Windows jobs passed after the acceptance note was committed:\n\n- Windows gates: native Windows clippy, Rust tests, tracked text, desktop tests, and Node script tests passed.\n- Windows installer artifact: installer build and package preflight passed. The preflight executed the bundled Noise Cleanup MP4/MKV artifact proof on Windows. Packaged 1080p A/V, native DXGI/GDI ScreenOnly recording, BMP preview, and preview-while-recording also passed.\n\nRun: https://github.com/TheOrcDev/videorc/actions/runs/29217443315\n\nThis closes the Windows native/package evidence row for draft-PR review. The remaining draft blockers are the owner by-ear panel, human desktop theme/width/keyboard QA, and the unavailable macOS ScreenCaptureKit device row.

…oof test

Resolves the smoke QA command (both sides added the orientation-toggle
fallback — kept main's wording and 10s deadline) and the integration
test file (kept BOTH added tests: the noise-cleanup entitlement/job
durability suite and main's delayed-proof orientation-atomicity
regression, plus both createVideorcApi option sets).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TheOrcDev
TheOrcDev marked this pull request as ready for review July 13, 2026 13:08
@TheOrcDev
TheOrcDev merged commit 7e06fb7 into main Jul 13, 2026
3 of 5 checks passed
TheOrcDev added a commit that referenced this pull request Jul 13, 2026
Ships premium on-device noise cleanup (#106) and the 0.9.37 regression
fixes (#111): live preview resize on orientation change, no chat toast
on recordings, stage label centering.

Co-authored-by: Claude Fable 5 <noreply@anthropic.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