From bc3358cb078ad80cbcf9711536e0d010c44703ed Mon Sep 17 00:00:00 2001 From: Elijah Date: Fri, 13 Nov 2026 13:41:02 -0700 Subject: [PATCH] Release Kaleido Desktop 1.0.0 Out of beta. Show and season pages: - Season pages list episodes as a grid of cards (still, description, watched state) instead of the episode list and season picker; the season title opens a menu of the show's seasons (replacing the page, so Back returns to the show). - Show pages keep only the Seasons row; single-season shows list their episodes. The up-next line adds the title instead of repeating the episode number. - Season Play/Resume follows the show's on-deck episode, and the season shows the year it aired. Watching: - A title Plex has counted as played stays watched during an unfinished rewatch; leftover positions only show in Continue Watching and on the episode you're up to. Resume buttons use resumable(). - Next/previous episode (autoplay, Up Next, player) start from the top. Browsing: - Rows that haven't been scrolled stay at their start when items are added in front (scroll snapping kept the old first card in place). - Show names on episode cards link to the show; seasons outside their show's page are captioned with the show's name. - Detail facts show the runtime; the Resume button has the time left. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 15 +++ package-lock.json | 4 +- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- src/app/format.ts | 13 ++- src/app/keyboardNav.ts | 4 +- src/player/store.test.ts | 8 ++ src/player/store.ts | 6 +- src/plex/plex.test.ts | 14 ++- src/screens/Item.tsx | 192 ++++++++++++++++---------------------- src/styles/app.css | 18 ++++ src/styles/screens.css | 145 +++++++--------------------- src/ui/media.tsx | 83 +++++++++++++--- 15 files changed, 263 insertions(+), 247 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f811990..ed4b04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.0.0 + +Kaleido is out of beta. This release reworks the show and season pages and smooths out watching a series. + +- Season pages show their episodes as a grid of cards, each with its still, description and watched state, in place of the long episode list. +- Click the season's name under the show's logo to switch to another season. +- Show pages list seasons once, as a row of posters. A show with only one season shows its episodes directly. +- Episodes you've watched stay marked as watched when you rewatch them and stop partway through. The leftover position only shows on the episode you're up to. +- When the next episode plays, whether automatically or with Next, it starts from the beginning instead of near the end of an earlier viewing. +- Click a show's name under a Continue Watching card to go to the show. +- Continue Watching starts at the first title when something new is added, instead of scrolling it off the left edge. +- Season posters outside their show's page, such as New Seasons, are labelled with the show's name. +- Season pages show the year the season aired, and their Play button agrees with the show page about which episode is next. +- Movie and episode pages show the runtime in their details, with the time left on the Resume button. + ## 0.1.0-beta.19 Up Next fixes. diff --git a/package-lock.json b/package-lock.json index c2b9033..ca9602e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kaleido-desktop", - "version": "0.1.0-beta.19", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "kaleido-desktop", - "version": "0.1.0-beta.19", + "version": "1.0.0", "dependencies": { "@fontsource-variable/inter": "^5.3.0", "@tanstack/react-query": "^5.105.0", diff --git a/package.json b/package.json index db9e07a..b7b7f3e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kaleido-desktop", "private": true, - "version": "0.1.0-beta.19", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index c87ca4a..eca151d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2173,7 +2173,7 @@ dependencies = [ [[package]] name = "kaleido" -version = "0.1.0-beta.19" +version = "1.0.0" dependencies = [ "fs2", "futures-util", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0b163b6..0abafd8 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kaleido" -version = "0.1.0-beta.19" +version = "1.0.0" description = "Kaleido — a Plex client for Windows" authors = ["Elijah"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 5286972..6f2152e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Kaleido", - "version": "0.1.0-beta.19", + "version": "1.0.0", "identifier": "tv.kaleido.desktop", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/app/format.ts b/src/app/format.ts index a41b82d..e4a7ba9 100644 --- a/src/app/format.ts +++ b/src/app/format.ts @@ -36,10 +36,19 @@ export function progress(item: Item): number { return Math.min(1, Math.max(0, item.viewOffset / item.duration)); } +/** + * Watched once Plex has counted a full play. A rewatch left partway through keeps the + * title watched; its position only matters for resuming (`resumable`). + */ export function isWatched(item: Item, percent = 90): boolean { if (item.type === 'show' || item.type === 'season') return item.leafCount > 0 && item.viewedLeafCount >= item.leafCount; - if (item.viewOffset > 0 && item.duration > 0) return item.viewCount > 0 && item.viewOffset / item.duration >= percent / 100; - return item.viewCount > 0; + if (item.viewCount > 0) return true; + return item.viewOffset > 0 && item.duration > 0 && item.viewOffset / item.duration >= percent / 100; +} + +/** Has a saved position worth resuming from (not one at the very end). */ +export function resumable(item: Item): boolean { + return item.viewOffset > 0 && item.duration > 0 && item.viewOffset < item.duration * 0.97; } export function remainingEpisodes(item: Item): number { diff --git a/src/app/keyboardNav.ts b/src/app/keyboardNav.ts index 8a77535..4e01527 100644 --- a/src/app/keyboardNav.ts +++ b/src/app/keyboardNav.ts @@ -1,9 +1,9 @@ /** * Arrow-key movement between titles, for keyboard users. Focus moves to the * nearest card in the pressed direction (by on-screen geometry), so it works - * the same across shelves, grids, episode lists and people rows. + * the same across shelves, grids and people rows. */ -const TARGETS = '.card, .person-card:not(:disabled), .episode-row, .shelf-title-link'; +const TARGETS = '.card, .person-card:not(:disabled), .shelf-title-link'; function center(r: DOMRect) { return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; diff --git a/src/player/store.test.ts b/src/player/store.test.ts index 5cfb452..e129b1d 100644 --- a/src/player/store.test.ts +++ b/src/player/store.test.ts @@ -102,6 +102,14 @@ describe('Up Next playback lifecycle', () => { expect(next).toHaveBeenCalledOnce(); usePlayer.setState({ playNext: original }); }); + it('starts the next episode from the beginning, ignoring an earlier partial viewing', async () => { + const original = usePlayer.getState().play; + const spy = vi.fn().mockResolvedValue(undefined); + usePlayer.setState({ play: spy, nextUp: { ...episode('2'), viewOffset: 88000 } }); + await usePlayer.getState().playNext(); + expect(spy).toHaveBeenCalledWith(expect.objectContaining({ id: '2' }), expect.objectContaining({ resume: false })); + usePlayer.setState({ play: original }); + }); it('cancels autoplay while keeping the screen open, including across EOF', () => { time(81); usePlayer.getState().cancelCountdown(); diff --git a/src/player/store.ts b/src/player/store.ts index 40a18a6..bbdd4d8 100644 --- a/src/player/store.ts +++ b/src/player/store.ts @@ -1019,13 +1019,15 @@ export const usePlayer = create((set, get) => ({ const st = get(); stopCountdown(); if (!st.nextUp) return; - await st.play(st.nextUp, { resume: true, quality: st.quality }); + // Watching on through a season starts each episode from the top, never at a + // stale position left by an earlier, unfinished viewing. + await st.play(st.nextUp, { resume: false, quality: st.quality }); }, async playPrevious() { const st = get(); if (!st.prevUp) return; - await st.play(st.prevUp, { resume: true, quality: st.quality }); + await st.play(st.prevUp, { resume: false, quality: st.quality }); }, cancelCountdown() { diff --git a/src/plex/plex.test.ts b/src/plex/plex.test.ts index 8be9e2e..fdd06ff 100644 --- a/src/plex/plex.test.ts +++ b/src/plex/plex.test.ts @@ -3,7 +3,7 @@ import { parseItem, parseScores } from './parse'; import { isLocalAddress } from './account'; import { partAt } from './playback'; import { headerSafe } from './client'; -import { duration, formatBadges, isWatched, remaining, washGradient } from '../app/format'; +import { duration, formatBadges, isWatched, remaining, resumable, washGradient } from '../app/format'; import { buildFeatures } from '../screens/discover'; import type { Hub } from './types'; @@ -65,10 +65,16 @@ describe('parsing', () => { }); describe('watched rules', () => { - it('treats a resumed title as watched only past the threshold', () => { - expect(isWatched(movie({ viewCount: 1, viewOffset: 3000000 }), 90)).toBe(false); - expect(isWatched(movie({ viewCount: 1, viewOffset: 5700000 }), 90)).toBe(true); + it('keeps a title watched while it is being rewatched', () => { + expect(isWatched(movie({ viewCount: 1, viewOffset: 3000000 }), 90)).toBe(true); expect(isWatched(movie({ viewCount: 1 }), 90)).toBe(true); + expect(resumable(movie({ viewCount: 1, viewOffset: 3000000 }))).toBe(true); + }); + + it('counts an unplayed title as watched only past the threshold', () => { + expect(isWatched(movie({ viewOffset: 3000000 }), 90)).toBe(false); + expect(isWatched(movie({ viewOffset: 5700000 }), 90)).toBe(true); + expect(isWatched(movie({}), 90)).toBe(false); }); it('uses episode counts for shows', () => { diff --git a/src/screens/Item.tsx b/src/screens/Item.tsx index ebaf887..dba8e82 100644 --- a/src/screens/Item.tsx +++ b/src/screens/Item.tsx @@ -4,12 +4,12 @@ import type { Item } from '../plex/types'; import { PROGRESS, useChildren, useItem, useRelated, useServerQuery } from '../app/queries'; import { useServer } from '../app/session'; import { useSettings } from '../app/settings'; -import { goBack, navigate, useRouter } from '../app/router'; -import { canManage, itemMenu, openDialog, openItem, playItem, playWithVersion, setWatched, shuffleItem } from '../app/actions'; -import { bitrate, channelLabel, date, duration, episodeLabel, extraLabel, fileSize, isWatched, remaining, resolutionLabel, technicalLine } from '../app/format'; +import { goBack, navigate } from '../app/router'; +import { canManage, itemMenu, openDialog, playItem, playWithVersion, setWatched, shuffleItem } from '../app/actions'; +import { bitrate, channelLabel, date, duration, episodeLabel, extraLabel, fileSize, isWatched, remaining, remainingEpisodes, resolutionLabel, resumable, technicalLine } from '../app/format'; import { Backdrop } from '../ui/Backdrop'; -import { Facts, HubShelf, LandscapeCard, PersonCard, PosterCard, Shelf, TitleArt } from '../ui/media'; -import { Artwork, Button, EmptyState, ErrorState, IconButton, PageLoader, Select } from '../ui/primitives'; +import { EpisodeCard, Facts, HubShelf, LandscapeCard, PersonCard, PosterCard, Shelf, TitleArt } from '../ui/media'; +import { Artwork, Button, EmptyState, ErrorState, IconButton, PageLoader } from '../ui/primitives'; import { Icon } from '../ui/Icon'; import { openMenu } from '../ui/overlays'; import { useDownloads } from '../downloads/store'; @@ -255,11 +255,12 @@ function AboutPanel({ item }: { item: Item }) { // —— Movie —————————————————————————————————————————————————————————— function MovieDetail({ item }: { item: Item }) { - const resume = item.viewOffset > 0 && !isWatched(item); + const resume = resumable(item); return (
- + {/* The Resume button carries the time left; the facts give the runtime. */} +
- {p > 0 && !watched && ( - - - - )} -
-
-

- {ep.title} - {watched && } -

-
- {[duration(ep.duration), ep.originallyAvailableAt ? date(ep.originallyAvailableAt) : '', ep.viewOffset && !watched ? remaining(ep) : ''].filter(Boolean).join(' · ')} -
- {ep.summary &&

{ep.summary}

} -
- +
+ {episodes.map((ep) => ( + + ))}
); } -function Episodes({ seasons, initialSeason, showPicker = true }: { seasons: Item[]; initialSeason?: string; showPicker?: boolean }) { - const saved = useRouter((s) => s.current.state.season as string | undefined); - const [seasonId, setSeasonId] = useState(saved ?? initialSeason ?? seasons[0]?.id); - useEffect(() => { - if (!seasonId && seasons[0]) setSeasonId(initialSeason ?? seasons[0].id); - }, [seasons, initialSeason]); - const episodes = useChildren(seasonId); - const season = seasons.find((s) => s.id === seasonId); - if (!seasons.length) return null; +function EpisodesSection({ episodes, subtitle, upNextId }: { episodes: Item[] | undefined; subtitle?: string; upNextId?: string }) { return (
-
-

Episodes

- {showPicker && seasons.length > 1 && ( -