Skip to content

feat: Stackbit 1248 camera scanner#839

Draft
stackbitme wants to merge 3 commits into
selfcustody:developfrom
stackbitme:feat/stackbit-1248-scanner
Draft

feat: Stackbit 1248 camera scanner#839
stackbitme wants to merge 3 commits into
selfcustody:developfrom
stackbitme:feat/stackbit-1248-scanner

Conversation

@stackbitme
Copy link
Copy Markdown

@stackbitme stackbitme commented Mar 22, 2026

Summary

Added a camera scanner for Stackbit 1248 metal backup plates. It reads the punched dots and decodes the BIP39 words automatically.

Works with both 12 and 24 word mnemonics, and supports standard 1248 and 1248mini plates.

How to use

  1. Go to Load Mnemonic > Via Camera > Stackbit 1248
  2. Paint the punched dots black and place the plate on a dark surface
  3. Point the camera at the plate, align it and click the button to capture
  4. Review the words — tap any word to edit if needed
  5. Confirm

Test plan

  • Test with 12-word mnemonic plate
  • Test with 24-word mnemonic plate
  • Test word editing after scan
  • Test with 1248mini plate

Add camera-based scanner for Stackbit 1248 metal backup plates.
Reads punched dots and decodes BIP39 words automatically.
Supports 12/24 word mnemonics and both 1248 and 1248mini plates.
@odudex
Copy link
Copy Markdown
Member

odudex commented Mar 24, 2026

Nice @stackbitme!

To move on, the PR needs several adjusts to pass tests, I would start with format and linting, then you need to add translations, fix existing tests, and create new ones to cover the added feature.

@tadeubas
Copy link
Copy Markdown
Member

Hey @odudex, have you tested the PR first? I think it’s better to review the functionality and implementation upfront. If it looks good, then add tests, otherwise @stackbitme may have to redo them after further changes.

@qlrd
Copy link
Copy Markdown
Member

qlrd commented Apr 1, 2026

Every feat or fix will need the test commit companions @stackbitme :). Also, check @bitcoisas's #847 that used some of your methods, you two can share ideas and codes

- Format code with black
- Fix pylint warnings (unused imports, naming, unnecessary else)
- Add translations for 7 new strings in all 11 languages
- Fix 3 broken mnemonic_xor tests (menu index shift from new Stackbit item)
- Revert unneeded imports added to stack_1248.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 0.20121% with 496 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.95%. Comparing base (0befce2) to head (0ce3949).
⚠️ Report is 24 commits behind head on develop.

Files with missing lines Patch % Lines
src/krux/pages/stack_1248_scanner.py 0.00% 479 Missing ⚠️
src/krux/pages/mnemonic_loader.py 5.55% 17 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.20%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #839      +/-   ##
===========================================
- Coverage    97.31%   92.95%   -4.36%     
===========================================
  Files           83       84       +1     
  Lines        10573    11078     +505     
===========================================
+ Hits         10289    10298       +9     
- Misses         284      780     +496     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joaozinhom
Copy link
Copy Markdown

How is this PR going? If you need help, please ask and I'll gladly to give you a hand, plus I think we have a commit waiting for approval right?

@qlrd
Copy link
Copy Markdown
Member

qlrd commented Apr 16, 2026

@stackbitme, are you alive?

@bitcoisas
Copy link
Copy Markdown

@stackbitme im working on features similar to this, if you need some help, we can hand it together.

@qlrd
Copy link
Copy Markdown
Member

qlrd commented May 11, 2026

@stackbitme , need to test some function and cover them to continue.

@stackbitme stackbitme marked this pull request as draft May 12, 2026 13:21
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.

6 participants