fix: repair app install QR redirects - #603
Merged
Merged
Conversation
Showcase PR deployment URL (Helm release |
Signed-off-by: Emiliano Suñé <2395873+esune@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes the mobile app install QR flow by centralizing App Store / Google Play redirect logic on the server, making the destinations configurable, and updating the frontend/UI and deployment docs to point users at the redirect endpoint.
Changes:
- Added a reusable
getAppStoreRedirectUrlutility with environment-configurable store destinations and unit tests. - Updated the server
${baseRoute}/qrendpoint to support explicitplatform=apple|android(used by store badges) while still UA-detecting for scanned QR codes. - Updated frontend, docs, and Helm chart values to use/configure the redirect endpoint and store URL overrides.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/utils/appStoreRedirect.ts | New server utility to choose the correct store URL (env override + UA detection). |
| server/src/utils/tests/appStoreRedirect.test.ts | Unit tests for redirect selection logic. |
| server/src/index.ts | Refactors /qr route to use shared redirect logic and adds optional platform query. |
| server/.env.example | Documents new APPLE_APP_STORE_URL / ANDROID_APP_STORE_URL overrides. |
| README.md | Updates local/ngrok guidance and documents store URL overrides (currently duplicated paragraph). |
| frontend/src/client/pages/introduction/components/WalletModal.tsx | Store badge links now hit server redirect endpoint with explicit platform. |
| frontend/.env.example | Clarifies that 127.0.0.1 won’t work for phone QR scanning; use LAN/tunnel. |
| DEVELOPER/BC Digital Trust Showcase.md | Adds guidance about frontend-built QR URLs and store redirect configuration. |
| charts/showcase/values.yaml | Adds optional showcase.appStoreUrls values for store destinations. |
| charts/showcase/templates/server/deployment.yaml | Wires optional store destination values into server env vars. |
| charts/showcase/README.md | Documents Helm values for overriding store destinations / existingSecret usage. |
Suppressed comments (1)
frontend/src/client/pages/introduction/components/WalletModal.tsx:93
- The Android badge link and the QR code value still use
baseUrldirectly. IfbaseUrlis relative (e.g.,"/digital-trust/showcase"whenVITE_HOST_BACKENDisn't embedded at build/start time), scanning the QR can result in the camera treating it as plain text instead of navigating. Build the URL vianew URL(..., window.location.origin)so the QR always contains an absolute URL.
<a href={`${baseUrl}/qr?platform=android`} target="_blank" rel="noopener noreferrer">
<img
src={playStore}
style={isMobile() ? { width: '200px' } : { height: '50px' }}
alt="google play store"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Remove duplicated instructions in README Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
esune
enabled auto-merge (squash)
August 25, 2026 20:46
jamshale
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #602