Skip to content

feat(ui): add ImageCacheService, ImageLoader control, and Avalonia XAML converters - #396

Open
undead2146 wants to merge 2 commits into
community-outpost:developmentfrom
undead2146:feat/image-cache-and-converters
Open

feat(ui): add ImageCacheService, ImageLoader control, and Avalonia XAML converters#396
undead2146 wants to merge 2 commits into
community-outpost:developmentfrom
undead2146:feat/image-cache-and-converters

Conversation

@undead2146

Copy link
Copy Markdown
Member

Summary

Adds an asynchronous two-tier (memory LRU and persistent disk) image caching service, custom ImageLoader Avalonia control, and a full suite of XAML value converters for UI bindings.

Note

This is a self-contained infrastructure PR carved out of #265 and must be merged ahead of #265.

Changes

  • Image Caching: Implemented ImageCacheService with SHA-256 disk key hashing, async file streaming, eviction policy, and memory cache layer.
  • Controls: Added ImageLoader Avalonia control for responsive, non-blocking image loading with fallback placeholders and error handling.
  • XAML Converters: Added 10 reusable value converters under GenHub/Infrastructure/Converters/:
    • StringToImageConverter
    • StripHtmlConverter
    • BoolToBackgroundConverter
    • BoolToBorderConverter
    • ContentStateToBrushConverter
    • ContentStateToPathDataConverter
    • ContentStateToTextConverter
    • GameTypeInitialConverter
    • IndentToMarginConverter
    • NotEqualToConverter & ComparisonConverters
  • Tests: Added complete unit tests in ImageCacheServiceTests.cs, StripHtmlConverterTests.cs, and StringToImageConverterTests.cs.

Verification

Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs Outdated
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
Comment thread scripts/build-check.ps1
Comment thread GenHub/GenHub/Infrastructure/Converters/StringToImageConverter.cs
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs Outdated
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
Comment thread GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
@community-outpost community-outpost deleted a comment from coderabbitai Bot Aug 19, 2026
@community-outpost community-outpost deleted a comment from deepsource-io Bot Aug 19, 2026
@community-outpost community-outpost deleted a comment from qodo-code-review Bot Aug 19, 2026
@undead2146
undead2146 force-pushed the feat/image-cache-and-converters branch from 1510115 to 93c81c9 Compare August 19, 2026 12:16
@community-outpost community-outpost deleted a comment from qodo-code-review Bot Aug 19, 2026
@community-outpost community-outpost deleted a comment from coderabbitai Bot Aug 19, 2026
@community-outpost community-outpost deleted a comment from deepsource-io Bot Aug 19, 2026
@undead2146
undead2146 force-pushed the feat/image-cache-and-converters branch from 93c81c9 to ba45729 Compare August 20, 2026 21:36
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@undead2146, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 60119e3f-f502-42f4-84d4-5b9e4cfcff27

📥 Commits

Reviewing files that changed from the base of the PR and between 371741c and ba45729.

📒 Files selected for processing (23)
  • GenHub/GenHub.Core/Constants/ImageCacheConstants.cs
  • GenHub/GenHub.Core/Constants/UiConstants.cs
  • GenHub/GenHub.Core/Helpers/HtmlTextHelper.cs
  • GenHub/GenHub.Core/Models/Enums/ContentState.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Converters/StripHtmlConverterTests.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Helpers/HtmlTextHelperTests.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Infrastructure/ApplicationDataPathConventionTests.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Infrastructure/Converters/StringToImageConverterTests.cs
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Infrastructure/Services/ImageCacheServiceTests.cs
  • GenHub/GenHub/Infrastructure/Controls/ImageLoader.cs
  • GenHub/GenHub/Infrastructure/Converters/BoolToBackgroundConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/BoolToBorderConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/ComparisonConverters.cs
  • GenHub/GenHub/Infrastructure/Converters/ContentStateToBrushConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/ContentStateToPathDataConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/ContentStateToTextConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/GameTypeInitialConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/IndentToMarginConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/NotEqualToConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/StringToImageConverter.cs
  • GenHub/GenHub/Infrastructure/Converters/StripHtmlConverter.cs
  • GenHub/GenHub/Infrastructure/Services/ImageCacheService.cs
  • scripts/build-check.ps1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Aug 20, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 371741c...ba45729 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Aug 20, 2026 9:36p.m. Review ↗
JavaScript Aug 20, 2026 9:36p.m. Review ↗
Shell Aug 20, 2026 9:36p.m. Review ↗
Secrets Aug 20, 2026 9:36p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

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