Commit Graph
65 Commits
Author SHA1 Message Date
4gray 1af287205f perf: optimize playlist favorite lookups
Use Map and Set lookups for M3U favorite aggregation, dashboard global favorite mapping, and channel-list favorite/group resolution.

Remove the duplicate NgxIndexedDB provider registration and add regression coverage for duplicate URL and earliest-match behavior.

Entire-Checkpoint: c2cea9c530e6
2026-05-01 20:44:30 +02:00
4gray 6ef9e8c4b0 fix(web): lazy load route feature boundaries
Entire-Checkpoint: c2cea9c530e6
2026-05-01 20:38:14 +02:00
4grayandClaude Opus 4.7 d24c67c6e8 test(workspace-shell): repair stale component-spec mocks and cover new overlay child
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
2026-05-01 19:34:45 +02:00
4grayandClaude Opus 4.7 63f5173139 refactor(workspace-shell): push xtream import overlay and bulk action into child components
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
2026-05-01 19:12:19 +02:00
4grayandClaude Opus 4.7 0ad54e7939 fix(workspace-shell): accept readonly viewCommands in palette builder
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
2026-05-01 18:59:24 +02:00
4grayandClaude Opus 4.7 d1cd805622 refactor(workspace-shell): split 1666-line facade into helpers and sub-services
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
2026-05-01 18:48:53 +02:00
4grayandClaude Opus 4.7 2f47ed16cb feat(command-palette): add recently used section and switch-player commands
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
2026-04-30 23:54:02 +02:00
4gray b5a85fdf5f style: add shared count-badge style and update component usage
Entire-Checkpoint: c2cea9c530e6
2026-04-30 20:32:55 +02:00
4gray 4b2076fa53 feat(settings): add cover size settings and implement responsive cover sizing
Entire-Checkpoint: c2cea9c530e6
2026-04-30 18:56:06 +02:00
4gray cbedb22698 refactor: enhance live stream layout with loading state and caching
- 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
2026-04-30 18:54:58 +02:00
4grayandClaude Opus 4.7 2db99769f9 fix(scrollbar): make .app-scrollbar override component-scoped overflow
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
2026-04-29 01:13:58 +02:00
4grayandClaude Opus 4.7 d163a1fbf2 feat(dashboard): contained logo + blurred backdrop for live channels
Render live TV channel logos with object-fit: contain on a soft blurred
wash sampled from the logo itself, instead of stretching small (100-256px)
logos to fill 2:3 portrait cards with object-fit: cover. Mirrors the
treatment used by Apple Podcasts and Plex Live TV. VOD/series posters
still get the full-bleed cover treatment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 6bb6f5796090
2026-04-28 20:14:04 +02:00
4gray 313ff7a24f fix(command-palette): enhance command palette management with dialog reference
Entire-Checkpoint: c6e522b4276c
2026-04-26 01:06:36 +02:00
4gray 4bc733d9c2 refactor(external-playback): update styles
Entire-Checkpoint: c6e522b4276c
2026-04-25 23:48:21 +02:00
4gray 92f21bd237 feat(workspace): enhance dashboard and sources components with playlist management and UI improvements
Entire-Checkpoint: c6e522b4276c
2026-04-25 22:11:31 +02:00
4gray caed2ce396 feat(playlist-drop-overlay): add component and directive for file drop overlay functionality
Entire-Checkpoint: c6e522b4276c
2026-04-25 22:08:03 +02:00
4gray a76f09a8ce style(dashboard): enhance hero artwork handling with fallback logic and image failure management
Entire-Checkpoint: c6e522b4276c
2026-04-25 15:11:25 +02:00
4gray efa0385fc8 feat(dashboard): implement context menu with actions for recent sources 2026-04-24 14:27:04 +02:00
4gray 0e77f7b98a refactor: rework dashboard view
- 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.
2026-04-22 22:19:42 +02:00
4gray 5e41e3d1ce refactor(favs-recent): adapt UI and routing behavior
- Introduced StalkerCollectionDetailComponent to handle detailed views for Stalker collections.
- Added XtreamCollectionDetailComponent for managing Xtream collection details.
- Updated routing components to integrate new detail components for both Stalker and Xtream.
- Enhanced global favorites and recently viewed functionalities to support new detail navigation for Stalker and Xtream items.
- Improved styling and structure for better responsiveness and user experience in detail views.

