Skip to content

feat: convert scanner to bottom sheet#840

Merged
ovitrif merged 17 commits intomasterfrom
feat/scan-sheet-v60
Mar 16, 2026
Merged

feat: convert scanner to bottom sheet#840
ovitrif merged 17 commits intomasterfrom
feat/scan-sheet-v60

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Mar 11, 2026

FIGMA

This PR converts the QR scanner from a full-screen navigation route into a proper bottom sheet, consistent with other sheets in the app (Send, Receive, Backup, etc).

Description

  1. Removes NavController dependency from QrScanningScreen and simplifies it to accept onBack/onScanSuccess callbacks
  2. Creates QrScanningSheet that wraps the scanner in a SheetHost-compatible composable with sheetHeight()
  3. Adds Sheet.QrScanner type and result routing via AppViewModel.showScannerSheet(onResult)
  4. Updates all call sites (TabBar, FundingAdvanced, SendSheet, ExternalConnection, ProbingTool, ElectrumConfig, RgsServer) to use the sheet pattern
  5. Removes Routes.QrScanner navigation route and navigateToScanner() extension
  6. Removes the inSheet conditional styling from scanner and camera permission views, always using sheet styling

Preview

normal-payment.mp4
send-sheet.mp4
probing.mp4
quickpay.mp4

QA Notes

  1. Tab bar scanner
  • Tap the scan icon in the bottom tab bar
  • Verify the scanner opens as a bottom sheet (drag handle visible, slides up)
  • Scan a valid QR code and verify it routes correctly (e.g., opens send flow for a Bitcoin address)
  1. Send sheet scanner
  • Open Send sheet, navigate to the QR scanner route within it
  • Scan a QR code and verify it pops back and processes the result
  1. Settings screens (for-result pattern)
  • Navigate to Electrum Config, tap the scan icon
  • Scan a QR code with server details and verify the scanned value populates the input field
Untitled 1







  • Repeat for RGS Server
Untitled 1-2







  • For External node
Untitled 1-2
  • And Probing Tool screens
  1. Camera permission denied
  • Deny camera permission and verify the denied content displays correctly with sheet styling
  1. Gallery and paste
  • Test picking a QR code image from gallery
  • Test pasting from clipboard

@jvsena42 jvsena42 self-assigned this Mar 11, 2026
@jvsena42 jvsena42 added this to the 2.2.0 milestone Mar 11, 2026
@jvsena42 jvsena42 marked this pull request as ready for review March 12, 2026 10:12
@claude

This comment has been minimized.

@jvsena42

This comment was marked as outdated.

@jvsena42 jvsena42 marked this pull request as draft March 12, 2026 11:01
@jvsena42 jvsena42 marked this pull request as ready for review March 12, 2026 11:55
@jvsena42

This comment was marked as outdated.

@jvsena42 jvsena42 requested a review from ovitrif March 12, 2026 12:28
@claude

This comment has been minimized.

@claude

This comment has been minimized.

@jvsena42
Copy link
Member Author

drafted to investigate e2e failure

@jvsena42 jvsena42 marked this pull request as draft March 13, 2026 12:55
@jvsena42
Copy link
Member Author

@piotr-iohk I see "127.0.0.1:6001:s" on the input of this test. Is it expected?
https://github.com/synonymdev/bitkit-android/actions/runs/23014213473/job/66942585911?pr=840

@jvsena42 jvsena42 marked this pull request as ready for review March 13, 2026 17:18
ovitrif

This comment was marked as resolved.

@jvsena42 jvsena42 marked this pull request as draft March 16, 2026 10:45
@jvsena42 jvsena42 marked this pull request as ready for review March 16, 2026 11:15
@jvsena42
Copy link
Member Author

🐞 bug: if the scanner is opened very fast after node stop + startup → scan an unified qr → 💣 sheet dismisses and that's it, nothing more.

Likely the "node starting up, not yet ready" flow which needs special handling.

Fixed

Screen_recording_20260316_081300.webm
Screen_recording_20260316_081406.webm

@jvsena42 jvsena42 requested a review from ovitrif March 16, 2026 11:43
@ovitrif
Copy link
Collaborator

ovitrif commented Mar 16, 2026

🐞 bug: if the scanner is opened very fast after node stop + startup → scan an unified qr → 💣 sheet dismisses and that's it, nothing more.
Fixed

Probably fixed for that flow:
Use button in sheets + QuickPay ON 🤔

But my flow: No QuickPay + use camera to scan still has a bug:
I scan unified no-amount invoice, now it does open the amount screen (that's good) but I never get the option to use SPENDING. Only SAVINGS.

Not sure if this was a bug on master too. if Yes, I would merge the PR and defer to an issue this bug + its fix.

@jvsena42 jvsena42 marked this pull request as draft March 16, 2026 12:32
@jvsena42

This comment was marked as outdated.

@jvsena42
Copy link
Member Author

Confirmed this is a pre-existing bug on master — the extractViableLightningInvoicecanSendisUnified logic is identical on both branches.

Created #849 to track the fix.

@jvsena42 jvsena42 marked this pull request as ready for review March 16, 2026 14:00
@claude
Copy link

claude bot commented Mar 16, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jvsena42
Copy link
Member Author

Retested ✅

@jvsena42 jvsena42 requested a review from ovitrif March 16, 2026 14:21
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

retested all flows 👏🏻

LGTM :shipit:

Thanks for the thorough investigation and filing the bug about unified invoice scan 🥇 .

@ovitrif ovitrif merged commit ed1d7db into master Mar 16, 2026
18 checks passed
@ovitrif ovitrif deleted the feat/scan-sheet-v60 branch March 16, 2026 15:34
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