mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
- Moved Stalker-related components and services from apps/web to libs/portal for better modularity. - Introduced SQLite DB Worker to handle non-EPG database operations, improving UI responsiveness. - Updated documentation for the Workspace Dashboard and Shell, detailing current implementation and routing structure. - Added new EPG fixture scenarios to the Xtream mock server for testing purposes. - Enhanced the overall architecture documentation to reflect recent changes and improvements.
4.6 KiB
4.6 KiB
Workspace Shell
This document records the current workspace-first shell contract. It is the stable replacement for the older UI refactor summary.
Related:
Summary
/workspaceis the primary app surface.WorkspaceShellComponentowns the persistent frame: rail, header, optional context panel, content outlet, and external playback footer.- Descendant workspace pages inherit
layout = 'workspace'from the/workspaceroot route. - Provider route trees now bootstrap through route-scoped session providers instead of nested provider shell components.
Core implementation:
apps/web/src/app/app.routes.tslibs/workspace/shell/feature/src/lib/workspace-shell/workspace-shell.component.tslibs/workspace/shell/feature/src/lib/workspace-shell/workspace-shell.component.htmllibs/portal/shared/util/src/lib/navigation/portal-route.utils.tslibs/portal/shared/util/src/lib/navigation/portal-rail-links.tslibs/portal/shared/ui/src/lib/navigation/portal-rail-links.component.ts
Route Contract
Current workspace routes:
/->/workspace/workspace->/workspace/dashboard/workspace/dashboard/workspace/sources/workspace/playlists/:id/:view/workspace/global-favorites/workspace/downloads/workspace/settings/workspace/xtreams/:id/.../workspace/stalker/:id/...
Compatibility redirect:
/settings->/workspace/settings
Provider route integration:
apps/web/src/app/app.routes.tsmarks the/workspaceroot route withdata.layout = 'workspace'.isWorkspaceLayoutRoute(...)treats that layout marker as inherited route state for all descendants.- Xtream and Stalker parent routes attach route-scoped session providers that bootstrap the active playlist, sync provider section state, and clean up provider-local state when the route is destroyed.
- Workspace routes no longer rely on nested provider shell components for hidden local chrome.
Shell Structure
The shell is intentionally split into four persistent regions:
- Left rail:
- Static workspace links for dashboard and sources.
- Provider-aware context links derived from the active or current playlist.
- Top header:
- Playlist switcher.
- Route-aware search input and command palette trigger.
- Add source action.
- Global favorites shortcut.
- Downloads shortcut in Electron.
- Context actions menu for playlist/account or section-level actions.
- Main body:
- Optional left context panel.
- Main router outlet content.
- Optional footer:
- External playback session bar when a docked session is visible.
Context Panel Rules
The shell decides which secondary panel to show from the current route:
/workspace/sourcesWorkspaceSourcesFiltersPanelComponent
- Xtream category sections (
live,vod,series)WorkspaceContextPanelComponent
- Stalker category sections (
itv,vod,series)WorkspaceContextPanelComponent
/workspace/settingsWorkspaceSettingsContextPanelComponent
- Downloads sections
WorkspaceCollectionContextPanelComponent
The context panel is part of the shell contract. New workspace-level routes should explicitly decide whether they need one rather than adding local sidebars inside feature pages.
Search And Navigation Rules
Search is shell-owned and route-aware:
- Disabled on settings routes.
- Enabled on sources routes.
- Enabled for supported Xtream and Stalker content/search views.
- Placeholder text and search handling vary by provider and section.
- Input changes are debounced before route/store updates are applied.
Rail navigation is also shell-owned:
- Workspace-global entries are static.
- Provider entries come from
buildPortalRailLinks(...). - On dashboard, sources, settings, and global favorites, the shell falls back to the currently selected playlist so provider navigation remains available even outside a provider route.
Maintenance Guidance
Use this document as the source of truth when changing workspace shell behavior.
- New top-level user destinations should default to child routes under
/workspace. - Shared provider navigation logic belongs in portal-shared util/UI libraries, not duplicated inside the shell.
- If a provider route changes how playlist/session bootstrap works, update the route-session provider and shell-facing route contract together.
- Historical migration notes, cleanup lists, and one-off refactor steps should stay out of this file; track them in issues or PR notes instead.