Skip to content

Keyframe graphs and markers#34

Open
PlkMarudny wants to merge 3 commits into
ronak-create:mainfrom
PlkMarudny:keyframe-graphs
Open

Keyframe graphs and markers#34
PlkMarudny wants to merge 3 commits into
ronak-create:mainfrom
PlkMarudny:keyframe-graphs

Conversation

@PlkMarudny

@PlkMarudny PlkMarudny commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

image

Visualizes keyframes. Keframes are displayed on a clip itself (with a counter if more than one effects is keyed at certain time point), and/or, when a property label is clicked, as a small overlay with a graph that is also clickable. Ctrl+⇒/⇐ jumps between keyframes.

Type of change

  • Bug fix
  • New feature (UI)
  • Docs
  • Refactor / internal

How was it verified?

  • node --check server.js && node --check app.js && node --check mcp-server.js passes
  • Opened the editor and confirmed the change in preview
  • Confirmed the change in an export (fast or realtime), if it affects rendering
  • Updated CLAUDE.md / README.md if the schema, props, or API changed

Checklist

  • No new runtime dependencies added
  • Preview and export render identically (single compositor)
  • Commits are focused and messages are descriptive

Summary by CodeRabbit

  • New Features
    • Added keyframe markers to timeline clips, including multi-channel indicators and navigation support.
    • Added keyframe graphs in the inspector for visualizing animated property values.
    • Added click-to-seek support within keyframe graphs.
    • Added Ctrl/Cmd + Left/Right shortcuts to jump between keyframes.
  • Documentation
    • Updated the Features section to describe keyframe markers and graphs.

= added 3 commits July 19, 2026 11:15
Keyframes are drawn over the clip, Ctrl+Left/Right Arrow moves the playhead to the nearest keyframe.
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds clip keyframe diamonds, direct and keyboard keyframe navigation, and inspector keyframe graphs with interpolated curves and click-to-seek interaction. Updates monitor markup, styling, shortcut help, and Motion documentation.

Changes

Keyframe visualization and navigation

Layer / File(s) Summary
Timeline markers and navigation
app.js, style.css, index.html, README.md
Clip keyframes render as grouped diamond markers with channel counts, support direct seeking, and can be navigated with Ctrl/Cmd plus the arrow keys.
Inspector keyframe graphs
app.js, style.css, index.html
Inspector properties toggle graph cards that draw interpolated curves, keyframe diamonds, and the playhead, with pointer-based seeking and per-frame refresh.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: xusnitdinov

Sequence Diagram(s)

sequenceDiagram
  participant Inspector
  participant state
  participant KeyframeGraphs
  participant Timeline
  Inspector->>state: Toggle property graph
  state->>KeyframeGraphs: Render graph card
  KeyframeGraphs->>KeyframeGraphs: Draw curve and keyframes
  KeyframeGraphs->>Timeline: Seek from pointer position
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding keyframe graphs and clip markers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
app.js (1)

2005-2012: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Property-label graph toggles are mouse-only (keyboard users can't open graphs).

propLabel renders an interactive <label class="kf-graph-toggle"> whose only activation path is a click handler (Line 2242). A bare <label> is not focusable or operable via keyboard, so keyboard-only users have no way to open/close the keyframe graphs. Consider making it a real control (e.g. role="button" + tabindex="0" with a keydown handler, or a <button>).

♿ Proposed change
-    return `<label class="kf-graph-toggle${on}${has}" data-kfgraph="${k}" title="Show / hide keyframe graph">${label}</label>`;
+    return `<label class="kf-graph-toggle${on}${has}" data-kfgraph="${k}" role="button" tabindex="0" aria-pressed="${state.kfGraphs.has(k)}" title="Show / hide keyframe graph">${label}</label>`;

And handle keyboard activation alongside the existing click handler:

   els.inspector.querySelectorAll("[data-kfgraph]").forEach((lab) => {
     lab.addEventListener("click", (e) => {
       e.preventDefault();
       toggleKfGraph(lab.dataset.kfgraph);
     });
+    lab.addEventListener("keydown", (e) => {
+      if (e.key === "Enter" || e.key === " ") {
+        e.preventDefault();
+        toggleKfGraph(lab.dataset.kfgraph);
+      }
+    });
   });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app.js` around lines 2005 - 2012, Make the interactive keyframe graph label
generated by propLabel keyboard-accessible by giving it button semantics and
keyboard focusability, then extend the existing graph-toggle handler near the
click listener to activate on Enter and Space while preserving click behavior.
Ensure keyboard activation invokes the same graph show/hide logic and prevents
default scrolling where appropriate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app.js`:
- Around line 2005-2012: Make the interactive keyframe graph label generated by
propLabel keyboard-accessible by giving it button semantics and keyboard
focusability, then extend the existing graph-toggle handler near the click
listener to activate on Enter and Space while preserving click behavior. Ensure
keyboard activation invokes the same graph show/hide logic and prevents default
scrolling where appropriate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7cb97d8-b582-494c-8cce-d6f513cc0fab

📥 Commits

Reviewing files that changed from the base of the PR and between d0780a5 and f1f1d50.

📒 Files selected for processing (4)
  • README.md
  • app.js
  • index.html
  • style.css

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