Skip to content

fix(dashpay): sign in to an app from the Home Scan shortcut - #1237

Open
llbartekll wants to merge 2 commits into
qa/yappr-loginfrom
fix/yappr-home-scan-dashconnect
Open

llbartekll wants to merge 2 commits into
qa/yappr-loginfrom
fix/yappr-home-scan-dashconnect

Conversation

@llbartekll

Copy link
Copy Markdown
Contributor

Summary

Scanning a Yappr login QR with the Home Scan QR shortcut failed with "Not a Dash QR code". Users had to know to open More → Connections and scan from there. Two commits fix this, on top of the commit TestFlight 9.1.4 (12) was built from:

  1. Open DashConnect codes from the Home scanner. The scan model recognizes a dash-key: / dash-st: code before the payment parse and hands it to Home, which opens the Connections screen with it.
  2. Treat a Home-scanned code as a scan, and say where to go next.
    • The first commit routed the code through the deep-link path, so App Connect treated it as an on-device link and opened the app's callback in the browser after approval. The code now goes in as a scan.
    • A scanned approval that finishes the sign-in ends with "Connected to Yappr. Go back to your browser to continue."

Changes

  • DWQRScanModel: the new optional delegate method qrScanModel:didScanDashConnectURI: receives a DashConnect URI before the payment parse. Delegates that don't implement it keep the old behavior, so the lock screen and the Send / Enter Address scanners still say "Not a Dash QR code".
  • DashConnectDeepLink.uriFromString:: the deep link and the scanner share one scheme check.
  • HomeViewController → MainTabbarController.openDashConnect(_:scanned: true) → DashConnectHostingController remembers that the code was scanned and calls ConnectionsViewModel.onQRScanned. Links still call onURIReceived, so a link still returns through its callback.
  • AppConnect.Login.signsInAtApproval: true for oneQR and appConnect, false for twoQR, unresolved and refused. The two-QR login still waits for the app's key-registration code, so it gets no "Connected" message.
  • ConnectionsViewModel.approvePendingRequest: shows the "Connected to %@" success alert only when the login signs in at approval and the request did not arrive by link.
  • The new string is added to all 43 Localizable.strings catalogs, in English, after "Connected since %@".

Testing

  • iPhone 13 Pro, testnet, this branch (the 9.1.4 (12) source c0b97f9ac + these two commits, platform b8b5627910):
    • Yappr staging App Connect v2 QR → Home Scan shortcut → approval sheet → Approve.
    • The browser does not open, the "Connected to Yappr…" alert appears, and Yappr signs in.
  • Before commit 2 on the same build, approving opened the callback in the browser.
  • Unit tests:
    • New: DashConnectUriTests (scanned string accepts both schemes and rejects payment codes) and testOnlyTheOneQrLoginSignsInAtApproval.
    • Commit 1's DashConnectUriTests passed locally on a develop-based build.
    • Not run locally on this base: there's no simulator slice of b8b5627910 here, so this is left to CI.
  • Base: branched from c0b97f9ac (the TestFlight 9.1.4 (12) commit). A trial merge into the current qa/yappr-login (653a47d23) is clean.

Related: #1236 has commit 1 against feat/app-connect-request-v2 (#1204).

🤖 Generated with Claude Code

llbartekll and others added 2 commits October 21, 2026 15:42
The Scan shortcut's scanner only understood payment codes, so a
dash-key: / dash-st: QR was rejected as "Not a Dash QR code". The scan
model now hands a DashConnect URI to a delegate that implements the new
optional qrScanModel:didScanDashConnectURI:, before the payment parse.
Only Home implements it, and routes the code to the Connections screen
the same way a tapped DashConnect link does. The Send and lock-screen
scanners are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o go next

A code from the Home scanner reached the Connections screen through the
deep-link path, so App Connect treated it as an on-device link and opened
the app's callback in the browser after approval. The hosting controller
now remembers that the code was scanned and hands it to onQRScanned; a
tapped link still goes through onURIReceived.

An approval that finishes the sign-in (the one-QR login or App Connect v2)
of a scanned request now ends with "Connected to <app>. Go back to your
browser to continue." A link returns through its callback instead, and the
two-QR login still waits for the app's key-registration code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9dabde6e-bfbe-44b5-b5e8-b4db1508d2e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 916956c) · triage: normal

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

Static verification of c0b97f9..916956c confirms the Home scanner handoff, scan-versus-link provenance, callback suppression, and two-QR exclusion; no blocking defect was identified. The two reviewers' overlapping test-coverage suggestions are combined into one non-blocking finding. Current CI shows the simulator tests pending and accessibility and test-target membership checks passing; the supplied clean-merge evidence and inspected base changes show no superseding implementation.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — The change spans scanner delegation, navigation, scan-versus-link routing, and approval feedback, but does not alter cryptography, key handling, or funds movement.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift`:
- [SUGGESTION] DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift:242-249: Cover the scan-only success message with approval regression tests
  The new success message depends on both the approved login kind and whether the request arrived by scan or link, but no test asserts this behavior. The callback tests only inspect opened URLs, and testOnlyTheOneQrLoginSignsInAtApproval covers oneQR, twoQR, and unresolved while omitting appConnect and refused. Extend the existing LoginApprovalSpy-based tests to verify that successful scanned oneQR and appConnect approvals publish a success message containing the app label, linked and twoQR approvals do not publish that message, and failed approvals do not report success. Complete the classification assertions for appConnect and refused as well. This protects the PR's new user-visible behavior without introducing new test infrastructure.

Comment on lines +242 to +249
if consent.login.signsInAtApproval, !pendingRequestArrivedByLink {
message = ConnectionsScreenMessage(
kind: .success,
text: String(
format: NSLocalizedString(
"Connected to %@. Go back to your browser to continue.",
comment: "DashConnect: a sign-in finished at approval; the placeholder is the app's name"),
consent.appLabel)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Suggestion: Cover the scan-only success message with approval regression tests

The new success message depends on both the approved login kind and whether the request arrived by scan or link, but no test asserts this behavior. The callback tests only inspect opened URLs, and testOnlyTheOneQrLoginSignsInAtApproval covers oneQR, twoQR, and unresolved while omitting appConnect and refused. Extend the existing LoginApprovalSpy-based tests to verify that successful scanned oneQR and appConnect approvals publish a success message containing the app label, linked and twoQR approvals do not publish that message, and failed approvals do not report success. Complete the classification assertions for appConnect and refused as well. This protects the PR's new user-visible behavior without introducing new test infrastructure.

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general)

This branch has not been deployed

No deployments
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.

2 participants