Add store page links to game details - #1795
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds validated store-page targets for Steam, GOG, and Epic. Library screens expose store actions that try native apps, fall back to web URLs, track outcomes, and support copying failed links. ChangesStore page links
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant LibraryScreen
participant BaseAppScreen
participant StorePageLauncher
participant NativeStoreApp
participant Browser
LibraryScreen->>BaseAppScreen: provide store page action
BaseAppScreen->>StorePageLauncher: launch store target
StorePageLauncher->>NativeStoreApp: try native candidate
NativeStoreApp-->>StorePageLauncher: success or launch failure
StorePageLauncher->>Browser: open canonical web URL
Browser-->>StorePageLauncher: success or security failure
StorePageLauncher-->>BaseAppScreen: return launch result
BaseAppScreen-->>LibraryScreen: show action or failure dialog
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/store-details-links.md`:
- Around line 28-30: Update the analytics description in the documentation to
state that the store and launch outcome are recorded, including the failed
outcome emitted by BaseAppScreen, while preserving the exclusions for game IDs,
names, URLs, exception text, and package lists.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 51e993bb-c727-427e-a325-d9e72320ba97
📒 Files selected for processing (14)
app/src/main/java/app/gamenative/store/StorePageLauncher.ktapp/src/main/java/app/gamenative/store/StorePageResolver.ktapp/src/main/java/app/gamenative/store/StorePageTarget.ktapp/src/main/java/app/gamenative/ui/data/AppMenuOption.ktapp/src/main/java/app/gamenative/ui/data/StorePageAction.ktapp/src/main/java/app/gamenative/ui/screen/library/LibraryAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/BaseAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/GOGAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/SteamAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/components/GameOptionsPanel.ktapp/src/main/res/values/strings.xmlapp/src/test/java/app/gamenative/store/StorePageLauncherTest.ktapp/src/test/java/app/gamenative/store/StorePageResolverTest.ktdocs/store-details-links.md
| - When usage analytics are enabled, only the store and successful route type | ||
| are recorded. Game IDs, names, URLs, exception text, and package lists are | ||
| excluded. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document failed launch telemetry.
Line 28 says analytics records only a successful route type. BaseAppScreen.kt:1330-1351 also records route = "failed" after a total launch failure. Update the text to say that the store and launch outcome are recorded, or stop emitting the failed event.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/store-details-links.md` around lines 28 - 30, Update the analytics
description in the documentation to state that the store and launch outcome are
recorded, including the failed outcome emitted by BaseAppScreen, while
preserving the exclusions for game IDs, names, URLs, exception text, and package
lists.
There was a problem hiding this comment.
1 issue found across 14 files
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/store/StorePageResolver.kt">
<violation number="1" location="app/src/main/java/app/gamenative/store/StorePageResolver.kt:34">
P3: The GOG and Epic resolvers duplicate the same slug normalization and validation logic, so any allow-list or normalization fix must be applied in two places and can drift between providers; a private shared validated-slug helper would keep this behavior consistent.
(Based on your team's feedback about centralizing shared logic.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| fun gog(slug: String): StorePageTarget? { | ||
| val normalizedSlug = slug.trim().lowercase(Locale.ROOT) |
There was a problem hiding this comment.
P3: The GOG and Epic resolvers duplicate the same slug normalization and validation logic, so any allow-list or normalization fix must be applied in two places and can drift between providers; a private shared validated-slug helper would keep this behavior consistent.
(Based on your team's feedback about centralizing shared logic.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/src/main/java/app/gamenative/store/StorePageResolver.kt, line 34:
<comment>The GOG and Epic resolvers duplicate the same slug normalization and validation logic, so any allow-list or normalization fix must be applied in two places and can drift between providers; a private shared validated-slug helper would keep this behavior consistent.
(Based on your team's feedback about centralizing shared logic.) </comment>
<file context>
@@ -0,0 +1,54 @@
+ }
+
+ fun gog(slug: String): StorePageTarget? {
+ val normalizedSlug = slug.trim().lowercase(Locale.ROOT)
+ if (!gogSlugPattern.matches(normalizedSlug)) return null
+
</file context>
signal-2026-08-06-22-02-18-187.mp4 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/test/java/app/gamenative/store/StorePageLauncherTest.kt (1)
74-90: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert that the browser intent is attempted.
This test does not record the intents. A launcher that returns
Failedwithout attempting the browser would still pass. Record each intent and assert that the final intent usestarget.canonicalWebUrl.The launcher contract in
app/src/main/java/app/gamenative/store/StorePageLauncher.kt:9-47attempts native candidates before the browser.Proposed test improvement
fun `browser security rejection returns copyable canonical url`() { val target = steamTarget() + val intents = mutableListOf<Intent>() val result = StorePageLauncher.launch(context, target) { intent -> + intents += intent if (intent.data?.scheme == "steam") { throw ActivityNotFoundException() } throw SecurityException() } assertTrue(result is StorePageLaunchResult.Failed) + assertEquals(target.canonicalWebUrl, intents.last().dataString) assertEquals( target.canonicalWebUrl, (result as StorePageLaunchResult.Failed).canonicalWebUrl,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/test/java/app/gamenative/store/StorePageLauncherTest.kt` around lines 74 - 90, The test `browser security rejection returns copyable canonical url` must record the intents passed to `StorePageLauncher.launch` and assert that the final browser intent uses `target.canonicalWebUrl`, while preserving the existing native-candidate rejection behavior and failure-result assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/src/test/java/app/gamenative/store/StorePageLauncherTest.kt`:
- Around line 74-90: The test `browser security rejection returns copyable
canonical url` must record the intents passed to `StorePageLauncher.launch` and
assert that the final browser intent uses `target.canonicalWebUrl`, while
preserving the existing native-candidate rejection behavior and failure-result
assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 5f1b18d0-aa09-417b-83d7-5da763219861
📒 Files selected for processing (5)
app/src/main/java/app/gamenative/ui/data/GameDisplayInfo.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/BaseAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/GOGAppScreen.ktapp/src/main/java/app/gamenative/ui/screen/library/appscreen/SteamAppScreen.ktapp/src/test/java/app/gamenative/store/StorePageLauncherTest.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- app/src/main/java/app/gamenative/ui/screen/library/appscreen/SteamAppScreen.kt
|
Hey @jmarti326 - what's the use case you have in mind here? Why would users want to check the store page for games they own? |

Description
Adds a simple "View on Store" action to game details and the options menu.
Steam tries the Android app first and falls back to the web page. GOG opens its web page. Epic and Amazon stay disabled until they have reliable product links.
I added focused tests for link building and fallback behavior.
Recording
signal-2026-08-06-22-02-18-187.mp4
Screenshot
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Add an “Open store page” action in game details and the Options menu. Supports Steam (native app with web fallback) and GOG (web); Epic and Amazon remain disabled until we have reliable product links.
New Features
PostHogcapturestore_page_openedwith store and route (native/web/failed).Bug Fixes
Written for commit 7e554ac. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes