feat(AppShell): unify Recently Played across catalog and local files - #2004
Merged
Conversation
The Play tab had no recency tracking for textadventures.co.uk catalog games (only local Electron files had one), and the local-file picker lived on its own /play/local page whose two-pane layout was mostly just a lone button — pointless on the browser build, and redundant with the toolbar on Electron. - Catalog plays are now tracked client-side (recent-catalog-plays.ts) and merged with Electron's existing local-file recents into one "Recently played" section on the main Play page, rendered as one card grid (RecentGameCard / LocalFileRecentCard). - /play/local is gone entirely: Electron's manual open and the ?action=play-file file-association deep link, and the browser's two-step pick-then-Start flow, all now live inline in PlayCatalog.svelte. This reverts the routing decision from an earlier commit that had split the file-association handler out to its own page. - Extracted the Electron play-launch logic into local-play.ts so the toolbar button, Recently Played replays, and the file-association effect share one implementation instead of duplicating it. - Local-file recent cards match the catalog cards' shape (icon placeholder instead of a thumbnail) rather than sitting in a separate list of rows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
/play/localroute. Electron's manual "Open a game file…" and the?action=play-filefile-association deep link, and the browser's two-step pick-then-Start flow, all now live inline inPlayCatalog.svelte. The file-association redirect targets in+layout.svelteandElectronApp/src/main.tsnow point at root instead — this reverts the routing split introduced in an earlier commit.lib/filesystem/local-play.tsso the toolbar button, a Recently Played replay, and the file-association effect share one implementation instead of duplicating theBroadcastChannelhandoff.LocalFileRecentCard.svelte) now match catalog cards' shape (icon placeholder instead of a thumbnail) rather than sitting in a separate list of rows, and a copy line that only ever rendered for Electron users describing browser-only limitations was removed.Test plan
npm run check(svelte-check) andnpm run lint(eslint) both pass insrc/AppShelltsc -p tsconfig.jsonpasses insrc/ElectronApplocalStorage, renders in Recently Played, links straight to the player; local-file picker (pick → Start) still boots a game; remove workstests/e2e/verify-electron-play-local-file.mjs, extended with new file-association coverage): single-click open with no navigation away from the Play tab, catalog play opens a separate window, sibling-resource loading and idle-state reset still work, and?action=play-filelanding on root auto-launches the player🤖 Generated with Claude Code