Skip to content

fix(xpub): keep the extended public key QR dark-on-light in dark mode - #1622

Closed
HashEngineering wants to merge 1 commit into
feat/kotlin-sdk-phase-1from
fix/xpub-qr-dark-mode
Closed

HashEngineering wants to merge 1 commit into
feat/kotlin-sdk-phase-1from
fix/xpub-qr-dark-mode

Conversation

@HashEngineering

@HashEngineering HashEngineering commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

ExtendedPublicKeyDialog tinted its QR with LocalDashColors.current.textPrimary. Qr.qrBitmap() returns an ALPHA_8 mask with zero margin, so in dark mode the code rendered as light modules on the dark sheet with no quiet zone. Many external scanners reject an inverted code like that, which breaks the extended public key export. The reviewer found this on #1620.

Fix

The QR is now drawn black inside a white 12dp quiet zone in every theme, with the same overall 180dp footprint (156dp code plus padding). This is the same fix #1620 applied to the shielded receive QR.

Testing

  • :wallet:compile_testNet3DebugKotlin passes.
  • Not yet checked on a device: needs a visual check plus a scan of the exported xpub QR in dark mode.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated the extended public key QR code to display black modules on a white, rounded background with 12 dp of padding.
    • Reduced the QR code display size from 180 dp to 156 dp. Its appearance no longer changes with the app’s primary text color.

The export QR tinted its margin-less ALPHA_8 mask with textPrimary, so in
dark mode it rendered light modules on the dark sheet with no quiet
zone — an inverted code many scanners reject. Draw it black inside a
white 12dp quiet zone regardless of theme (same 180dp footprint), the
same fix as the shielded receive QR in #1620.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: dashpay/dash-wallet/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5dff4e23-63bf-4345-a072-159767027193
📥 Commits

Reviewing files that changed from the base of the PR and between b8ab079 and f73745a.

📒 Files selected for processing: 1
  • wallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.kt

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The extended public key dialog displays a 156 dp black-tinted QR image inside a white rounded container with 12 dp of padding.

Changes: QR presentation

Layer / File(s) Summary
QR image styling
wallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.kt
The QR image is 156 dp and black-tinted. A white rounded container with 12 dp of padding surrounds it. The 30 dp vertical padding remains.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f7374

The QR now remains black on white in dark mode while retaining the stated overall footprint. No concrete user-impacting regression is established, so merge risk is minimal.

Pre-merge checks: Passed 2 · Failed 3

Failed Failed checks: 3 warnings

Check name Status Explanation Resolution
Linked Issues check Warning Issue #1620 is active and directly linked. It requires ShieldedBalanceActivity and PaymentsInternalFragment to use DashWalletTheme, and it requires the shielded transfer screens and Internal tab… Implement the #1620 host and component changes in this PR, or remove the direct link to #1620 and link the issue that defines the xpub QR requirement.
Out of Scope Changes check Warning The xpub QR change is outside issue #1620. That issue covers dark mode for internal transfer screens, related transfer sheets and dialogs, and excludes CoinJoin migration screens. `ExtendedPublicKeyDi… Move the xpub QR change to a PR with an appropriate xpub-export issue, or add a directly stated #1620 requirement that covers this dialog and implement the complete #1620 scope here.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 2 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: keeping the extended public key QR dark-on-light in dark mode.
Full details: Linked Issues check

Explanation

Issue #1620 is active and directly linked. It requires ShieldedBalanceActivity and PaymentsInternalFragment to use DashWalletTheme, and it requires the shielded transfer screens and Internal tab card to use LocalDashColors.current. The reviewed PR evidence covers only ExtendedPublicKeyDialog.kt and its xpub QR. It does not implement the required internal-transfer screen migration.

Full details: Out of Scope Changes check

Explanation

The xpub QR change is outside issue #1620. That issue covers dark mode for internal transfer screens, related transfer sheets and dialogs, and excludes CoinJoin migration screens. ExtendedPublicKeyDialog is not an internal transfer component, and the PR provides no concrete connection between the xpub export dialog and the issue requirements.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit f73745a) · triage: low

@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

Verified the single-file diff at f73745a against the shared QR encoder and surrounding dialog code. The change renders the QR mask black on white with 12dp padding, preserves the overall 180dp footprint and existing export behavior, and introduces no confirmed in-scope defects. The supplied exact-head CI snapshot reports successful build and check jobs; this verification was static, and device-level dark-mode scanning remains unverified.

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); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained UI rendering change that fixes QR contrast and padding without changing key handling or export data.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 90% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer

@HashEngineering

Copy link
Copy Markdown
Collaborator Author

not sure if we need this, not in the designs.

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