You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenHub provides modular workspace isolation and Content-Addressable Storage (CAS) deduplication for Command & Conquer Generals and Zero Hour game configurations. With full system disaster recovery tracked in #387 (.ghbak archives containing full offline CAS blobs), there is an equally critical, complementary requirement: lightweight, one-click GameProfile sharing between players.
Currently:
Players who create customized mod, patch, map, or tool configurations (e.g. ShockWave 1.2 + SuperHackers 60Hz Patch + GenPatcher Addons) have no streamlined way to share that exact setup with friends, tournament organizers, or community members.
Past issue Feature: GameProfile Import & Automatic Content Acquisition #93 outlined generic JSON clipboard/file import concepts, but did not define the genhub:// protocol specification, OS deep-link registration, or a detailed inspection/preview workflow.
The Blind Import Risk: Importing a profile without inspecting it creates major usability and security risks. Recipients must have full visibility into the exact game client version, included mods/patches, missing CAS objects requiring download, required disk space, and any altered game settings (resolution, camera, arguments) before confirming.
Architectural Clarification: Disaster Recovery Backup vs. GameProfile Sharing
Frictionless modpack & setup distribution between players.
Binary Assets
Includes physical CAS blobs inside the archive.
Excludes binary blobs; includes manifest IDs, hashes, and acquisition URLs.
Payload Size
Multi-Gigabyte container (ZIP/ZSTD).
Lightweight string/file (Kilobytes to low Megabytes).
Resolution
100% Offline / Air-gapped restore.
On-demand dynamic download via ContentDeliveryService.
Transport
File explorer / USB / Cloud backup.
genhub:// deep links (Discord/browser/chat), text snippet, or .ghprofile.
2. User Stories & Use Cases
UC-1 (One-Click Profile Export & Link Generation): As a player or streamer, I want to click "Share Profile" on any GameProfile card to generate a compact genhub://profile/import?... link, copy a formatted Discord/forum invite snippet, or save a .ghprofile file.
UC-2 (Deep-Link Protocol Activation): As a recipient clicking a genhub://profile/import?... link in Discord, Reddit, or a web browser, I want GenHub to automatically focus/open and launch the "Import Shared Profile" inspection modal.
UC-3 (Detailed Pre-Import Inspection & Diff): As a recipient, before any content is acquired or applied to my system, I want to see a rich breakdown showing:
Base Game Client & Engine Version (e.g. C&C Generals: Zero Hour v1.04).
Target Game Installation compatibility (e.g. Steam / EA App / Retail).
Itemized Content Manifests (Mods, Patches, Add-ons, Maps) with publisher, version, and status tags (✅ Already Cached vs ⬇️ Download Required).
Total download size and disk footprint.
Game configuration & launch argument overrides.
Duplicate profile name detection with inline rename capability.
UC-4 (Automated Content Acquisition & Activation): As a recipient clicking "Accept & Acquire", I want GenHub to fetch missing manifests and CAS objects via the ContentDeliveryService, construct the workspace, create the profile, and highlight it on the launcher dashboard.
UC-5 (Safety & Guardrails): As a user receiving a link from an unknown community member, I want GenHub to validate manifest hashes, sanitize launch arguments, and reject arbitrary executable paths.
3. Protocol Specification & Architecture
A. URI Scheme Format (genhub://)
# Format 1: Inline compressed payload (for lightweight profiles with public manifests)
genhub://profile/import?data=<Base64Url(BrotliCompressed(JSON))>
# Format 2: Remote reference payload (for extensive bundles or hosted manifests)
genhub://profile/import?url=<https://manifests.community-outpost.com/profiles/shockwave-cup-2026.json>
# Format 3: Hub Catalog reference (pre-indexed catalog profile)
genhub://profile/view?id=<catalog-profile-id>&publisher=<publisher-slug>
IPC Forwarding:Program.cs parses incoming genhub://profile/... arguments via CommandLineParser.ExtractProfileShareUri(args) and forwards import-profile:<uri> through SingleInstanceManager named pipe to the active instance.
4. Proposed Interfaces & Data Models
namespaceGenHub.Core.Interfaces.GameProfiles;publicinterfaceIProfileSharingService{/// <summary>Generates a compact genhub:// sharing URI for a given profile.</summary>Task<OperationResult<string>>ExportProfileToUriAsync(stringprofileId,CancellationTokencancellationToken=default);/// <summary>Exports a self-contained .ghprofile JSON container file.</summary>Task<OperationResult<string>>ExportProfileToFileAsync(stringprofileId,stringdestinationPath,CancellationTokencancellationToken=default);/// <summary>Parses and inspects a share URI or package, performing local CAS/manifest diffing without modifying state.</summary>Task<OperationResult<SharedProfileInspectionResult>>InspectSharedProfileAsync(stringshareUriOrJson,CancellationTokencancellationToken=default);/// <summary>Acquires missing dependencies and installs the shared profile.</summary>Task<OperationResult<GameProfile>>ImportSharedProfileAsync(SharedProfileImportRequestrequest,IProgress<ContentAcquisitionProgress>?progress=null,CancellationTokencancellationToken=default);}publicsealedclassSharedProfileInspectionResult{publicrequiredGameProfileProfileMetadata{get;init;}publicrequiredIReadOnlyList<SharedManifestDependency>Manifests{get;init;}publicrequiredboolHasValidGameInstallation{get;init;}publicrequiredstring?MatchedGameInstallationId{get;init;}publicrequiredlongTotalDownloadBytesRequired{get;init;}publicrequiredintCachedManifestCount{get;init;}publicrequiredintMissingManifestCount{get;init;}publicrequiredboolHasNameConflict{get;init;}publicrequiredstringSuggestedProfileName{get;init;}publicrequiredIReadOnlyList<string>SecurityWarnings{get;init;}}publicsealedclassSharedManifestDependency{publicrequiredstringManifestId{get;init;}publicrequiredstringDisplayName{get;init;}publicrequiredstringVersion{get;init;}publicrequiredContentTypeContentType{get;init;}publicrequiredstring?Publisher{get;init;}publicrequiredboolIsCachedLocally{get;init;}publicrequiredlongDownloadSize{get;init;}}
5. UI/UX Specification & Wireframes (Conforming to GenHub Dark Theme)
A. Profile Card & Context Menu Share Action
Add a Share button (Classes="tool-button", share icon) to GameProfileCardView.axaml alongside Steam toggle, Edit, Copy, Shortcut, and Delete.
Add "Share Profile..." to Border.ContextMenu in GameProfileCardView.axaml.
B. Share Profile Dialog (ShareProfileDialogWindow.axaml)
Payload Size Guard: Inline genhub:// data payloads capped at 64 KB to prevent buffer overflows or browser URI truncation. Payloads exceeding limit prompt export to .ghprofile file or remote URL.
Manifest Integrity: Every referenced manifest is validated against its cryptographic SHA-256 hash in the CAS pool before workspace creation.
7. Implementation Plan & Acceptance Criteria
Protocol & IPC:
Add genhub://profile/import and genhub://profile/view routing to CommandLineConstants and CommandLineParser.
Add IpcCommands.ImportProfilePrefix handling to Windows, macOS, and Linux startup / SingleInstance listeners.
Core Services & Serialization:
Implement IProfileSharingService with Brotli/Base64Url compression and .ghprofile file packaging.
Implement InspectSharedProfileAsync calculating CAS diffs, missing manifest lists, download sizes, and installation validation.
Implement ImportSharedProfileAsync orchestrating manifest acquisition, CAS asset download, and profile creation.
UI & UX:
Add Share button and context menu item to GameProfileCardView.axaml.
[Feature] GameProfile Sharing via
genhub://Protocol & Rich Import Inspection UI1. Problem Statement & Context
GenHub provides modular workspace isolation and Content-Addressable Storage (CAS) deduplication for Command & Conquer Generals and Zero Hour game configurations. With full system disaster recovery tracked in #387 (
.ghbakarchives containing full offline CAS blobs), there is an equally critical, complementary requirement: lightweight, one-click GameProfile sharing between players.Currently:
genhub://protocol specification, OS deep-link registration, or a detailed inspection/preview workflow.Architectural Clarification: Disaster Recovery Backup vs. GameProfile Sharing
.ghbak)genhub:///.ghprofile)ContentDeliveryService.genhub://deep links (Discord/browser/chat), text snippet, or.ghprofile.2. User Stories & Use Cases
genhub://profile/import?...link, copy a formatted Discord/forum invite snippet, or save a.ghprofilefile.genhub://profile/import?...link in Discord, Reddit, or a web browser, I want GenHub to automatically focus/open and launch the "Import Shared Profile" inspection modal.✅ Already Cachedvs⬇️ Download Required).ContentDeliveryService, construct the workspace, create the profile, and highlight it on the launcher dashboard.3. Protocol Specification & Architecture
A. URI Scheme Format (
genhub://)B. Data Model:
SharedGameProfilePackage{ "$schemaVersion": 1, "generatorVersion": "0.0.1282", "exportedAt": "2026-08-19T14:30:00Z", "profile": { "name": "ShockWave Chaos Tourney Edition", "description": "Standardized competitive ShockWave build with 60Hz and camera patches.", "themeColor": "#00CCFF", "gameType": "ZeroHour", "gameVersion": "1.04", "useSteamLaunch": false, "commandLineArguments": "-win -quickstart", "gameSettingsOverrides": { "videoResolutionWidth": 1920, "videoResolutionHeight": 1080, "videoWindowed": true, "tshRenderFpsFontSize": 12, "goShowFps": true } }, "requiredManifests": [ { "manifestId": "zero-hour-1.04-patch", "name": "Zero Hour Community Patch 1.04", "contentType": "Patch", "version": "1.04.1", "publisher": "TheSuperHackers", "manifestUrl": "https://cdn.community-outpost.com/manifests/zh-104-patch.json", "totalBytes": 18454912 }, { "manifestId": "shockwave-mod-v1.2", "name": "ShockWave Mod", "contentType": "Mod", "version": "1.20", "publisher": "SWR Productions", "manifestUrl": "https://cdn.community-outpost.com/manifests/shockwave-120.json", "totalBytes": 782194810 } ] }C. Cross-Platform Protocol Registration & IPC Forwarding
HKCU\Software\Classes\genhub\shell\open\command->GenHub.Windows.exe "%1".CFBundleURLTypes-> URL SchemegenhubinInfo.plist..desktopfile containingMimeType=x-scheme-handler/genhub;.Program.csparses incominggenhub://profile/...arguments viaCommandLineParser.ExtractProfileShareUri(args)and forwardsimport-profile:<uri>throughSingleInstanceManagernamed pipe to the active instance.4. Proposed Interfaces & Data Models
5. UI/UX Specification & Wireframes (Conforming to GenHub Dark Theme)
A. Profile Card & Context Menu Share Action
Classes="tool-button", share icon) toGameProfileCardView.axamlalongside Steam toggle, Edit, Copy, Shortcut, and Delete.Border.ContextMenuinGameProfileCardView.axaml.B. Share Profile Dialog (
ShareProfileDialogWindow.axaml)C. Rich Import & Inspection Modal (
ImportProfileInspectionWindow.axaml)Designed to strictly follow GenHub's Avalonia design language (
#1F1F1Fbackground, frosted glass cards, colored accent borders, and badge tags):D. Content Acquisition & Download Overlay
Acquiring ShockWave Mod... 45% (335 MB / 745 MB)) reusingDownloadItemProgressViewandIContentDeliveryServicepipeline.6. Security & Validation Guardrails
ExecutablePath/CustomExecutablePath/WorkingDirectory). GenHub will bind executables strictly through localIGameInstallationresolution or verified tool manifests.|,&,;,>,<) inCommandLineArguments.genhub://data payloads capped at 64 KB to prevent buffer overflows or browser URI truncation. Payloads exceeding limit prompt export to.ghprofilefile or remote URL.7. Implementation Plan & Acceptance Criteria
genhub://profile/importandgenhub://profile/viewrouting toCommandLineConstantsandCommandLineParser.IpcCommands.ImportProfilePrefixhandling to Windows, macOS, and Linux startup / SingleInstance listeners.IProfileSharingServicewith Brotli/Base64Url compression and.ghprofilefile packaging.InspectSharedProfileAsynccalculating CAS diffs, missing manifest lists, download sizes, and installation validation.ImportSharedProfileAsyncorchestrating manifest acquisition, CAS asset download, and profile creation.GameProfileCardView.axaml.ShareProfileDialogWindow.axaml(URI copy, Discord markdown copy, file export).ImportProfileInspectionWindow.axamlconforming to GenHub UI styling (dark theme, glass cards, badges, diff table, settings summary).GenHub.Tests.Core.IProfileSharingServiceverifying CAS cache hits vs missing download estimations.