Skip to content

Show game download status - #103

Open
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:agent/gaming-download-status
Open

Show game download status#103
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:agent/gaming-download-status

Conversation

@Jim8y

@Jim8y Jim8y commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • show a compact spinner while a game is loading for the first time
  • show a small green check badge after the current catalog version and URL load successfully
  • persist successful-load receipts locally and invalidate them when a game's version or URL changes
  • expose localized, accessible status text for required, downloading, and downloaded states

Why

OneGate games are HTTPS WebView DApps; the catalog does not expose a native package or installer. This PR therefore treats a successful top-level WebView navigation as the honest local download/cache receipt instead of inferring state from recently played games.

Games that have not loaded successfully remain visually unmarked. A successful receipt is shown in search results, Recently played, and the main game list. Failed or abandoned first loads return to the required state.

Validation

  • Android net10.0-android build: 0 warnings, 0 errors
  • iOS Simulator net10.0-ios/iossimulator-arm64 build: 0 warnings, 0 errors
  • Debug protocol tests: 6/6 passed
  • all localized .resx files parse as XML and have matching unique key sets
  • iPhone 17 Pro / iOS 26.5: verified unmarked required state, successful Pixudi load, green check in Recently played and the main list, and persistence across app restart
  • Android API 36: APK installed and cold-launched with an empty crash buffer; the AVD currently has no QA wallet, so the authenticated Games screen was not traversed and no wallet terms were accepted on the user's behalf

Simulator screenshots are kept outside the repository and will be attached as external GitHub assets.

@Jim8y
Jim8y force-pushed the agent/gaming-download-status branch from 5592e17 to fd966c1 Compare August 8, 2026 09:45

Jim8y commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Simulator validation

Validation head: fd966c1 (rebased onto current master at 8420b3e).

iOS Simulator

Verified on iPhone 17 Pro / iOS 26.5:

  • games without a successful local load remain unmarked
  • Pixudi records a receipt only after its top-level WebView navigation succeeds
  • the green check appears in both Recently played and the main game list
  • the downloaded state persists after terminating and relaunching OneGate

iOS game download status

The screenshot is an external GitHub Release asset and is not committed to the repository.

Android Emulator

The Android Debug APK built with 0 warnings/errors, installed on API 36, and cold-launched with an empty crash buffer. That AVD currently has no QA wallet and stops at wallet import, so I did not accept wallet terms on the user's behalf or attach a non-feature screenshot.

@Jim8y
Jim8y marked this pull request as ready for review August 8, 2026 09:59
Copilot AI lite review requested due to automatic review settings August 8, 2026 09:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a persisted “download status” concept for WebView-based games, treating a successful first navigation as the local “download receipt” so lists/search can show loading and downloaded indicators.

Changes:

  • Introduces GameDownloadStatusService to persist and apply per-game receipts (version + URL) and to track in-session “downloading” state.
  • Updates game launch flow to mark a game as downloading on open, and as downloaded on successful in-domain navigation.
  • Exposes localized, bindable status state on DApp and wires UI templates to show a spinner/check badge plus accessible hint text.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
OneGateApp/Services/GameDownloadStatusService.cs New service for tracking/persisting game download receipts and in-session download state.
OneGateApp/Data/DApp.cs Adds DownloadStatus + derived bindable properties and introduces GameDownloadStatus enum.
OneGateApp/Pages/LaunchDAppPage.xaml.cs Marks games downloading/downloaded based on WebView navigation lifecycle.
OneGateApp/Pages/LaunchDAppPage.xaml Wires Navigated event to support download receipt updates.
OneGateApp/Pages/GamingPage.xaml.cs Applies persisted statuses when games load and when the page appears.
OneGateApp/Pages/GamingPage.xaml Displays spinner/check badge and exposes status text via semantic hint in templates.
OneGateApp/MauiProgram.cs Registers GameDownloadStatusService in DI.
OneGateApp/Properties/Strings.resx Adds base localized strings for required/downloading/downloaded status text.
OneGateApp/Properties/Strings.de.resx Adds German localized download status strings.
OneGateApp/Properties/Strings.es.resx Adds Spanish localized download status strings.
OneGateApp/Properties/Strings.fr.resx Adds French localized download status strings.
OneGateApp/Properties/Strings.id.resx Adds Indonesian localized download status strings.
OneGateApp/Properties/Strings.it.resx Adds Italian localized download status strings.
OneGateApp/Properties/Strings.ja.resx Adds Japanese localized download status strings.
OneGateApp/Properties/Strings.ko.resx Adds Korean localized download status strings.
OneGateApp/Properties/Strings.nl.resx Adds Dutch localized download status strings.
OneGateApp/Properties/Strings.pt-BR.resx Adds Brazilian Portuguese localized download status strings.
OneGateApp/Properties/Strings.ru.resx Adds Russian localized download status strings.
OneGateApp/Properties/Strings.tr.resx Adds Turkish localized download status strings.
OneGateApp/Properties/Strings.vi.resx Adds Vietnamese localized download status strings.
OneGateApp/Properties/Strings.zh-Hans.resx Adds Simplified Chinese localized download status strings.
OneGateApp/Properties/Strings.zh-Hant.resx Adds Traditional Chinese localized download status strings.
OneGateApp/Properties/Strings.Designer.cs Exposes new localized keys via the generated designer.
Files not reviewed (1)
  • OneGateApp/Properties/Strings.Designer.cs: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +59 to +66
try
{
receipts ??= await dbContext.Settings.GetAsync<Dictionary<int, GameDownloadReceipt>>(SettingsKey) ?? [];
}
finally
{
initializationLock.Release();
}
Comment on lines +44 to +46
if (receiptChanged)
await dbContext.Settings.PutAsync(SettingsKey, receipts);
}
Comment on lines +265 to +278
async void OnNavigated(object sender, WebNavigatedEventArgs e)
{
if (DApp is not { IsGamingApp: true } || !Uri.TryCreate(e.Url, UriKind.Absolute, out var uri))
return;

Uri gameUri = new(DApp.Url);
if (uri.Scheme == "about" || IsCrossDomain(gameUri, uri))
return;

if (e.Result == WebNavigationResult.Success)
await gameDownloadStatusService.MarkDownloadedAsync(DApp);
else
gameDownloadStatusService.ResetDownloading(DApp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants