feat(queue): switchable queue display mode (Queue vs Playlist) (#922)

* feat(queue): add queueDisplayMode setting with rehydrate (default queue)

* feat(queue): render upcoming-only or full timeline by mode, with header toggle

* feat(settings): add queue display mode toggle to Personalisation

* i18n: queue display mode strings across all locales

* test(queue): display-mode rendering and absolute index mapping

* docs: changelog + credits for queue display mode (#922)
This commit is contained in:
Frank Stellmacher
2026-05-30 00:26:07 +02:00
committed by GitHub
parent 7b06be5ba2
commit 1de2b0e850
30 changed files with 342 additions and 32 deletions
+11
View File
@@ -17,6 +17,7 @@ import type {
DiscordCoverSource,
DurationMode,
LyricsSourceConfig,
QueueDisplayMode,
SeekbarStyle,
} from './authStoreTypes';
@@ -103,6 +104,15 @@ export function computeAuthStoreRehydration(state: AuthState): Partial<AuthState
? {}
: { queueDurationDisplayMode: 'total' as DurationMode };
// Missing key (pre-feature persist) / garbage maps to 'queue' — the default
// mode, which lists only upcoming tracks.
const VALID_QUEUE_DISPLAY_MODES = new Set<string>(['playlist', 'queue']);
const queueDisplayModeMigrated = VALID_QUEUE_DISPLAY_MODES.has(
(state as { queueDisplayMode?: unknown }).queueDisplayMode as string,
)
? {}
: { queueDisplayMode: 'queue' as QueueDisplayMode };
const VALID_WAYLAND_TEXT_PROFILE = new Set<string>(['balanced', 'sharp', 'gpu', 'minimal']);
const rawWaylandProfile = (state as { linuxWaylandTextRenderProfile?: unknown }).linuxWaylandTextRenderProfile;
const linuxWaylandTextRenderProfileMigrated = VALID_WAYLAND_TEXT_PROFILE.has(rawWaylandProfile as string)
@@ -162,6 +172,7 @@ export function computeAuthStoreRehydration(state: AuthState): Partial<AuthState
...wheelSmoothOneTime,
...seekbarStyleMigrated,
...queueDurationDisplayModeMigrated,
...queueDisplayModeMigrated,
...linuxWaylandTextRenderProfileMigrated,
...discordCoverSourceMigrated,
};