Skip to content

feat: complete download acquisition, publisher catalog browsing, and dependency management - #265

Open
undead2146 wants to merge 139 commits into
developmentfrom
feat/ui-downloads
Open

feat: complete download acquisition, publisher catalog browsing, and dependency management#265
undead2146 wants to merge 139 commits into
developmentfrom
feat/ui-downloads

Conversation

@undead2146

@undead2146 undead2146 commented Jan 26, 2026

Copy link
Copy Markdown
Member

Overview

This PR delivers the complete Downloads & Content Acquisition Experience along with robust Publisher Catalog Browsing, Multi-Axis Variant Management, and Profile Content/Dependency Integration for GenHub.

It establishes a modern, responsive UI backed by resilient download coordination, multi-stage progress tracking, image caching with memory & disk bounds, topological dependency resolution, and seamless profile linking via CAS (Content Addressable Storage).


Key Features & Changes

1. 🌐 Downloads Browser & Catalog Navigation

  • Unified Downloads View (DownloadsBrowserView / DownloadsBrowserViewModel):
    • Replaces legacy publisher card views with a searchable, filterable grid and detail browser.
    • Multi-publisher support with dynamic switching between official repositories, third-party creators, and community catalogs (ModDB, CNC-Labs, AOD Maps, Community Outpost, SuperHackers, GitHub Releases).
    • Real-time search, sorting, category filtering, and game type filtering.
  • Publisher Sidebar & Confirmation Dialog (PublisherSidebarView, SubscriptionConfirmationDialog):
    • Subscription management allowing users to browse, subscribe, and refresh external publisher catalogs with trust boundaries.

2. 📦 Content Detail, Variants & Bundle Components

  • Rich Content Detail (ContentDetailView / ContentDetailViewModel):
    • Comprehensive metadata rendering: title, author, version, description (with HTML stripping & formatting), screenshots carousel, release notes, license, and download sizes.
  • Multi-Axis Variant & Bundle Management (VariantSelectionView, VariantAxisGrouping, VariantSwap):
    • Supports complex multi-axis content variants (e.g. resolution, language, engine version).
    • Bundle component resolution allowing composite packages and modular add-on selection.

3. 🔗 Dependency Resolution & Preview

  • Dependency Graph Analysis (DependencyResolver, DependencyPreviewView):
    • Automatically resolves direct and transitive content dependencies.
    • Interactive preview displaying missing, satisfied, or conflicting dependencies before installation.
    • Profile-aware checks to prevent circular dependencies or incompatible versions.

4. 🎮 Profile Integration & Content State Tracking

  • Profile Selection & Content Assignment (ProfileSelectionView, ProfileSelectionViewModel):
    • One-click installation to existing profiles or immediate creation of new tailored profiles.
    • Dynamic state tracking (ContentStateService) reflecting installation status (NotInstalled, Installing, Installed, UpdateAvailable, Broken) across all profiles.
  • Profile Content Management (ProfileContentService, ProfileEditorFacade):
    • Integrates with CAS storage (CasPoolManager, CasService, ProfileContentLinkerService) for atomic hardlinking/symlinking into workspace directories.

5. ⚡ Infrastructure, Performance & Image Caching

  • Asynchronous Image Loading (ImageCacheService, ImageLoader):
    • Resilient, disk- and memory-bounded caching for thumbnails, screenshots, and publisher logos.
    • Asynchronous background decoding preventing UI thread stalls.
  • Value Converters & UI Helpers (Converters/):
    • Specialized Converters for state-to-brush, state-to-icon, comparison operations, byte formatting, and HTML stripping.
  • Dependency Injection & Module Composition:
    • Clean registration across DownloadModule, ContentPipelineModule, SharedViewModelModule, and ManifestModule.

6. 🧪 Testing & Documentation

  • 75+ Unit & Integration Test Suites (GenHub.Tests):
    • Thorough test coverage across catalog parsers, discoverers, download coordinator, profile content service, image caches, and converters.
  • Comprehensive Documentation (docs/):
    • Architecture flowcharts (docs/FlowCharts/Downloads-Flow.md).
    • Feature specifications (docs/features/downloads.md, docs/features/content/).
    • Developer guides for manifest IDs, catalog identity remediation, and acceptance criteria.

