The two component specs in this lib had been carrying 7 long-standing
failures rooted in three stale-mock issues, all unrelated to public
behaviour but enough to make the suite red on every run.
Header spec (5 failures, NG0303 on app-playlist-switcher):
- MockPlaylistSwitcherComponent was missing canRefreshActivePlaylist /
isRefreshingActivePlaylist inputs and refreshPlaylistRequested
output. The real PlaylistSwitcherComponent grew them when refresh
was added to the header; the mock never caught up. Re-aligned.
Workspace-shell component spec (2 failures):
- NG0301 on #dropZone="playlistDropZone" because overrideComponent's
set.imports list dropped PlaylistDropZoneDirective and the drop
overlay component. Added MockPlaylistDropZoneDirective and
MockPlaylistDropOverlayComponent.
- After the recent option-D refactor that lifted the import overlay
into its own child component, the spec also needed
MockWorkspaceShellImportOverlayComponent so the parent template
could resolve <app-workspace-shell-import-overlay />.
- MockWorkspaceShellHeaderComponent gained hasNoPlaylists input and
MockWorkspaceShellContextSidebarComponent gained hasPlaylists input
to match the real components.
- The "renders type-aware xtream import progress copy" test asserted
on inline overlay markup that no longer lives in the parent
template. Replaced with a structural test that the overlay child
renders/unmounts based on facade.showXtreamImportOverlay().
New focused spec for WorkspaceShellImportOverlayComponent (6 tests)
covers the moved progress-copy assertion at the right level by mocking
the WorkspaceShellXtreamImportService directly: title, progress copy,
determinate vs indeterminate progress bar, badge tone, and cancel
forwarding.
Final state: full feature lib suite is 66/66 (was 53/60 with 7
chronic failures). pnpm nx test web, pnpm nx lint
workspace-shell-feature, pnpm nx build web --configuration=production,
and the basic + settings web-e2e suites all pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c2cea9c530e6
Continues the workspace-shell facade decomposition by relocating two
clusters from the parent template into the components that own them.
Xtream import overlay:
- New WorkspaceShellImportOverlayComponent injects
WorkspaceShellXtreamImportService directly. The 70-line inline
overlay block in workspace-shell.component.html collapses to a
single <app-workspace-shell-import-overlay /> element, gated by
facade.showXtreamImportOverlay().
- Overlay-specific styles move from workspace-shell.component.scss
into the child component (~125 lines relocated).
- Facade drops 14 import re-export lines plus the cancelXtreamImport
delegation. The two facade tests that exercised label generation
now resolve the service via TestBed.inject and assert against it
directly.
Header bulk action:
- WorkspaceShellHeaderComponent gains headerBulkAction input and
headerBulkActionRequested output, plus a button that renders the
action when present (next to the existing headerShortcut button).
- The parent template wires facade.headerBulkAction() →
facade.runHeaderBulkAction(). The facade keeps the cross-cutting
computed and the multi-store dispatch method since both span
multiple stores.
Verification:
- workspace-shell.facade.spec.ts: 20/20 passing (two assertions
retargeted at WorkspaceShellXtreamImportService).
- Full feature lib: 53/60 passing — same 7 pre-existing failures.
- pnpm nx build web --configuration=production: success.
- pnpm nx lint workspace-shell-feature: clean.
- pnpm nx run web-e2e:e2e-ci--src/basic.e2e.ts: 3/3 across browsers.
- pnpm nx run web-e2e:e2e-ci--src/settings.e2e.ts: 12/12 across
browsers.
Facade: 917 → 897 lines. The bulk-action button now actually renders
in the header — closing a latent gap where the computed existed on
the facade but had no template binding.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c2cea9c530e6
Production build (stricter than test/dev) flagged the helper signature
as requiring a mutable array while WorkspaceViewCommandService.commands
returns readonly. The body uses spread, so widening the parameter to
readonly is the correct fix and unblocks `nx build web` plus E2E.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c2cea9c530e6
The WorkspaceShellFacade had grown to 1666 lines, well past the 300/400
LOC target in CLAUDE.md. The component template binds to 54 facade
members directly, so the split preserves the public API by reference
re-export and keeps the template untouched.
Phase 1 — extract pure helpers (no DI, no behavior change):
- helpers/workspace-shell-constants.ts: i18n keys, RAIL_TOOLTIP_KEYS,
XtreamImportPhaseTone, WorkspaceHeaderBulkAction
- helpers/workspace-shell-route-utils.ts: toQueryString,
getRouteQueryParam, syncSearchQueryParam, bumpRefreshQueryParam,
getProviderFromPlaylist
- helpers/workspace-shell-search-labels.ts: resolveSearchPlaceholderKey,
resolveSearchScopeLabel, resolveActiveCategoryLabel, getRailTooltipKey,
translateRailLinks (each takes TranslateFn + snapshots as params)
- helpers/workspace-shell-import-labels.ts: build* helpers for the 14
Xtream import overlay labels and formatLocalizedNumber
- helpers/workspace-shell-command-builders.ts: buildCommandPaletteItems
plus the three command-definition builders, navigation command
factory, resolveCommand, comparePaletteCommands, getCommandGroupOrder
Phase 2 — extract the two component-scoped sub-services with the
cleanest boundaries:
- WorkspaceShellXtreamImportService: read-only labels, cancel action,
isImportRunning. Reads only XtreamStore + TranslateService.
- WorkspaceShellCommandPaletteService: MatDialog lifecycle, recent
commands integration, eager WorkspacePlayerCommandsContributor
bootstrap. Receives a typed CommandBuilderContext via function
argument from the parent — no circular DI.
The parent facade re-exposes every member by reference assignment so
signal identity is preserved for change detection. workspace-shell.
component.html is unchanged. workspace-shell.component.ts gains only
two provider entries for the new sub-services.
Verification:
- workspace-shell.facade.spec.ts: 20/20 passing
- pnpm nx lint workspace-shell-feature: clean
- workspace-shell-feature suite: 53/60 passing — same 7 pre-existing
failures (header & shell component specs hit unrelated NG0301
on playlistDropZone export); no regressions introduced
- CDP smoke: command palette opens with Recently Used + Global
Actions groups, settings nav disables search bar correctly
Facade reduces from 1666 to 917 lines. Each new helper/service is
under 250 lines except command-builders.ts (462) which is mostly
declarative command definitions. The parent facade is still over the
400-line hard max because cross-cutting orchestration
(searchCapability, runHeaderBulkAction, rail link computeds) reads
from multiple clusters; further reduction would require moving logic
into child components, which is deferred per the plan.
Plan: ~/.claude/plans/workspace-shell-facade-ts-is-now-1668-crispy-planet.md
(also copied locally to .plans/2026-05-01-workspace-shell-facade-split.md;
the working-tree .gitignore change excludes .plans from tracking).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c2cea9c530e6
Adds a "Recently used" section at the top of the command palette (capped at 5,
persisted via StorageMap) and five "Switch player to ..." commands for one-step
player switching from anywhere. MPV/VLC are gated to Electron; the active player
entry is shown disabled. Switching applies to the next playback session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c2cea9c530e6
- Added `XtreamCachedContentScope` type to manage content loading states.
- Updated live stream layout to show a loading skeleton when content is being fetched.
- Introduced styles for loading content in the live stream layout.
- Enhanced unit tests to cover loading states and caching behavior.
- Modified `XtreamWorkspaceRouteSession` to handle cached content loading and state management.
- Improved handling of optional connection values in playlist data.
- Updated workspace context panel to reflect import states and loading conditions.
Entire-Checkpoint: c2cea9c530e6
Two issues kept the scrollbar invisible on the global Favorites and
Recently viewed live-tv lists:
1. The wrong files. The visible Favorites/Recent pages render through
<app-global-favorites-list> from portal/shared/ui (and the
workspace-shell variant), not the channel-list-container's tabs.
Apply .app-scrollbar to both of those components.
2. Specificity. Component CSS gets an Angular [_ngcontent-xxx]
attribute selector, so `.nav-list { overflow-y: auto }` resolves to
(0,2,0) — same as the doubled `.app-scrollbar.app-scrollbar` and
wins on source order (component CSS loads after globals). Mark
overflow-y: scroll !important on the utility so the contract holds:
applying .app-scrollbar always reserves the gutter.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 8ae011808369
- Removed global favorites related properties and methods from WorkspaceShellHeaderComponent.
- Updated WorkspaceShellFacade to streamline command palette commands and navigation.
- Refactored command palette to include type-aware xtream import progress labels.
- Enhanced WorkspaceShellComponent to display import progress with improved styling.
- Updated tests to reflect changes in command palette and import progress handling.
- Set default appearance for mat-form-field to 'outline' and dynamic subscript sizing in app.config.ts.
- Adjust dialog dimensions in workspace-shell-actions.service.ts for better responsiveness.
- Refactor settings.component.scss to remove specific mat-form-field font size overrides.
- Enhance global styles in m3-theme.scss for outlined inputs, ensuring consistency across the application.
- Modify workspace-command-palette styles to improve visual integration with the overall theme.
- Revamp add-playlist-dialog component to utilize segmented controls for category selection, improving UX.
- Update file-upload component to provide better feedback on file selection and drag-and-drop interactions.
- Clean up text and URL upload components by removing unnecessary placeholders and improving layout.
- Refine stalker-portal-import component by removing placeholder text for clarity.
Entire-Checkpoint: c6e522b4276c
- Added new commands to the workspace command palette including open-settings, open-sources, open-dashboard, add-playlist, refresh-playlist, playlist-info, account-info, and navigation commands for vod, live, and series.
- Updated command icons for new commands in workspace-command-palette.component.ts.
- Improved workspace context category view with inline status messages and loading indicators for item counts.
- Refactored category view to use buttons instead of links for better accessibility and interaction handling.
- Introduced search functionality in the workspace context panel to filter categories.
- Enhanced styling for the context panel and header components, including a download activity indicator.
- Added tests for the workspace context panel to ensure proper functionality and interaction handling.
Entire-Checkpoint: 271bd0162027
- Introduced a loading state in the source stats widget with a spinner.
- Updated styles for the loading state in the SCSS file.
- Created unit tests for the source stats widget to verify loading behavior.
- Enhanced the source stats widget component to include a progress spinner.
- Added a new service for managing workspace startup preferences.
- Implemented logic to determine the initial workspace path based on user settings.
- Updated workspace shell header to include a refresh playlist button.
- Refactored workspace shell rail component to support dynamic brand link and tooltip.
- Enhanced workspace shell facade to manage playlist refresh actions.
- Improved loading overlay UI in the workspace shell component.
Entire-Checkpoint: 271bd0162027
feat(recent-view): implement search term filtering for recent items
fix(dashboard-data): update return type for navigation state methods
chore(jest): add jest configuration for workspace shell feature
refactor(global-favorites): migrate global favorites list to shared UI
refactor(global-favorites): remove global favorites page component and its styles
refactor(global-favorites): update unified favorite channel interface to use shared util
test(workspace-shell): setup test environment for workspace shell feature
Entire-Checkpoint: 0e4488af6c76
- Introduced `jest.config.ts` for testing setup.
- Added `workspace-search-capability.ts` to define search capabilities.
- Created `workspace-shell-route.utils.ts` for parsing and handling workspace routes.
- Implemented tests for route utilities in `workspace-shell-route.utils.spec.ts`.
- Updated `index.ts` to export new navigation utilities.
- Configured TypeScript for testing with `tsconfig.spec.json`.
- Set up test environment in `test-setup.ts`.
Entire-Checkpoint: 130fa99dcbb4
- Introduced M3uRecentlyViewedItem interface to define structure for recently viewed items.
- Implemented utility functions to handle mapping and building of recently viewed items from playlists.
- Updated Playlist interface to use PlaylistRecentlyViewedItem type for recently viewed items.
- Enhanced PortalActivityItem interface to include 'm3u' as a possible source.
- Added UI components for displaying recently viewed channels, including clear functionality.
- Integrated recent view functionality into the channel list container and sidebar components.
- Updated dashboard data service to manage M3U favorites and recently viewed items.
- Added tests to ensure correct behavior of recently viewed items in the dashboard data service.