Two separate root causes:
1. category-management.e2e.ts: openWorkspaceSection('Live TV') was not
awaited — pickSidebarCategory ran before the route settled on the live
section, so it read VOD categories from the stale sidebar (e.g. 'Action'
instead of a live category). The manage-categories dialog opens for the
live section, so searching for a VOD name found nothing.
Fix: add waitForURL(/\/workspace\/xtreams\/[^/]+\/live/) after both
openWorkspaceSection('Live TV') calls.
2. recent.e2e.ts / favorites.e2e.ts: waitForFirstGridListCardTitle read
the first card's title, but clickGridListCardByTitle then did a fresh
DOM search by that title. Between those two calls the grid could
re-sort/paginate, making the card unfindable.
Fix: new clickFirstGridListCard helper atomically reads the title and
clicks the same card reference, replacing the two-step pattern.
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
The dialog's 'Select All' button appears as soon as isLoading() flips,
but Angular still needs a change-detection cycle to paint the @for loop.
On slower CI runners (especially after a refreshSource cycle) the
.category-item rows were not yet in the DOM when toggleManagedCategory
tried to locate them, causing a spurious 5 s timeout.
Fix: add an explicit `toBeVisible` guard on the first .category-item
inside openManageCategoriesDialog, and raise the per-row timeout in
toggleManagedCategory from 5 s to 15 s.
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
- category-management: replace filter({ has: dialog.locator(...) }) with
filter({ hasText }) on the .category-item row. Playwright cannot scope an
absolute locator (created via dialog.locator()) to each candidate element
when used inside filter({ has: }), so the query always returned empty.
Using hasText on the whole row correctly retries until Angular's @for loop
re-renders filteredCategories() after the search field is populated.
- recent.e2e.ts Xtream test: same pagination fix as favorites — derive
movieTitle and seriesTitle from waitForFirstGridListCardTitle() instead of
pickDistinctTitles(fixture.items)[0], which may be on page 2 of the
date-sorted grid and never visible.
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
- toggleManagedCategory: replace manual count-loop with Playwright filter so
the locator retries internally until Angular re-renders the filtered list
after the search field is populated (previously called .count() before the
@for loop had reacted to the updated searchTerm signal)
- favorites Xtream test: pick movie/series titles from the first displayed
grid card instead of vodFixture.items[0]. The grid sorts by date-desc and
paginates at 25 items; the first API item may land on page 2 making
clickGridListCardByTitle time out with "element not found". Reading the
title from the DOM after navigation ensures we always target a visible card.
- electron-test-fixtures: export waitForFirstGridListCardTitle helper
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
- dragSourceBefore: replace mat-list-item with .playlist-item as the
drag target; playlist-item.component has no mat-list-item element,
the inner container div carries the .playlist-item class
- toggleManagedCategory: match categories by name only instead of
name+itemCount; after an Xtream refresh the itemCounts Map passed to
the dialog may be empty (streams not yet counted), causing a false
mismatch even though the category is present and uniquely named
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
- Fix getVisibleSourceTitles: use .playlist-title selector instead of
.mdc-list-item__primary-text which no longer matches playlist-item component
- Fix category-management test: re-navigate to sources page after
refreshSource since refresh navigates away from sources
- Fix recent.e2e test: remove switchUnifiedCollectionContent calls after
clearRecentItems since the content toggle disappears when all items cleared
- Fix stalker mock server: generate numeric episode IDs ("1","2",...) in
season.series array so toSeriesNumbers() can parse them; previously used
non-numeric IDs like "30000-s1-e1" which parsed to NaN, producing empty
episode arrays and causing playFirstSeriesEpisode to time out
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
Replace menuitem selectors with mat-button-toggle[value] selectors in
all four playlist import helpers (file, url, xtream, stalker) and rename
openAddPlaylistMenu to openAddPlaylistDialog to reflect that clicking
"Add playlist" now opens a dialog directly instead of a dropdown menu.
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
- Implemented tests for tracking recently viewed channels in M3U playlists, ensuring they persist across app restarts.
- Added functionality to manage Xtream and Stalker history, including support for clearing recent items.
- Enhanced settings tests to verify persistence of user preferences across app restarts, including language, video player, and theme settings.
- Created comprehensive tests for managing sources, including filtering, sorting, editing, and deleting M3U, Xtream, and Stalker sources.
- Introduced mock fixtures for Xtream and Stalker categories to facilitate testing.
- Added DatabaseWorkerClient to manage database operations in a worker thread.
- Created database-worker-client.ts to handle requests and responses between the main process and the worker.
- Introduced database-worker.types.ts for type definitions related to worker messages and operations.
- Implemented database.worker.ts to execute various database operations, including CRUD operations for playlists, content, and favorites.
- Added database.worker-connection.ts to manage database connections and ensure proper handling of SQLite instances.
- Created tests for DatabaseWorkerClient to ensure correct request handling and error management.
- Updated xtream.events.ts to allow suppression of error logging for specific requests.
- Enhanced EPG parser worker to include a busy timeout for SQLite operations.
- Integrated shutdown logic for the DatabaseWorkerClient in the main application lifecycle.
- Added `GlobalFavoritesListComponent` to display and manage favorite channels.
- Integrated drag-and-drop functionality for reordering favorite channels.
- Created HTML and SCSS files for the global favorites list layout and styling.
- Implemented logic to handle empty states and search functionality within the favorites list.
feat: Enhance unified collection page with live and grid tabs
- Developed `UnifiedCollectionPageComponent` to manage different content types (live, movies, series).
- Added `UnifiedGridTabComponent` and `UnifiedLiveTabComponent` for displaying content in grid and live formats.
- Implemented loading states and empty states for better user experience.
- Integrated EPG (Electronic Program Guide) functionality for live channels.
style: Refactor styles for unified collection components
- Updated SCSS styles for `UnifiedGridTabComponent` and `UnifiedLiveTabComponent` to improve layout and responsiveness.
- Added skeleton loading states for better visual feedback during data fetching.
fix: Improve scrolling behavior in category view component
- Adjusted scrolling logic in `CategoryViewComponent` to ensure selected categories are centered in the view.
Entire-Checkpoint: 0e4488af6c76
- Implemented tests for importing M3U playlists via native dialog.
- Added smoke tests for loading Xtream and Stalker content through IPC.
- Created tests to verify persistence of remote control settings across app restarts.
- Updated smoke tests to check for main window properties and workspace content rendering.
refactor(electron-backend): enhance store service and database path handling
- Modified store service to use a dynamic configuration directory based on environment.
- Refactored database connection to utilize new path utility functions for better path management.
fix(e2e): improve test selectors and structure for better reliability
- Updated test selectors in web-e2e tests to use role-based queries for better accessibility.
- Refactored settings tests to reduce redundancy and improve clarity.
chore(e2e): update TypeScript configuration for better inclusion of test files
- Adjusted tsconfig.json to ensure proper inclusion of e2e test files.
Entire-Checkpoint: bb9a8e2e351e
Add a new Electron smoke test suite using Playwright to verify the
packaged application starts, renders the main window, and exposes
expected window properties. The tests launch the built Electron main
bundle, locate the primary (non-DevTools) window, wait for DOM load,
and assert the title contains "IPTVnator". They also check window
visibility and bounds, validate rendered body content, and capture
screenshots to dist/test-results/electron-backend-e2e for debugging.
Include helpers to resolve project paths, ensure the screenshot
directory exists, and robustly find the main application window. Set
NODE_ENV and ELECTRON_IS_DEV to ensure the app loads built artifacts.