Skip to content

Conversation

@undead2146
Copy link
Member

@undead2146 undead2146 commented Jan 2, 2026

Summary

This PR enhances the Map Manager and Replay Manager features while refining the overall Tools sidebar user experience. It consolidates redundant UI elements, introduces advanced parsing for map metadata, and stabilizes the sidebar interaction logic.

Key Changes

1. Map Manager & Replay Manager Enhancements

  • Layout Consolidation: Merged the "Import Bar" into the main header row to reclaim vertical space.
  • Advanced Map Parsing:
    • Integrated a custom TgaParser to display map thumbnails.
    • Implemented MapNameParser to extract actual display names from .map files rather than relying on filenames.
  • Polished Action Bars: Conjoined the "Upload" and "History" buttons into a single cohesive unit and relocated storage notices to the bottom-left for better visual balance.
  • Directory-Based Uploads: Refined ZIP import/export logic to maintain consistent directory structures for maps.

2. Tools Sidebar UX Refinements

  • Interaction Fixes: Resolved a state-sync bug where the sidebar would occasionally get "stuck" open.
  • Dismissal Logic: Implemented a click-outside-to-close behavior via a transparent content overlay.
  • Accessibility: Moved the sidebar close button higher and increased its size for better visibility.
  • Dynamic Headers: Bound the main Tools header to the active tool's name (e.g., displaying "Map Manager" instead of a static "Tools" label).
MapManager.mp4

Greptile Summary

This PR refactors the Map Manager and Replay Manager tools while improving the Tools sidebar UX. The changes introduce advanced map parsing capabilities (TGA thumbnails and display name extraction), consolidate UI elements for better space utilization, and fix sidebar interaction issues with an overlay-based approach.

Key Improvements:

  • Advanced Map Parsing: Implemented custom TgaParser to display map thumbnails and MapNameParser to extract actual display names from .map files instead of relying on filenames
  • Tools Sidebar UX: Refactored from collapse/expand sidebar to overlay pane with click-outside-to-close behavior and hover trigger zone, resolving the "stuck open" state bug
  • Constants Architecture: Properly followed the constants style guide by introducing MapManagerConstants, ReplayManagerConstants, and ToolConstants classes
  • CI/CD Enhancement: Added PowerShell script to inject and obfuscate UPLOADTHING_TOKEN during builds with PR support
  • Documentation: Added comprehensive constants.md documentation with examples and best practices

Code Quality:

  • Strong adherence to the constants style guide (custom instruction 53453b3b)
  • Proper use of dependency injection and service architecture
  • Good separation of concerns between ViewModels, Services, and Views
  • Comprehensive XML documentation throughout

Minor Issues:

  • Typo in commit message: "modifjy" should be "modify"

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The code follows established patterns, properly uses constants, has good architecture with dependency injection, and includes comprehensive documentation. The only issue is a minor typo in the commit message which doesn't affect functionality.
  • No files require special attention

Important Files Changed

Filename Overview
.github/scripts/inject-token.ps1 New PowerShell script to inject and obfuscate UPLOADTHING_TOKEN during CI/CD builds with PR support
GenHub/GenHub/Features/Tools/MapManager/Services/TgaParser.cs New TGA image parser for loading map thumbnails with support for uncompressed and RLE-compressed formats
GenHub/GenHub/Features/Tools/MapManager/Services/MapNameParser.cs New service to parse map display names from .map file contents and directory names
GenHub/GenHub/Features/Tools/ViewModels/ToolsViewModel.cs Refactored sidebar interaction from collapse/expand to overlay pane with open/close commands
GenHub/GenHub/Features/Tools/Views/ToolsView.axaml Updated UI to use SplitView overlay pane with click-outside-to-close functionality and trigger zone
GenHub/GenHub.Core/Constants/MapManagerConstants.cs New constants file for Map Manager feature following the constants style guide
GenHub/GenHub.Core/Constants/ToolConstants.cs New constants file for tool plugin metadata and configuration

Sequence Diagram

