feat(editor): clamp timeline scroll bounds - #59
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review pass (Claude Code) — stacked on #58. Clean, well-structured. The pure Flags: (1) soft overlap with #46, which also clamps |
|
Codex review pass — found + fixed 2 real bugs in the scroll-bound math I'd missed:
|
_editorMaxScrollXPure returned duration + tail - viewport unconditionally, so a song that already fits (e.g. 6s song, 7s viewport, 2s tail) still exposed 1s of scroll room that could hide the beginning behind a blank tail. Only extend the scroll range once the content runs past the viewport (duration > viewport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The max scroll derives from canvas width, but resizeCanvas() redrew with the old S.scrollX — widening the editor could leave the timeline past the new max with blank tail. Apply the scroll bounds before drawing on resize. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3ca2420 to
bf78154
Compare
15d607c to
ee4b88d
Compare
Summary
Testing