Entire-Checkpoint: c6e522b4276c
2026-04-18 10:16:09 +02:00
4gray e0f6b34aa0 style: update form field styles and dialog components
- 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
2026-04-17 23:20:17 +02:00
4gray b1c72a7782 style: enhance workspace sources with sorting functionality and UI improvements
Entire-Checkpoint: c6e522b4276c
2026-04-14 17:04:30 +02:00
4gray 156c12c51a feat: enhance playlist switcher with dynamic type filters and add playlist functionality
Entire-Checkpoint: 50668c5f4b12
2026-04-12 19:35:41 +02:00
4gray bd76d8456d style: update playlist switcher and header styles for improved UI/UX
Entire-Checkpoint: a0a3e00085b7
2026-04-12 19:23:25 +02:00
4gray c97673b928 refactor: refactor date handling across components to use date-fns and Intl.DateTimeFormat
- Replaced moment.js usage with Intl.DateTimeFormat for date formatting in various components.
- Introduced utility functions `normalizeDateLocale` and `formatWithIntl` for locale normalization and date formatting.
- Updated PlaylistSwitcher, RecentPlaylists, ContentCard, EPG components, and MultiEpgContainer to utilize the new date formatting approach.
- Removed moment-date pipe and related tests, simplifying date handling logic.
- Ensured all date displays respect the current locale settings.

Entire-Checkpoint: 271bd0162027
2026-04-11 10:41:33 +02:00
4gray 77dbfd7eae style: unify search bar styling across components and improve display properties
Entire-Checkpoint: dd05e045e1b2
2026-04-11 08:13:39 +02:00
4gray 76e4e1b032 feat: enhance playlist management by adding optional title input and updating URL submission logic 2026-04-06 17:57:04 +02:00
4gray 5fdd999c7e style: enhance settings UI with responsive action bar and snackbar adjustments 2026-04-06 17:56:50 +02:00
4gray 70b7f570ef feat: enhance workspace command palette and context panel
- 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
2026-04-04 20:22:24 +02:00
4gray 8b5344ef26 feat: enhance DashboardDataService with loading states and global favorites handling 2026-04-04 10:11:22 +02:00
4gray eaa3e0e2bd feat: add loading state and spinner to source stats widget
- 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
2026-04-04 10:10:52 +02:00
4gray a15ac7f7c1 test(e2e): enhance category management dialog and update playlist handling 2026-04-01 22:41:15 +02:00
4gray 8b0436dce8 style(dashboard): update thumbnail dimensions and border radii for improved visual consistency
Entire-Checkpoint: 84693b066142
2026-03-29 15:44:46 +02:00
4gray 379228e8c3 style(dashboard): refine background colors and remove backdrop filters for improved aesthetics
Entire-Checkpoint: 84693b066142
2026-03-29 15:30:02 +02:00
4gray 69bf106999 style(playlists): merge "add playlist" dialogs to one entrypoint dialog
Entire-Checkpoint: 84693b066142
2026-03-29 15:27:46 +02:00
4gray a20597ce4a refactor: remove unused imports and streamline playlist context handling in WorkspaceShellFacade 2026-03-28 21:43:08 +01:00
4gray 122a69047c feat: enhance global recent route handling with translation and import phase management 2026-03-28 15:37:08 +01:00
4gray f58a5c1290 feat: add recently added widget to dashboard with necessary imports and case handling 2026-03-28 15:36:41 +01:00
4gray 36c3d26559 feat: implement recently added widget with data mapping and default settings 2026-03-28 15:35:55 +01:00
4gray 43426114d6 feat: add recently added widget with filtering and view mode options 2026-03-28 15:35:19 +01:00
4gray d85ef89893 feat: enhance global favorites list and unified collection components with draggable functionality and improved layout
Entire-Checkpoint: 56d3e3141f61
2026-03-26 19:07:01 +01:00
4gray 251b922659 style: update font sizes, weights, and letter-spacing for improved readability and consistency across various components
Entire-Checkpoint: e6dee91f3aee
2026-03-26 08:12:50 +01:00
4gray 8e86bb77f3 style: update background and border styles using color-mix for improved theming
Entire-Checkpoint: 7a59119e1876
2026-03-25 21:29:29 +01:00
4gray 879f018a81 style: enhance theme and layout styles, improve accessibility labels, and refine component shadows
Entire-Checkpoint: 73c4b0ef53fd
2026-03-25 21:01:06 +01:00
4gray 8874e4a17e feat(groups-view): add search functionality to filter grouped channels
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
2026-03-25 19:16:03 +01:00
4gray aa5e4097f1 refactor(workspace-shell-util): refactor workspace shell components
- 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
2026-03-25 19:14:47 +01:00
4gray eaaf634b17 refactor(playlist-switcher): add context actions for playlist and account info
Entire-Checkpoint: 0e4488af6c76
2026-03-22 18:38:11 +01:00
4gray 0c451b0dd7 refactor: refactor video player component and enhance workspace header shortcuts 2026-03-16 22:55:01 +01:00
4gray b0a1d8da77 feat(command-palette): add command icons and enhance search panel styling
style(shell): update rail shortcut styles and improve hover effects
2026-03-14 23:42:43 +01:00
4gray fbe31b701b style(dashboard): refine hover effects and transitions for activity items and continue watching widget 2026-03-14 23:40:51 +01:00