sequenceDiagram
    participant User
    participant ToolsView
    participant ToolsViewModel
    participant MapManagerVM
    participant MapImportService
    participant MapDirectoryService
    participant TgaParser
    participant MapNameParser
    participant UploadHistoryService

    User->>ToolsView: Hover over trigger zone
    ToolsView->>ToolsViewModel: IsPaneOpen = true
    ToolsViewModel-->>ToolsView: Pane opens (overlay)
    
    User->>ToolsView: Select Map Manager tool
    ToolsView->>ToolsViewModel: SelectedTool = MapManager
    ToolsViewModel->>MapManagerVM: OnActivated()
    MapManagerVM->>MapDirectoryService: GetMaps()
    MapDirectoryService->>MapNameParser: ParseMapName()
    MapNameParser-->>MapDirectoryService: Display name
    MapDirectoryService->>TgaParser: LoadTga()
    TgaParser-->>MapDirectoryService: Thumbnail bitmap
    MapDirectoryService-->>MapManagerVM: Map files with metadata
    MapManagerVM-->>ToolsViewModel: CurrentToolControl updated
    
    User->>MapManagerVM: Import map from file
    MapManagerVM->>MapImportService: ImportFromFilesAsync()
    MapImportService->>MapDirectoryService: GetMapDirectory()
    MapImportService->>MapDirectoryService: CopyFiles()
    MapDirectoryService-->>MapImportService: Files copied
    MapImportService-->>MapManagerVM: ImportResult
    MapManagerVM->>MapDirectoryService: RefreshMaps()
    
    User->>MapManagerVM: Export selected maps
    MapManagerVM->>MapImportService: ExportMapsAsync()
    MapImportService->>MapDirectoryService: GetMapFiles()
    MapImportService->>MapImportService: CreateZipArchive()
    MapImportService-->>MapManagerVM: Export complete
    
    User->>MapManagerVM: Upload to UploadThing
    MapManagerVM->>UploadHistoryService: CanUploadAsync()
    UploadHistoryService-->>MapManagerVM: Upload allowed
    MapManagerVM->>UploadHistoryService: UploadFileAsync()
    UploadHistoryService->>UploadHistoryService: RecordUpload()
    UploadHistoryService-->>MapManagerVM: Upload complete with URL
    
    User->>ToolsView: Click outside pane
    ToolsView->>ToolsViewModel: IsPaneOpen = false
    ToolsViewModel-->>ToolsView: Pane closes
Loading

Context used:

  • Context from dashboard - Use dedicated constants classes instead of hardcoding constants string, integers or variables in ser... (source)

@undead2146 undead2146 added the Enhancement New feature or request label Jan 2, 2026
@undead2146 undead2146 force-pushed the feat/map-manager branch 10 times, most recently from 7542426 to f259012 Compare January 3, 2026 08:35
@undead2146 undead2146 force-pushed the development branch 3 times, most recently from b9f8255 to 615dc70 Compare January 3, 2026 13:22
greptile-apps[bot]

This comment was marked as resolved.

greptile-apps[bot]

This comment was marked as resolved.

greptile-apps[bot]

This comment was marked as resolved.

@undead2146 undead2146 force-pushed the feat/map-manager branch 4 times, most recently from 2bb290d to 90ef3d1 Compare January 6, 2026 07:25
…le management

- Implemented ReplayManagerView for managing replay files.
- Added drag-and-drop support for importing replay files (.rep, .zip).
- Enhanced ToolsViewModel to include Replay Manager services.
- Updated UI styles for better visual consistency.
- Introduced EnumToBoolConverter and EqualsToConverter for improved data binding.
- Added documentation for Replay Manager features and usage.
- Registered Replay Manager services in the dependency injection module.
@undead2146
Copy link
Member Author

@greptile

greptile-apps[bot]

This comment was marked as resolved.

@greptile-apps
Copy link

greptile-apps bot commented Jan 8, 2026

Too many files changed for review.

1 similar comment
@greptile-apps
Copy link

greptile-apps bot commented Jan 8, 2026

Too many files changed for review.

@greptile-apps
Copy link

greptile-apps bot commented Jan 8, 2026

Too many files changed for review.

@undead2146 undead2146 merged commit 33dbae1 into community-outpost:development Jan 8, 2026
4 checks passed
@greptile-apps
Copy link

greptile-apps bot commented Jan 8, 2026

Too many files changed for review.

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

Labels

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant