Skip to content

feat(AppShell): unify Recently Played across catalog and local files - #2004

Merged
alexwarren merged 1 commit into
mainfrom
appshell-unify-recently-played
Aug 8, 2026
Merged

feat(AppShell): unify Recently Played across catalog and local files#2004
alexwarren merged 1 commit into
mainfrom
appshell-unify-recently-played

Conversation

@alexwarren

Copy link
Copy Markdown
Contributor

Summary

  • Merges recency tracking for textadventures.co.uk catalog plays (previously untracked entirely) with Electron's existing local-file recents into one "Recently played" card grid on the main Play page.
  • Removes the /play/local route. Electron's manual "Open a game file…" 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. The file-association redirect targets in +layout.svelte and ElectronApp/src/main.ts now point at root instead — this reverts the routing split introduced in an earlier commit.
  • Extracts the Electron play-launch logic into lib/filesystem/local-play.ts so the toolbar button, a Recently Played replay, and the file-association effect share one implementation instead of duplicating the BroadcastChannel handoff.
  • Local-file recent cards (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) and npm run lint (eslint) both pass in src/AppShell
  • tsc -p tsconfig.json passes in src/ElectronApp
  • Browser build verified live against dev servers: catalog play records to localStorage, renders in Recently Played, links straight to the player; local-file picker (pick → Start) still boots a game; remove works
  • Electron build verified live via Playwright (tests/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-file landing on root auto-launches the player
  • Visually confirmed (screenshot) that local-file and catalog cards now render with matching shapes in the same grid

🤖 Generated with Claude Code

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>
@alexwarren
alexwarren merged commit 5e5b2c3 into main Aug 8, 2026
7 checks passed
@alexwarren
alexwarren deleted the appshell-unify-recently-played branch August 8, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant