Repository navigation
feat(editor): support keyboard shortcuts for timeline start/end navigation (fixes #2120) - #2978
shuoYun114 wants to merge 4 commits into
Conversation
… and focus guards
…udge, and slider a11y
…, and comment cleanup
|
Someone is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
@greptileai review |
| it("normalizes navigation and boundary keys without modifiers", () => { | ||
| expect(normalizeCombo(createKeyboardEvent("ArrowUp"))).toBe("ArrowUp"); | ||
| expect(normalizeCombo(createKeyboardEvent("ArrowDown"))).toBe("ArrowDown"); | ||
| expect(normalizeCombo(createKeyboardEvent("Home"))).toBe("Home"); | ||
| expect(normalizeCombo(createKeyboardEvent("End"))).toBe("End"); | ||
| expect(normalizeCombo(createKeyboardEvent("Space"))).toBe("Space"); |
There was a problem hiding this comment.
Shortcut behavior goes untested
These tests only check normalizeCombo; they never dispatch a key through useEditorShortcuts or exercise the new handlers in PlayerContent. They would still pass if the boundary bindings were removed or the handoff and overlay guards broke. Add event-level tests for boundary seeking, pending handoff, and selected-overlay nudging.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/routes/editor/use-editor-shortcuts.test.ts
Line: 23-28
Comment:
**Shortcut behavior goes untested**
These tests only check `normalizeCombo`; they never dispatch a key through `useEditorShortcuts` or exercise the new handlers in `PlayerContent`. They would still pass if the boundary bindings were removed or the handoff and overlay guards broke. Add event-level tests for boundary seeking, pending handoff, and selected-overlay nudging.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Thanks @shuoYun114 for coming back to this and working through the earlier feedback! Unfortunately the desktop changes here are in |
Summary
This PR implements keyboard shortcuts for navigating to the beginning and end of the timeline (fixes #2120, supersedes closed #2292).
Keyboard Navigation Mapping
ArrowUporHomeArrowDownorEndArrowLeft/ArrowRight(preserved)Mod+=andMod+Shift+=(supported on all keyboard layouts)Mod+-Quality & Review Safeguards
All feedback items from previous maintainer notes and Greptile reviews have been fully addressed:
requestHandoffPlaybackwhen playback handoff is pending, ensuring synchronization with native transport.TimelineRail.// @vitest-environment jsdomand expanded unit tests with 0 test-logic drift.@greptileai review
The PR appears safe to merge, with a non-blocking gap in desktop shortcut tests.
Findings
Fix with agent prompt
Summary
Adds keyboard shortcuts for timeline boundaries on desktop and web.
Reviews (1) · Last reviewed commit: "fix(editor): address greptile review on ..." · Reviewed by Greptile