Skip to content

Add dApp load failure and retry states#67

Open
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:codex/dapp-load-state
Open

Add dApp load failure and retry states#67
Jim8y wants to merge 3 commits into
neoorder:masterfrom
Jim8y:codex/dapp-load-state

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add explicit loading, failure, and retry states around the dApp WebView runtime page.
  • Keep the existing wallet bridge and navigation policy intact while making network/runtime failures recoverable in-app.
  • Add localized resources for the new dApp loading error copy.

Validation

  • dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -p:AndroidSdkDirectory=/opt/homebrew/share/android-commandlinetools -p:EmbedAssembliesIntoApk=true
  • dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -p:RuntimeIdentifier=iossimulator-arm64 -p:CodesignKey=- -p:CodesignProvision=
  • iOS and Android simulator screenshots will be posted in a PR comment before marking ready for review.

Notes

  • Scope is intentionally limited to dApp runtime load/error/retry UI.
  • No changes to wallet signing, permissions, dAPI, or dApp catalog behavior.

@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Simulator validation completed for this PR.

Validation run:

  • iOS build passed: dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -p:RuntimeIdentifier=iossimulator-arm64 -p:CodesignKey=- -p:CodesignProvision= (3 existing NU1903 SQLite warnings, 0 errors).
  • Android build passed: RuntimeIdentifiers=android-arm64;android-x64 dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -p:AndroidSdkDirectory=/opt/homebrew/share/android-commandlinetools -p:EmbedAssembliesIntoApk=true (9 existing NU1903 SQLite warnings, 0 errors).
  • iOS Simulator: installed and launched on iPhone 17 Pro / iOS 26.5, launch returned PID 92969.
  • Android Emulator: installed and launched on emulator-5554, app PID 10607, crash buffer empty.

Screenshots:

iOS simulator

Android emulator

@Jim8y Jim8y marked this pull request as ready for review June 22, 2026 02:44
Copilot AI review requested due to automatic review settings June 22, 2026 02:44

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 explicit loading and load-failure UI states to the dApp runtime WebView so users can retry without leaving the page, and introduces new localized string resources to support the new error/retry copy.

Changes:

  • Add loading overlay, load-failure overlay, and retry button to LaunchDAppPage around the dApp WebView lifecycle.
  • Track dApp load state and errors in LaunchDAppPage.xaml.cs and surface them via bindings.
  • Add new resource keys (DAppLoadFailed, DAppLoadFailedText, Retry) across localization files and update the generated Strings.Designer.cs.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
OneGateApp/Pages/LaunchDAppPage.xaml.cs Adds loading/error/retry state management for WebView navigation and formats error copy.
OneGateApp/Pages/LaunchDAppPage.xaml Wraps WebView with loading and error overlays and wires up retry UX.
OneGateApp/Properties/Strings.resx Adds base (English) strings for dApp load failure and retry.
OneGateApp/Properties/Strings.Designer.cs Adds generated strongly-typed accessors for the new string keys.
OneGateApp/Properties/Strings.de.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.es.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.fr.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.id.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.it.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.ja.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.ko.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.nl.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.pt-BR.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.ru.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.tr.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.vi.resx Adds localized keys for new dApp load failure UI (currently English values).
OneGateApp/Properties/Strings.zh-Hans.resx Adds Simplified Chinese strings for dApp load failure and retry.
OneGateApp/Properties/Strings.zh-Hant.resx Adds Traditional Chinese strings for dApp load failure and retry.
Files not reviewed (1)
  • OneGateApp/Properties/Strings.Designer.cs: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread OneGateApp/Pages/LaunchDAppPage.xaml.cs Outdated
{
string appName = DApp?.NameLocalizer.Localize() ?? GetHostOrUrl(failedUrl);
DAppLoadErrorTitle = Strings.DAppLoadFailed;
DAppLoadErrorMessage = string.Format(Strings.DAppLoadFailedText, appName, result);
Comment thread OneGateApp/Properties/Strings.es.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.de.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.fr.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.id.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.nl.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.ru.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.tr.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
Comment thread OneGateApp/Properties/Strings.vi.resx Outdated
Comment on lines +698 to +702
<data name="DAppLoadFailed" xml:space="preserve">
<value>DApp did not load</value>
</data>
<data name="DAppLoadFailedText" xml:space="preserve">
<value>{0} could not be loaded. Check your connection and try again. Status: {1}</value>
@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Review feedback fixes pushed in 9c48987.

Validation after the update:

  • Android: dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -c Debug -p:AndroidSdkDirectory=/opt/homebrew/share/android-commandlinetools -p:JavaSdkDirectory=/opt/homebrew/Cellar/openjdk@17/17.0.19/libexec/openjdk.jdk/Contents/Home -p:EmbedAssembliesIntoApk=true passed with existing SQLitePCLRaw NU1903 warnings only.
  • Android emulator: installed with adb install --no-incremental, launched on emulator-5554, PID 14126, AndroidRuntime crash buffer empty.
  • iOS: DEVELOPER_DIR=/Applications/Xcode-26.5.0.app/Contents/Developer dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -c Debug -p:RuntimeIdentifier=iossimulator-arm64 -p:CodesignKey=- -p:CodesignProvision= -p:ProvisioningType=automatic passed with existing SQLitePCLRaw NU1903 warnings only.
  • iOS Simulator: installed and launched on iPhone 17 Pro / iOS 26.5, PID 31430.

Screenshots:

iOS simulator

Android emulator

@Jim8y

Jim8y commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Game-load follow-up pushed in 7326d43.

What changed:

  • Added a lightweight post-navigation “Preparing DApp” hint so heavy game dApps no longer look blank while their own assets continue initializing.
  • On Android, in-app dApp/game launches now route through the existing Shell launch route instead of starting a separate DocumentLinkActivity; external app links and home-screen shortcuts still keep the document activity behavior.
  • This removes the focus-change ANR path seen when Chromium/WebView cold-started while the previous MainActivity was being backgrounded.

Validation:

  • git diff --check passed.
  • Resource key parity checked: every Strings*.resx file has 292 keys.
  • Android restore/build passed for net10.0-android / android-arm64 with the existing SQLitePCLRaw NU1903 warning only.
  • Android emulator emulator-5554: installed, launched, opened Gaming -> Pixudi. After the fixed launch path, logcat from 06-23 12:58:46 showed no DocumentLinkActivity, no ANR, and no input-dispatch timeout. Latest /data/anr file remained the older 12:44 run.
  • iOS restore/build passed for net10.0-ios / iossimulator-arm64 with the existing SQLitePCLRaw NU1903 warning only.
  • iOS Simulator OneGate-PR51-iPhone17 / iOS 26.5: installed, launched, opened Gaming -> Pixudi, and verified the dApp content renders and remains stable.

Screenshots:

Android 3s:
Android Pixudi 3s

Android 15s:
Android Pixudi 15s

iOS 3s:
iOS Pixudi 3s

iOS 15s:
iOS Pixudi 15s

Note: Pixudi still logs an upstream AxiosError: Request failed with status code 401 from https://game.pixudi.com/. This PR fixes the OneGate container loading/Android launch-path issue, but Pixudi wallet/provider adaptation still needs a dApp-side or provider-compat follow-up.

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