Feat: prev next buttons when watching videos#161
Draft
giou wants to merge 14 commits into
Draft
Conversation
The Compress option was only shown for Clip and Highlight types. Added Lowlight to the condition so the dropdown menu matches the other content types (Copy, Rename, Open File Location, Compress, Delete).
Both buttons were only shown for Clip/Highlight/Buffer types. Added Lowlight to match the full dropdown (Upload with yellow text, Copy, Rename, Open File Location, Compress, Delete).
Adds Previous and Next buttons to the video player controls in Full Sessions, Clips, Highlights, and Lowlights. The buttons sit inside the existing join control box, flanking the -5s / Play-Pause / +5s cluster on the left and right. - Navigation iterates videos of the same type, ordered newest-first to match the ContentPage default - Buttons disable at the ends of the list - PageUp / PageDown keyboard shortcuts mirror the button behaviour - aria-labels added for accessibility - Bonus: adds aria-labels to the existing -5s/Play/Pause/+5s buttons
The window keydown handler captured currentVideoIndex via closure and was re-attached whenever hasPrevious/hasNext changed. In practice the captured index could go stale on the very next video switch, so the shortcut only worked once for each direction before becoming a no-op. The on-screen buttons (which call setSelectedVideo via the same component) were fine. Resolve by routing the shortcut through a navRef that always holds the latest sameTypeVideos and currentVideoIndex, so the handler (registered once on mount) reads fresh state on every keystroke. Also add e.repeat guards so holding PageDown doesn't mash the queue.
Adds 'Lowlight' to the video.type check that gates the Upload and Copy buttons in the video player toolbar, so lowlights behave the same as highlights and clips.
- menu.tsx: respect the sidebar visibility toggle for Lowlights like the other items, while still gating the menu by enableLowlights. Splits the old behaviour into 'item.visible && settings.enableLowlights', so users who turn the feature off get the item hidden in any state, and users who leave it on get the standard sidebar toggle behaviour plus the default placement (above Settings). - LowlightsSection.tsx: drop the inner 'box inside a box' wrapper so the section layout matches HighlightsSection exactly.
added 2 commits
June 12, 2026 23:00
The previous/next buttons (and PageUp/PageDown shortcuts) iterated over videos of the same type ordered newest-first. That ignored whatever filter (game checkboxes) or sort the user had selected on the content page, so a Next click while sorted by Size jumped to a date-adjacent video instead of the next heaviest one. Pull the filter+sort pipeline out of ContentPage into a shared SectionView helper (filterAndSortContent + per-section localStorage readers + ContentType -> sectionId map). ContentPage and video.tsx now share the exact same iterator, so prev/next walks the visible content list in the same order/cut the user sees on the page. If a filter excludes the currently-playing video, prev/next are disabled at the boundaries — surfacing the filter gap is better than silently jumping to an unrelated neighbour. Also tidy ContentPage to drop its duplicated ordering code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works with PGDN/PGUP too.