-
Notifications
You must be signed in to change notification settings - Fork 1k
Refine auto-zoom segment generation and cursor stability #1106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@richiemcilroy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 0 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughAdds movement-aware zoom segment generation using clicks and cursor moves, exposes a public generator, stabilizes short-lived cursor shapes via a debounce and pointer-ID detection in metadata loading, and updates the editor to enlarge the cursor when zoom segments are produced. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as Editor UI
participant API as Tauri Recording API
participant Meta as Project Recordings Meta
participant ZG as ZoomGen
User->>UI: Click "Generate Zoom Segments"
UI->>API: request generateZoomSegments(recordingId)
API->>Meta: load recording metadata (pointer IDs, cursor events)
Meta->>Meta: compute pointer_cursor_ids()
Meta->>Meta: stabilize_short_lived_cursor_shapes(...)
API->>ZG: generate_zoom_segments_from_clicks(recording, recordingsMeta)
ZG->>ZG: collect clicks + moves → per-cursor windows → intervals
ZG->>ZG: merge/filter intervals → ZoomSegments[]
ZG-->>API: ZoomSegments[]
API-->>UI: ZoomSegments[]
UI->>UI: if non-empty → set cursor size = 200
sequenceDiagram
autonumber
participant Meta as StudioRecordingMeta
participant CS as CursorEvents
note over Meta,CS: Stabilize short-lived cursor shapes at load time
Meta->>Meta: pointer_cursor_ids()
Meta->>CS: stabilize_short_lived_cursor_shapes(pointerIDs, SHORT_CURSOR_SHAPE_DEBOUNCE_MS)
CS->>CS: group events by cursor_id, measure durations
CS->>CS: reassign short-lived shapes to stable IDs
CS-->>Meta: stabilized cursor events
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/desktop/src-tauri/src/recording.rs(5 hunks)apps/desktop/src/routes/editor/Timeline/ZoomTrack.tsx(1 hunks)crates/project/src/cursor.rs(3 hunks)crates/project/src/meta.rs(4 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
crates/**/src/**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
For desktop IPC, use tauri_specta derive/macros on Rust types/events; do not hand-roll bindings
Files:
crates/project/src/meta.rscrates/project/src/cursor.rs
**/*.{ts,tsx,js,jsx,rs}
📄 CodeRabbit inference engine (CLAUDE.md)
Do not add inline, block, or docstring comments in any language; code must be self-explanatory
Files:
crates/project/src/meta.rscrates/project/src/cursor.rsapps/desktop/src/routes/editor/Timeline/ZoomTrack.tsxapps/desktop/src-tauri/src/recording.rs
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.rs: Format Rust code usingrustfmtand ensure all Rust code passes workspace-level clippy lints.
Rust modules should be named with snake_case, and crate directories should be in kebab-case.
Files:
crates/project/src/meta.rscrates/project/src/cursor.rsapps/desktop/src-tauri/src/recording.rs
crates/*/src/**/*
📄 CodeRabbit inference engine (AGENTS.md)
Rust crates should place tests within the
src/and/or a siblingtests/directory for each crate insidecrates/*.
Files:
crates/project/src/meta.rscrates/project/src/cursor.rs
apps/desktop/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/desktop/**/*.{ts,tsx}: Do not manually import icons in the desktop app; rely on auto-imported icons
In the desktop app, use @tanstack/solid-query for server state management
Files:
apps/desktop/src/routes/editor/Timeline/ZoomTrack.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use strict TypeScript and avoid any; leverage shared types from packages
**/*.{ts,tsx}: Use a 2-space indent for TypeScript code.
Use Biome for formatting and linting TypeScript/JavaScript files by runningpnpm format.
Files:
apps/desktop/src/routes/editor/Timeline/ZoomTrack.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Use kebab-case for filenames for TypeScript/JavaScript modules (e.g.,user-menu.tsx).
Use PascalCase for React/Solid components.
Files:
apps/desktop/src/routes/editor/Timeline/ZoomTrack.tsx
🧬 Code graph analysis (3)
crates/project/src/meta.rs (2)
apps/desktop/src/utils/tauri.ts (6)
CaptionsData(352-352)ProjectConfiguration(419-419)XY(465-465)StudioRecordingMeta(448-448)MultipleSegments(404-404)Cursors(366-366)crates/project/src/cursor.rs (2)
load_from_file(60-63)load_from_file(73-76)
crates/project/src/cursor.rs (1)
crates/rendering/src/lib.rs (6)
new(63-133)new(307-344)new(623-968)new(984-989)new(1036-1046)new(1265-1295)
apps/desktop/src-tauri/src/recording.rs (2)
crates/project/src/cursor.rs (5)
moves(213-217)load_from_file(60-63)load_from_file(73-76)click_event(296-304)move_event(286-294)crates/rendering/src/project_recordings.rs (3)
Some(197-204)duration(178-180)duration(196-207)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Vercel Agent Review
- GitHub Check: Build Desktop (x86_64-pc-windows-msvc, windows-latest)
- GitHub Check: Analyze (rust)
Cursor hovering before:
Cursor.Before.mp4
Cursor hovering after:
Cursor.After.mp4
Summary by CodeRabbit
New Features
Improvements
Bug Fixes