Repository navigation
refactor(dashconnect): drop the hardcoded app brand map - #1323
romchornyi wants to merge 1 commit into
Conversation
The wallet named one app itself: Yappr's mainnet contract id mapped to
"Yappr" and yap.pr. Every other app was named by its request's label or
its contract owner's username, and the v2 approve sheet warned only for
those. Android keeps no such map.
Now no app is special:
- a one-QR or v1 request is named by its label until Platform gives the
contract owner's username, and has no website;
- the v2 sheet always says the wallet cannot confirm the app's name or
where the request came from, and "Only approve if you just started
signing in on" names the callback host or the app's name;
- the two warnings only a known app could get ("does not return to",
"would return to") are gone, with their strings in all 43 catalogs
(bartycrouch update).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
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. |
|
✅ Final review complete — no blockers (commit 6a5a428) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
At head 6a5a428, the brand-map removal is consistent across metadata resolution and the approval sheet; no blocking behavioral or security defects were confirmed. Two non-blocking items remain: comments describing the removed branding mechanism and a PR-title scope rejected by the configured workflow. Validation was static only; current CI shows simulator tests, test-target membership, and accessibility checks passing, with PR-title validation failing.
🟡 2 suggestion(s)
2 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Update comments that still describe contract-specific branding
DashWalletTests/DashConnect/DashConnectDataSourceTests.swift:228-229
This comment and the MARK at line 208 still say branding follows the contract id, but this PR removes that mechanism: ConnectionRequest now uses the supplied label and an empty website for every contract. The same drift appears in DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift:125–126, where the mock claims its contract resolves to Yappr branding even though sampleRequest now displays "Login to Yappr" with no website. Update these comments together to describe the label-only fallback. This is directly affected documentation, not unrelated cleanup, and leaving it contradicts the project's guardrail that comments describe implemented behavior.
/// A QR may claim any label it likes. The fallback displays that label
/// as given and assigns no website, regardless of the contract id.
source: glm-5.3-flash (phase1-reviewer: general)
🟡 Suggestion: Use an allowed scope in the PR title
.github/workflows/semantic-pull-request.yml:42-54
The current title, "refactor(dashconnect): drop the hardcoded app brand map", uses a scope absent from this workflow's allowed list. The failed log for run 42613256712 explicitly reports Unknown scope "dashconnect", and the current PR check still fails for that reason. Retitle the PR to use an existing scope, such as "refactor(dashpay): drop the hardcoded app brand map". No workflow change is needed unless maintainers explicitly want to introduce a new allowed scope.
source: glm-5.3-flash (phase1-reviewer: general)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — The change is a small, contained removal of hardcoded branding and conditional approval warnings, with mechanical localization cleanup and no changes to signing, key handling, or request acceptance. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 98% left, weekly 100% left; passed overgemini-3.8-flash-high(antigravity quota lookup failed) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort medium); agentphase2-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 `DashWalletTests/DashConnect/DashConnectDataSourceTests.swift`:
- [SUGGESTION] DashWalletTests/DashConnect/DashConnectDataSourceTests.swift:228-229: Update comments that still describe contract-specific branding
This comment and the MARK at line 208 still say branding follows the contract id, but this PR removes that mechanism: ConnectionRequest now uses the supplied label and an empty website for every contract. The same drift appears in DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift:125–126, where the mock claims its contract resolves to Yappr branding even though sampleRequest now displays "Login to Yappr" with no website. Update these comments together to describe the label-only fallback. This is directly affected documentation, not unrelated cleanup, and leaving it contradicts the project's guardrail that comments describe implemented behavior.
In `.github/workflows/semantic-pull-request.yml`:
- [SUGGESTION] .github/workflows/semantic-pull-request.yml:42-54: Use an allowed scope in the PR title
The current title, "refactor(dashconnect): drop the hardcoded app brand map", uses a scope absent from this workflow's allowed list. The failed log for run 42613256712 explicitly reports `Unknown scope "dashconnect"`, and the current PR check still fails for that reason. Retitle the PR to use an existing scope, such as "refactor(dashpay): drop the hardcoded app brand map". No workflow change is needed unless maintainers explicitly want to introduce a new allowed scope.
|
Closing as superseded by #1278: its approve-sheet redesign removes the same brand map ( The bot's suggestion about comments that still describe contract-based branding is carried over to #1278 (the sample request comment in |
Issue being fixed or feature implemented
The wallet carried a brand map with one entry: Yappr's mainnet contract id → "Yappr",
yap.pr(#909). It made one app special: its one-QR and v1 requests were named "Yappr" whatever their label said, and its App Connect v2 requests (#1210) got a different warning on the approve sheet from every other app. Android keeps no such map. The wallet should not decide which apps it knows by a list in its own code.What was done?
DashConnectFallbackAppMetadatakeeps no list: an app is named by its request's label until Platform gives the contract owner's username (as before for every app but Yappr), and has no website.GrantPlan.brandHost,AppConnect.OriginWarning,originWarningandisHostare gone. The approve sheet always shows "This wallet does not know this app, so it cannot confirm the name shown or where the request came from.", which is what it already showed for every app except Yappr's mainnet contract. "Only approve if you just started signing in on %@." names the callback host, or the app's name when there is none.bartycrouch update: 258 lines out, nothing else changed.How Has This Been Tested?
DashWalletTestsDashConnect classes (AppConnectV2LoginTests, DashConnectDataSourceTests, DashConnectStoreTests, DashConnectUriTests, KeyExchangeCryptoTests, LoginKeyDerivationTests, PlatformDashConnectDataSourceTests, Secp256k1Tests) on an iPhone simulator: 195 tests, 0 failures.testBrandingResolvesKnownContractRegardlessOfLabelbecomestestNoContractHasBrandingOfItsOwn: Yappr's mainnet contract is named by the label and has no website. The test of the removed origin warnings is removed with them.dashconnect_v2_approve_sheet_deny) already runs against Yappr's testnet contract, which was never in the map, so its sheet is the one every app now gets.scripts/a11y_audit.py --check: no new findings.Breaking Changes
None. Stored connections keep their names; only a newly resolved Yappr request is named by its label or owner's username instead of "Yappr".
Checklist:
no significant decision🤖 Generated with Claude Code