Skip to content

issue #572 if a image or capsule banner is missing, display game icon…#657

Open
falconxcode wants to merge 1 commit intoutkarshdalal:masterfrom
falconxcode:patch-1
Open

issue #572 if a image or capsule banner is missing, display game icon…#657
falconxcode wants to merge 1 commit intoutkarshdalal:masterfrom
falconxcode:patch-1

Conversation

@falconxcode
Copy link

@falconxcode falconxcode commented Feb 26, 2026

… as fallback


Summary by cubic

Show the game’s client icon when capsule, header, or hero images are missing, so Library tiles never appear blank. Addresses issue #572.

  • Bug Fixes
    • Added client icon fallback for GRID_CAPSULE and GRID_HERO when SteamGridDB or header/capsule is missing.
    • Steam: header now falls back to hero, then to client icon.
    • GOG/Epic/Amazon: iconHash now falls back to the client icon.

Written for commit 53eee2f. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Improved image display consistency across game library views with enhanced fallback handling
    • Custom games in grid view now display optimized images when available
    • Enhanced image fallback behavior for games from all platforms, reducing missing image issues

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

The changes modify image URL fallback logic in LibraryAppItem.kt to consistently use appInfo.clientIconUrl as a fallback instead of empty strings across different pane types and app sources, and adjust the image selection chain for various scenarios.

Changes

Cohort / File(s) Summary
Image Fallback Chain Updates
app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt
Modified image URL pair selection across multiple branches: CUSTOM_GAME now uses SteamGridDB images when available with clientIconUrl fallbacks; STEAM/GOG/EPIC/AMAZON sources updated to use clientIconUrl instead of empty strings; non-grid panes now prefer heroImageUrl→clientIconUrl fallback chain instead of empty values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 When image URLs fade into the night,
We bundle fallbacks, oh what a sight!
ClientIcon hops in to save the day,
No empty strings, just images on display! 🖼️✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: using game icon as a fallback when images/banners are missing, which matches the file changes and PR objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt`:
- Around line 267-274: The STEAM branch in LibraryAppItem (when paneType !=
PaneType.GRID_CAPSULE) sets headerImageUrl to fall back to heroImageUrl but
currently stops if heroImageUrl fails to load; update the fallback logic so
clientIconUrl is always the ultimate fallback. In practice, change the value
selection for the non-GRID_CAPSULE case to produce a fallback chain (e.g., a
list or tuple containing headerImageUrl then heroImageUrl then clientIconUrl)
and modify the onFailure handler in the same component to iterate through those
fallbacks (attempt heroImageUrl then clientIconUrl) before showing the text
overlay, referencing the existing paneType, GameSource.STEAM,
appInfo.headerImageUrl, appInfo.heroImageUrl, appInfo.clientIconUrl, and the
onFailure handler.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 761d93b and 53eee2f.

📒 Files selected for processing (1)
  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt">

<violation number="1" location="app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt:272">
P1: Steam hero images fail to display game icon as ultimate fallback when heroImageUrl fails. The current implementation only supports a single level of fallback. When both headerImageUrl and heroImageUrl fail, clientIconUrl is never attempted.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@utkarshdalal
Copy link
Owner

@silentrald - can you check this one since it's touching the code you added

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.

2 participants