fix(shell): keep Add Playlist reachable on Settings; fix dashboard e2e

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>
This commit is contained in:
4grayandClaude Opus 4.7 committed 2026-05-20 15:55:06 +02:00
1 parent a8253c5801
commit 7083bd2af4
2 files changed
+36 -30

No files matched your search

@@ -85,10 +85,17 @@ test.describe('Dashboard Activation', () => {
await goToDashboard(app.mainWindow);
await expectDashboardRail(app.mainWindow, 'dashboard-global-favorites-rail');
// v0.22 dashboard: the mixed Global Favorites rail was removed.
// Favorited live channels are promoted into the favorites-first
// Live rail; clicking one still opens the Xtream favorites
// collection with the channel playing.
await expectDashboardRail(
app.mainWindow,
'dashboard-live-recent-rail'
);
await dashboardRailCardByTitle(
app.mainWindow,
'dashboard-global-favorites-rail',
'dashboard-live-recent-rail',
liveTitle
).click();
await app.mainWindow.waitForURL(
@@ -108,22 +115,16 @@ test.describe('Dashboard Activation', () => {
await app.mainWindow.goBack();
await app.mainWindow.waitForURL(/\/workspace\/dashboard$/);
// Movies and series that were played land in the Continue
// Watching rail (formerly "recently-watched"); clicking a card
// opens it inline in the global-recent collection detail view.
await expectDashboardRail(
app.mainWindow,
'dashboard-continue-watching-rail'
);
await dashboardRailCardByTitle(
app.mainWindow,
'dashboard-global-favorites-rail',
movieTitle
).click();
await expectInlineCollectionDetail(app.mainWindow, {
pathname: /\/workspace\/global-favorites$/,
title: movieTitle,
});
await goBackFromDetail(app.mainWindow);
await expectPathname(app.mainWindow, /\/workspace\/dashboard$/);
await dashboardRailCardByTitle(
app.mainWindow,
'dashboard-recently-watched-rail',
'dashboard-continue-watching-rail',
movieTitle
).click();
await expectInlineCollectionDetail(app.mainWindow, {
@@ -136,7 +137,7 @@ test.describe('Dashboard Activation', () => {
await dashboardRailCardByTitle(
app.mainWindow,
'dashboard-recently-watched-rail',
'dashboard-continue-watching-rail',
seriesTitle
).click();
await expectInlineCollectionDetail(app.mainWindow, {
@@ -59,17 +59,22 @@
</label>
}
@if (!isSettingsRoute()) {
<div class="header-actions header-actions--leading">
<button
type="button"
mat-icon-button
(click)="onAddPlaylistRequested()"
[matTooltip]="'WORKSPACE.SHELL.ADD_PLAYLIST_ALL' | translate"
[attr.aria-label]="'WORKSPACE.SHELL.ADD_PLAYLIST' | translate"
>
<mat-icon>add</mat-icon>
</button>
<!-- The "Add playlist" button stays visible on /settings — adding a
playlist is a global action, not playlist-scoped, so it must
remain reachable (e.g. a fresh user configuring the app before
importing their first source). Only the per-playlist shortcut
and bulk actions are hidden on Settings. -->
<div class="header-actions header-actions--leading">
<button
type="button"
mat-icon-button
(click)="onAddPlaylistRequested()"
[matTooltip]="'WORKSPACE.SHELL.ADD_PLAYLIST_ALL' | translate"
[attr.aria-label]="'WORKSPACE.SHELL.ADD_PLAYLIST' | translate"
>
<mat-icon>add</mat-icon>
</button>
@if (!isSettingsRoute()) {
@if (headerShortcut(); as action) {
<button
type="button"
@@ -95,8 +100,8 @@
<mat-icon>{{ bulk.icon }}</mat-icon>
</button>
}
</div>
}
}
</div>
@if (isElectron()) {
<div class="header-actions header-actions--trailing">