Skip to content

fix: repair app install QR redirects - #603

Merged
esune merged 5 commits into
mainfrom
fix/qr-code-install
Aug 25, 2026
Merged

fix: repair app install QR redirects#603
esune merged 5 commits into
mainfrom
fix/qr-code-install

Conversation

@esune

@esune esune commented Aug 25, 2026

Copy link
Copy Markdown
Member

Resolves #602

@github-actions

Copy link
Copy Markdown
Showcase PR
UI (same host as API) https://pr-603-digital-trust-showcase-dev.apps.silver.devops.gov.bc.ca/digital-trust/showcase

Showcase PR deployment URL (Helm release pr-603-showcase).

Signed-off-by: Emiliano Suñé <2395873+esune@users.noreply.github.com>
@esune esune linked an issue Aug 25, 2026 that may be closed by this pull request
@esune
esune requested review from krobinsonca and a lite review from Copilot August 25, 2026 19:41

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

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 getAppStoreRedirectUrl utility with environment-configurable store destinations and unit tests.
  • Updated the server ${baseRoute}/qr endpoint to support explicit platform=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 baseUrl directly. If baseUrl is relative (e.g., "/digital-trust/showcase" when VITE_HOST_BACKEND isn'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 via new 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.

Comment thread frontend/src/client/pages/introduction/components/WalletModal.tsx Outdated
Comment thread README.md Outdated
esune and others added 3 commits August 25, 2026 12:48
Remove duplicated instructions in README

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@esune
esune enabled auto-merge (squash) August 25, 2026 20:46
@esune
esune merged commit 837130b into main Aug 25, 2026
14 checks passed
@esune
esune deleted the fix/qr-code-install branch August 25, 2026 21:28
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.

QR Code to download the mobile app is incorrect

3 participants