Skip to content

fix(shielded): dark mode on the internal transfer screens - #1620

Merged
HashEngineering merged 3 commits into
feat/kotlin-sdk-phase-1from
fix/dark-mode-internal-transfer
Oct 15, 2026
Merged

HashEngineering merged 3 commits into
feat/kotlin-sdk-phase-1from
fix/dark-mode-internal-transfer

Conversation

@HashEngineering

@HashEngineering HashEngineering commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

MO-1099: in v12.0.0-beta, the internal transfer screens have no dark mode.

Cause

The shielded screens used the fixed light palette (MyTheme.Colors). Their hosts (ShieldedBalanceActivity and PaymentsInternalFragment) also never wrapped their content in DashWalletTheme, so even the shared components (nav bar, EnterAmount, keypad, DashButton, Toast) stayed light.

Fix

The same approach as the privacy sheets in #1615:

  • ShieldedBalanceActivity and PaymentsInternalFragment now wrap their content in DashWalletTheme.
  • ShieldedTransferScreen, ShieldedSendScreen, ShieldedReceiveScreen and the Internal tab card now use LocalDashColors.current instead of MyTheme.Colors.

This covers the transfer screen, its confirm and timing sheets, and the proving, ambiguous, locked-pending and stalled dialogs. Send and receive share the activity, so they are converted as well; otherwise they would mix light and dark colors. The CoinJoin migration screens are out of scope.

Testing

  • :wallet:compile_testNet3DebugKotlin passes.
  • Not yet checked on a device: needs a visual pass in dark mode (Payments → Internal → Shielded balance → transfer, confirm sheet, info sheet).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated shielded payment and balance screens to use the wallet’s color palette for backgrounds, text, address fields, and confirmation views.
    • The receive screen now shows a smaller QR code with black modules on a white rounded background.
    • The send address field’s cursor now matches the primary text color.
    • Screen layouts and payment actions remain unchanged.

The internal transfer flow (payments "Internal" tab card, transfer
screen with its confirm/timing sheets and proving/ambiguous/locked/
stalled dialogs, plus the parked shielded send/receive screens) used the
fixed light palette (MyTheme.Colors), and neither ShieldedBalanceActivity
nor PaymentsInternalFragment wrapped its content in DashWalletTheme, so
even the shared components (nav bar, amount entry, keypad, buttons,
toast) rendered light. Both hosts now wrap in DashWalletTheme and the
screens read LocalDashColors — the same fix as the privacy sheets in
#1615.

MO-1099

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

coderabbitai Bot commented Oct 14, 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: 6a08b495-0ead-4d70-92f4-d846d8663bad
📥 Commits

Reviewing files that changed from the base of the PR and between cfa8e08 and 94410e0.

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

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

📝 Walkthrough

The payment card and shielded balance Compose screens now apply DashWalletTheme and use LocalDashColors for color values. The receive screen also changes the QR code size and presentation. Existing layouts, screen selection, callbacks, and payment actions remain unchanged.

Changes: Dash theme adoption

Layer / File(s) Summary
Apply theme at Compose entry points
wallet/src/de/schildbach/wallet/ui/payments/PaymentsInternalFragment.kt, wallet/src/de/schildbach/wallet/ui/shielded/ShieldedBalanceActivity.kt
Both Compose entry points wrap their existing content in DashWalletTheme. The payment card uses LocalDashColors for its background and text colors.
Update receive and send screen colors
wallet/src/de/schildbach/wallet/ui/shielded/ShieldedReceiveScreen.kt, wallet/src/de/schildbach/wallet/ui/shielded/ShieldedSendScreen.kt
These screens use LocalDashColors for backgrounds, text, errors, address fields, and confirmation content. The receive QR code is 176 dp and uses black modules on a padded white rounded background.
Update transfer screen colors
wallet/src/de/schildbach/wallet/ui/shielded/ShieldedTransferScreen.kt
The transfer screen, sheets, and dialogs use LocalDashColors for backgrounds, text, error colors, and accents.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: thepastaclaw

Merge Risk: ⚪ Minimal · up to 94410

The theme changes address dark-mode presentation, and the receive QR still encodes the same address on a white background. No concrete user-impacting regression is established, so merge risk is minimal.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: fixing dark mode for the shielded internal transfer screens and related UI.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • 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 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 94410e0) · 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

The dark-mode conversion is generally consistent, but the receive QR now uses the dark-mode primary text color on a transparent ALPHA_8 bitmap. This produces light modules on the dark card with no QR margin, which can make the receive address unscannable by external wallets and cameras. The Dash glyph concern is refuted because the drawable supplies a theme-aware root tint.

🔴 1 blocking

