Skip to content

Simplify automatic zoom click handling - #843

Merged
webadderall merged 1 commit into
codex/editor-visual-polishfrom
codex/formatting-autozoom-cleanup
Aug 28, 2026
Merged

Simplify automatic zoom click handling#843
webadderall merged 1 commit into
codex/editor-visual-polishfrom
codex/formatting-autozoom-cleanup

Conversation

@webadderall

@webadderall webadderall commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove unsupported interaction-strength ranking from automatic zoom suggestions.
  • Remove dwell, text-field, dropdown, text-selection, and synthetic double-click heuristics.
  • Build zoom regions directly from recorded click timestamps and coordinates.
  • Give grouped clicks equal influence by focusing on their average position.

Validation

  • npm test -- src/components/video-editor/timeline/zoomSuggestionUtils.test.ts
  • npx tsc --noEmit
  • npx biome check src/components/video-editor/timeline/zoomSuggestionUtils.ts src/components/video-editor/timeline/zoomSuggestionUtils.test.ts

Summary by CodeRabbit

  • Bug Fixes
    • Improved zoom suggestion accuracy by calculating focus from the average position of all clicks in a cluster.
    • Zoom suggestions now rely on explicit click interactions, preventing cursor dwell or movement from being mistaken for clicks.
    • Removed inaccurate detection of text selection, text-field clicks, and drag interactions.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c5fd49d-c455-4dc7-9190-9dca636471f2

📥 Commits

Reviewing files that changed from the base of the PR and between 60e1862 and 75d49b1.

📒 Files selected for processing (2)
  • src/components/video-editor/timeline/zoomSuggestionUtils.test.ts
  • src/components/video-editor/timeline/zoomSuggestionUtils.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The zoom suggestion pipeline now uses explicit click samples instead of dwell-based interaction detection. Click clusters use the centroid of all clicks for focus. Tests cover centroid calculation and confirm that cursor dwell does not create clicks.

Changes

Explicit Click Zoom Suggestions

Layer / File(s) Summary
Explicit click detection pipeline
src/components/video-editor/timeline/zoomSuggestionUtils.ts, src/components/video-editor/timeline/zoomSuggestionUtils.test.ts
The module removes dwell-based candidates, cursor-type range application, and related exported APIs. buildInteractionZoomSuggestions now creates candidates from explicit click samples.
Centroid-based cluster focus
src/components/video-editor/timeline/zoomSuggestionUtils.ts, src/components/video-editor/timeline/zoomSuggestionUtils.test.ts
Click clusters now use the equal-weighted centroid of all clicks. Tests verify a two-click centroid of (0.5, 0.5) and retain the no-dwell-click assertion.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 75d49

This PR simplifies automatic zoom suggestion generation while preserving the existing editor state and persistence path. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main changes and lists validation commands, but it omits most required template sections, including Motivation, Type of Change, Related Issue(s), Screenshots / Video, and … Add the required template sections. Include the motivation, select the change type, provide related issues or state that none apply, add screenshots or video when applicable, and complete the checklist.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: simplifying automatic zoom click handling.
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.
Full details: Description check

Explanation

The description explains the main changes and lists validation commands, but it omits most required template sections, including Motivation, Type of Change, Related Issue(s), Screenshots / Video, and Checklist.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/formatting-autozoom-cleanup

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.

@webadderall
webadderall merged commit e1103b6 into codex/editor-visual-polish Aug 28, 2026
4 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