Add sleep timer to player bar#1671
Merged
jeffvli merged 8 commits intojeffvli:developmentfrom Feb 11, 2026
Merged
Conversation
- Add sleep timer button in player bar right controls - Preset options: End of song, 5/10/15/30/45 min, 1 hr, 2 hrs - Custom timer with HH:MM:SS input fields - Timer only counts down while music is playing - Timer pauses playback when it expires - End-of-song mode pauses at the next track change - Uses theme-aware styling (--theme-colors-surface) - Add sleepTimer/sleepTimerOff icons (LuTimer/LuTimerOff) - Add i18n strings for sleep timer UI
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a “Sleep Timer” feature to the player controls so users can pause playback after a preset/custom duration or after the current song.
Changes:
- Added a
SleepTimerButtonpopover UI to configure/cancel a sleep timer. - Introduced a Zustand store to track sleep timer mode/state/remaining time.
- Extended the icon set and English translations to support the new UI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/components/icon/icon.tsx | Adds sleepTimer / sleepTimerOff icons to the app icon registry. |
| src/renderer/store/sleep-timer.store.ts | New Zustand store for sleep timer state + selectors/actions. |
| src/renderer/features/player/components/sleep-timer-button.tsx | New UI + timer logic (timed countdown + end-of-song behavior). |
| src/renderer/features/player/components/right-controls.tsx | Integrates the sleep timer button into the player right controls. |
| src/i18n/locales/en.json | Adds new player.sleepTimer* translation keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Thanks! Overall looks good. I made a couple changes:
|
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.
This pull request introduces a new sleep timer feature for the player, allowing users to set the player to pause playback after a specified time or at the end of the current song. The changes include a new UI button, state management logic, and updated translations to support the feature.
Sleep Timer Feature:
SleepTimerButtoncomponent to the player controls, providing a popover interface for users to set, customize, or cancel a sleep timer. The timer can be set for preset durations, a custom time, or to pause at the end of the current song. (src/renderer/features/player/components/sleep-timer-button.tsx)sleep-timer.store.tsfor managing sleep timer state, including actions for starting, canceling, and updating the timer, as well as selectors for accessing timer status and mode. (src/renderer/store/sleep-timer.store.ts)SleepTimerButtoninto the player’s right controls by updating the imports and component layout. (src/renderer/features/player/components/right-controls.tsx)UI and Icon Enhancements:
sleepTimer,sleepTimerOff) to the app icon set, usingLuTimerandLuTimerOfffrom the icon library. (src/shared/components/icon/icon.tsx)Resolves #95, resolves #753