* feat(ui): add custom title bar window controls for Windows and Linux
Hide the native title bar on win32/linux (titleBarStyle: 'hidden', frame
untouched so native resize borders and snapping keep working) and render
minimize / maximize-restore / close buttons in the renderer, mirroring the
existing macOS traffic-light setup.
- New WINDOW:* IPC contract (minimize, toggle-maximize, close, get-state)
handled in window.events.ts, resolved from the sender WebContents;
close goes through win.close() so window-bounds persistence still runs.
- WINDOW:STATE_CHANGED pushed on maximize/unmaximize/fullscreen so the
maximize/restore glyph stays correct for OS-triggered changes; controls
hide while fullscreen.
- WindowControlsComponent mounts once in app-root as a manual popover so
it stays in the browser top layer above CDK overlays (dialogs,
multi-EPG) - same behavior as macOS traffic lights.
- Theme-aware via CSS vars (--app-on-surface, --app-hover-overlay);
Windows-red close hover. Drag regions get right padding through a
body-level frameless-platform class.
- Gated by RuntimeCapabilitiesService.usesCustomWindowControls; PWA and
macOS never mount the controls.
Includes unit specs for the component and IPC handlers, an Electron E2E
suite (window-controls.e2e.ts), and a window-chrome section in
docs/architecture/workspace-shell.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(linux): upgrade Electron to 41 for frameless window decorations on Wayland
With the native title bar hidden, Linux windows lost the WM-drawn shadow
and rounded corners. Electron draws client-side decorations only on
native Wayland, and frameless-window CSD (GTK drop shadow + extended
resize boundaries) landed in Electron 41 - before that, frameless
windows render as plain rectangles.
- electron ^39.8.5 -> ^41.7.2 (Wayland auto-detected since 38.2; X11
sessions remain undecorated, matching other frameless Electron apps;
Windows keeps its DWM shadow and rounded corners).
- better-sqlite3 pinned to exactly 12.9.0: the last release shipping
prebuilt binaries for both Node 20 (ABI 115, Jest) and Electron 41
(ABI 145, runtime). 12.10.0 dropped the Node 20 prebuilds, forcing a
from-source build that fails without a C++ toolchain.
- pnpm override node-abi 3.85.0 -> 3.92.0 so electron-builder
install-app-deps can map Electron 41 to ABI 145.
Reviewed Electron 40/41 breaking changes: only the renderer clipboard
deprecation, which this app does not use.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(e2e): address review feedback and window-managerless Linux CI
- Skip the three window-manager-dependent E2E assertions (maximize
toggle, main-process state sync, minimize) on Linux CI: GitHub's
ubuntu runners drive Electron under xvfb without a window manager, so
maximize/minimize state never materializes there. Windows CI and
local Linux/macOS runs keep the coverage.
- WINDOW:TOGGLE_MAXIMIZE now returns the requested state instead of
re-reading isMaximized() right after the call, which races on Linux
window managers where maximize()/unmaximize() complete
asynchronously; the WINDOW:STATE_CHANGED push stays authoritative.
- Skip attaching window-state push listeners on macOS, where the
custom controls never mount and the IPC traffic had no subscriber.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(ui): gate custom window controls on the full bridge surface
Include getWindowState and onWindowStateChange in the
usesCustomWindowControls capability check — the controls rely on both
for initial state and for keeping the maximize/restore glyph in sync
with OS-triggered changes, so a partial bridge should not mount them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Two Electron E2E regressions from this branch's redesigns:
1. Hiding the playlist switcher on /settings (a playlist-scoped control)
also hid the global "Add playlist" button, which lives in the same
header-actions block. A user configuring Settings before importing
their first source had no way to add a playlist — and the settings /
playlist-switcher E2E suites, which add a portal right after saving a
setting, timed out waiting for the button. The Add Playlist button is
a global action, so it now stays visible on Settings; only the
per-playlist context shortcut and bulk actions are hidden there.
2. dashboard-activation.e2e.ts asserted on `dashboard-global-favorites-
rail`, the mixed Favorites rail removed earlier in this branch. The
test now targets the v0.22 rails: live favorites resolve through the
favorites-first `dashboard-live-recent-rail`, and the played movie /
series resolve through `dashboard-continue-watching-rail` (renamed
from `dashboard-recently-watched-rail`). The movie-from-favorites
assertion was dropped — that dashboard surface no longer exists; the
favorites collection still has its own page-level coverage.
Verified locally: dashboard-activation, settings, and playlist-switcher
E2E specs all pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The redesign rollup in this branch replaced the Add Playlist dialog's
2-level type × subtype tabs with a single flat 5-card radiogroup, and
replaced the Settings theme list with a compact segmented control whose
options are just "Light"/"Dark"/"System" (no "theme" suffix). E2E tests
that pinned to the old roles/labels failed in CI:
- basic / xtream / stalker / self-hosted: getByRole('tab', ...) on
"Add via file upload" / "Xtream" / "Stalker" — there are no tabs in
the new dialog. Switched to getByRole('radio', { name: /M3U file/i })
and friends, matched against the new radio labels.
- settings: getByRole('radio', { name: 'System theme' }) — the new
picker uses just "System". Scoped to the [data-test-id="select-theme"]
radiogroup so it doesn't collide with the identically-labelled
cover-size options below.
The Electron `clickDialogSegmentedOption` helper grew a radio-role lookup
as its primary path and keeps the old tab/button/legacy-selector
fallbacks so a future redesign won't break every fixture again. The
"M3U" parent category becomes a no-op (the new picker has no standalone
M3U tile — callers always specialise to M3U URL/file/text immediately
after, which is what we want anyway).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Simplified expect statements for channel items and content cards in favorites and recent tests.
- Added new tests for opening Xtream favorite movies and series inline from favorites without switching playlists.
- Enhanced existing tests to ensure consistent behavior when navigating back from detail views.
- Introduced utility function expectInlineCollectionDetail to reduce code duplication in inline detail checks.
- Improved error handling for back button clicks in detail views.
Entire-Checkpoint: c6e522b4276c
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.