Verification

  • Compile & Build Safety Check: Verified with scripts/build-check.ps1 (0 Warnings, 0 Errors).
  • Review Threads: All 547 PR review threads verified and resolved.

Note

Add publisher catalog browsing, variant-aware download acquisition, and dependency management

  • Introduces a full downloads browser (DownloadsBrowserViewModel, ContentDetailViewModel, ContentGridItemViewModel) replacing the previous DownloadsViewModel, with per-publisher filter panels, variant axis selection, and bundle component support.
  • Adds a generic publisher catalog pipeline: JsonPublisherCatalogParser, GenericCatalogDiscoverer, GenericCatalogResolver, GenericCatalogManifestFactory, PublisherSubscriptionStore, and PublisherCatalogRefreshService enabling third-party catalogs to be fetched, validated, and browsed.
  • Rewrites ContentOrchestrator acquisition pipeline with staged, non-regressing progress reporting, optional IContentDeliverer fallback, publisher factory post-processing for multi-variant manifests, and provenance fields (OriginalProviderName/OriginalContentId).
  • Upgrades ModDBDiscoverer to use Playwright for Cloudflare-protected scraping with RSS fallback, challenge detection, richer item parsing, and multi-filter support.
  • Adds ProfileContentService multi-item add/create overloads with pairwise conflict validation, dependency acquisition, and publisher-specific GameClient synthesis.
  • Registers genhub:// URI scheme on Windows startup and handles catalog subscription deep-links via drag-and-drop onto the main window or IPC forwarding from secondary instances.
  • Adds ArchivePayloadProcessor, ControlBarPackageProcessor, and PlaywrightService (with managed Chromium provisioning) as shared infrastructure services.
  • Risk: many content pipeline services change from scoped/transient to singleton lifetime; state accumulated during one operation may persist across subsequent operations in the same process session.

Macroscope summarized a53b821.

Greptile Summary

Implements an end-to-end content acquisition and profile integration experience.

  • Adds publisher catalog browsing, subscriptions, filtering, content details, and variant selection.
  • Introduces download coordination, archive processing, manifest generation, dependency resolution, and CAS-backed profile linking.
  • Adds bounded image caching, Playwright-based discovery, dependency-injection composition, UI views, documentation, and extensive tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
GenHub/GenHub/Features/Content/Services/Catalog/PublisherSubscriptionStore.cs Adds serialized, lock-protected subscription persistence with detached cache values and atomic file replacement.
GenHub/GenHub/Features/Content/Services/Catalog/GenericCatalogDiscoverer.cs Adds generic publisher discovery, release hydration, stable catalog identities, and cancellation-aware external metadata retrieval.
GenHub/GenHub/Features/Downloads/Services/ContentDownloadCoordinator.cs Coordinates multi-stage content acquisition and reports progress through the downloads workflow.
GenHub/GenHub/Features/GameProfiles/Services/ProfileContentService.cs Integrates acquired manifests and stored content with selected game profiles.
GenHub/GenHub.Core/Models/Manifest/ManifestVariantResolver.cs Adds deterministic variant and executable-entry-point resolution for generated manifests.
GenHub/GenHub/Infrastructure/DependencyInjection/ContentPipelineModule.cs Registers the expanded catalog, content pipeline, publisher, parser, and processing services.
GenHub/GenHub/Features/Downloads/ViewModels/DownloadsBrowserViewModel.cs Implements publisher switching, discovery, filtering, selection, and installation orchestration for the unified downloads browser.

Sequence Diagram

sequenceDiagram
    actor User
    participant Browser as Downloads Browser
    participant Catalog as Publisher Catalog
    participant Pipeline as Acquisition Pipeline
    participant Manifest as Manifest System
    participant CAS as CAS Storage
    participant Profile as Game Profile
    User->>Browser: Browse and select content
    Browser->>Catalog: Discover releases and variants
    Catalog-->>Browser: Content metadata and dependencies
    User->>Browser: Install selected variant
    Browser->>Pipeline: Acquire content
    Pipeline->>Pipeline: Download, validate, and process archive
    Pipeline->>Manifest: Generate content manifest
    Manifest->>CAS: Store content files
    CAS-->>Profile: Link content into profile workspace
    Profile-->>User: Content available for launch
Loading

Reviews (55): Last reviewed commit: "feat(downloads): complete download acqui..." | Re-trigger Greptile

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant