[Feature] Multi-Mode Game Profile Sorting & Custom Reordering (Recently Played, Date Created, Alphabetical, Free/Custom)
1. Problem Statement & Context
In GameProfileLauncherView.axaml and GameProfileLauncherViewModel.cs:
- Profiles are loaded from disk via
Directory.GetFiles() and appended to ObservableCollection<GameProfileItemViewModel> Profiles in non-deterministic filesystem order.
GameProfile.cs contains a LastPlayedAt timestamp property (line 73), but it is never updated when a profile is launched via ProfileLauncherFacade.cs.
- There is no mechanism or UI selector to sort or manually reorder profiles.
2. User Stories & Use Cases
- UC-1 (Recently Played / Time): As an active player, I want my most recently launched profile displayed first so I can immediately jump back into my current mod without searching.
- UC-2 (Date Created / Date): As a mod tester, I want to sort by creation date to find new profiles I recently created.
- UC-3 (Alphabetical / Name): As a player with 15+ profiles, I want to sort them alphabetically (A–Z / Z–A) for predictable visual scanning.
- UC-4 (Free / Custom Order): As a user with specific favorite mods, I want to freely arrange my profiles in a custom order using drag-and-drop or Move Up/Down buttons.
3. Proposed Enums & Data Model Updates
namespace GenHub.Core.Models.Enums;
public enum ProfileSortMode
{
LastPlayed = 0, // Time (most recently launched first)
DateCreated = 1, // Date (newest created first)
Alphabetical = 2, // Name A to Z
AlphabeticalDesc = 3, // Name Z to A
Free = 4 // Custom manual order (DisplayOrder property)
}
Model Extensions
GameProfile.cs:
public int DisplayOrder { get; set; } = 0;
UserSettings.cs:
public ProfileSortMode ProfileSortMode { get; set; } = ProfileSortMode.LastPlayed;
4. Active Launch Tracking in ProfileLauncherFacade.cs
In ProfileLauncherFacade.cs (LaunchProfileAsync):
// Record last played timestamp upon successful launch
profile.LastPlayedAt = DateTime.UtcNow;
await profileManager.UpdateProfileAsync(profile, cancellationToken);
5. UI/UX Wireframe (GameProfileLauncherView.axaml)
+------------------------------------------------------------------------------------+
| GAME PROFILES Sort by: [ 🕒 Recently Played ▼ ] [ + SCAN ] |
+------------------------------------------------------------------------------------+
| +-----------------+ +-----------------+ +-----------------+ +---------------+ |
| | Generals Online | | ShockWave Chaos | | Reborn Omega | | [ + ] | |
| | 60Hz Client | | Mod v1.2 | | 1.04 Patch | | Add New | |
| | Played 10m ago | | Played Yesterday| | Played 3 days ago| | Profile | |
| | [ LAUNCH ] | | [ LAUNCH ] | | [ LAUNCH ] | | | |
| +-----------------+ +-----------------+ +-----------------+ +---------------+ |
+------------------------------------------------------------------------------------+
6. Acceptance Criteria
[Feature] Multi-Mode Game Profile Sorting & Custom Reordering (Recently Played, Date Created, Alphabetical, Free/Custom)
1. Problem Statement & Context
In
GameProfileLauncherView.axamlandGameProfileLauncherViewModel.cs:Directory.GetFiles()and appended toObservableCollection<GameProfileItemViewModel> Profilesin non-deterministic filesystem order.GameProfile.cscontains aLastPlayedAttimestamp property (line 73), but it is never updated when a profile is launched viaProfileLauncherFacade.cs.2. User Stories & Use Cases
3. Proposed Enums & Data Model Updates
Model Extensions
GameProfile.cs:UserSettings.cs:4. Active Launch Tracking in
ProfileLauncherFacade.csIn
ProfileLauncherFacade.cs(LaunchProfileAsync):5. UI/UX Wireframe (
GameProfileLauncherView.axaml)6. Acceptance Criteria
ProfileSortModeenum added withLastPlayed,DateCreated,Alphabetical,AlphabeticalDesc, andFree.ProfileLauncherFacade.LaunchProfileAsyncupdatesLastPlayedAttimestamp and persists it.GameProfileItemViewModelexposesLastPlayedAt,CreatedAt, andDisplayOrder.GameProfileLauncherView.axamlupdates the active sorting mode and persists selection toUserSettings.Freemode, users can adjustDisplayOrderusing card hover controls (◀ / ▶) or drag-and-drop.GameProfileLauncherViewModelTestsverify collection reordering for all 4 sort modes.