1 finding(s) not shown inline (the lines are not part of this PR's diff)

🔴 Blocking: Keep the receive QR dark-on-light in dark mode
wallet/src/de/schildbach/wallet/ui/shielded/ShieldedReceiveScreen.kt:183-192

Qr.qrBitmap() creates an ALPHA_8 mask with the QR modules opaque and the background effectively transparent. Tinting that bitmap with LocalDashColors.current.textPrimary changes the modules to WhiteAlpha90 in dark mode, while the surrounding ReceiveCard remains Black800. Because the QR is generated with MARGIN 0, it is rendered as a light-on-dark code without a dedicated light quiet zone. Many external QR scanners do not reliably accept inverted codes, so this can break the receive flow in dark mode. Render the QR in a white container with a fixed black tint regardless of the app theme.

        val qrBitmap = remember(address) { Qr.qrBitmap(address) }
        qrBitmap?.let { bitmap ->
            Box(
                modifier = Modifier
                    .padding(top = 20.dp, bottom = 30.dp)
                    .background(Color.White, RoundedCornerShape(12.dp))
                    .padding(12.dp)
            ) {
                Image(
                    bitmap = bitmap.asImageBitmap(),
                    contentDescription = null,
                    colorFilter = ColorFilter.tint(Color.Black, BlendMode.SrcIn),
                    modifier = Modifier.size(176.dp)
                )
            }
        }

source: muse-spark-1.3-contributor (phase1-reviewer: general)

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) — This is a contained but cross-cutting UI theming change across several Compose screens and hosts, requiring verification that dark-mode colors and theme propagation remain correct without altering funds movement or other critical wallet logic.
  • 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 below 15% reserve: weekly 14% left, 5h 100% left), 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 `wallet/src/de/schildbach/wallet/ui/shielded/ShieldedReceiveScreen.kt`:
- [BLOCKING] wallet/src/de/schildbach/wallet/ui/shielded/ShieldedReceiveScreen.kt:183-192: Keep the receive QR dark-on-light in dark mode
  Qr.qrBitmap() creates an ALPHA_8 mask with the QR modules opaque and the background effectively transparent. Tinting that bitmap with LocalDashColors.current.textPrimary changes the modules to WhiteAlpha90 in dark mode, while the surrounding ReceiveCard remains Black800. Because the QR is generated with MARGIN 0, it is rendered as a light-on-dark code without a dedicated light quiet zone. Many external QR scanners do not reliably accept inverted codes, so this can break the receive flow in dark mode. Render the QR in a white container with a fixed black tint regardless of the app theme.

Tinting the margin-less ALPHA_8 QR mask with textPrimary rendered light
modules on the dark card in dark mode, which many scanners reject. Draw
it black inside a white 12dp quiet zone regardless of theme (same 200dp
footprint).

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

@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.

Re-review — Final validation — Phase 1 + Phase 2

The complete diff at cfa8e08 consistently applies the night-aware palette without changing transaction or authentication behavior, and the receive QR regression is fixed. One dark-mode defect remains: the send address input retains a black insertion cursor against its newly dark background. Validation was static; the supplied CI snapshot shows build and check queued, and device-level visual validation remains outstanding.

🔴 1 blocking

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

  • Triage: low by gpt-6.1-sol (effort low) — The diff is a contained UI theming change across five screens and hosts, plus QR presentation adjustments, without changes to transfer logic or other critical surfaces.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 100% left, weekly 93% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • 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, gpt-6.1-sol — general (completed, effort medium); 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 `wallet/src/de/schildbach/wallet/ui/shielded/ShieldedSendScreen.kt`:
- [BLOCKING] wallet/src/de/schildbach/wallet/ui/shielded/ShieldedSendScreen.kt:287-291: Set a theme-aware cursor for the send address field
  BasicTextField defaults its cursorBrush to SolidColor(Color.Black); the textStyle color does not affect that brush. This PR changes the address field background to the dark palette's #1E1F24, leaving the insertion cursor with almost no contrast while the text becomes light. Users entering or correcting a recipient address therefore cannot reliably locate the editing position. DashWalletTheme only supplies LocalDashColors and does not override the cursor. Set cursorBrush to LocalDashColors.current.textPrimary, matching the existing shared AddressField implementation.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • The extended public key export QR remains inverted in dark mode — ExtendedPublicKeyDialog.kt still tints its QR with LocalDashColors.current.textPrimary and provides no fixed white backing. Because Qr.qrBitmap produces an ALPHA_8 bitmap with zero margin, dark mode renders light modules on the dark sheet, which can prevent external scanners from reading the exported key. This is a concrete export-compatibility issue, but the file and behavior predate this PR and are unrelated to the internal-transfer changes.
    • Follow-up: Track a separate issue to render the extended public key QR with fixed black modules on a white backing and an explicit quiet zone.

BasicTextField's default cursorBrush is black, invisible on the dark
field background now that the screen follows dark mode. Use textPrimary,
matching the shared AddressField.

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

@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.

Re-review — Final validation — Phase 1 + Phase 2

Independently reviewed the complete diff at 94410e0 and the surrounding theme, shared-component, drawable, and QR-generation implementations; no in-scope defects remain, and both prior findings are fixed. The theme wrappers and palette substitutions preserve the existing transfer and authentication behavior. Validation was static only: the supplied CI snapshot reports check successful with build and CodeRabbit pending, and device-level dark-mode validation remains outstanding.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

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

  • Triage: low by gpt-6.1-sol (effort low) — The changes are contained, straightforward UI theme and color substitutions across five related screens, without altering funds movement, cryptography, or other critical logic.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 100% left, weekly 90% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • 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, gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@HashEngineering
HashEngineering merged commit a934db3 into feat/kotlin-sdk-phase-1 Oct 15, 2026
3 checks passed
@HashEngineering
HashEngineering deleted the fix/dark-mode-internal-transfer branch October 15, 2026 18:48
HashEngineering added a commit that referenced this pull request Oct 15, 2026
…sdk-phase-1-v11.9.1

Brings in #1614, #1606, #1620 and #1624. No textual conflicts.

Checked for #1606 (stop logging amounts): none of this branch's new log lines
or analytics events carry an amount. The two log lines that print
SdkWriteResult.Broadcast.value print a txid.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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