Skip to content

fix: reset cursor state on recording load#589

Merged
meiiie merged 1 commit into
mainfrom
fix/reset-cursor-state-on-source-load
May 24, 2026
Merged

fix: reset cursor state on recording load#589
meiiie merged 1 commit into
mainfrom
fix/reset-cursor-state-on-source-load

Conversation

@meiiie
Copy link
Copy Markdown
Collaborator

@meiiie meiiie commented May 24, 2026

Summary

  • Clear cursor telemetry when loading a fresh recording/source.
  • Reset fresh-recording auto-suggest guards with the rest of source-scoped editor state.

Type of Change

  • Bug fix

Related Issue(s) / PRs

Motivation

The source-scoped reset added in #588 cleared timeline, audio, and history state, but still left cursor telemetry and auto-suggest guard refs alive across source swaps. This could briefly show/use the previous recording's cursor telemetry or suppress fresh auto-suggest if two recordings had the same telemetry sample count.

Testing Guide

  1. Load one recording with cursor telemetry.
  2. Load a different fresh recording.
  3. Confirm the editor starts with empty cursor telemetry until the new source telemetry finishes loading.
  4. Confirm fresh-recording auto-suggest is not suppressed by the previous source's telemetry count.

Validation

  • npx biome check src/components/video-editor/VideoEditor.tsx --formatter-enabled=false
  • npx tsc --noEmit --pretty false
  • git diff --check

Screenshots / Video

Not applicable; state reset only.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 24, 2026

📝 Walkthrough

Walkthrough

VideoEditor's resetSourceScopedEditorState function now clears cursor telemetry data and resets auto-suggest telemetry tracking alongside existing state resets for zoom, clip, and audio regions.

Changes

Telemetry State Cleanup

Layer / File(s) Summary
Source-scoped editor state reset with telemetry cleanup
src/components/video-editor/VideoEditor.tsx
resetSourceScopedEditorState extends state reset to clear cursorTelemetry and cursorTelemetrySourcePath, and reset pendingFreshRecordingAutoSuggestTelemetryCountRef and autoSuggestedVideoPathRef for tracking consistency.

🎯 2 (Simple) | ⏱️ ~8 minutes

Checked

🐰 With a hop and a bound, telemetry's found—
State resets are clean, no data left 'round.
Cursor and suggest now clear from the scene,
The editor's fresh—best you've ever seen!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: resetting cursor state when a recording is loaded.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering all key sections including summary, motivation, type of change, related issues, testing guide, and validation steps.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/reset-cursor-state-on-source-load

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 and usage tips.

@meiiie meiiie merged commit f9b82a9 into main May 24, 2026
4 checks passed
@meiiie meiiie deleted the fix/reset-cursor-state-on-source-load branch May 24, 2026 20:10
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