This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Conversation
WalkthroughAdds an NPUB QR scanner flow: new ScanNpubScreen, route and navigation helper, localization keys across multiple languages, UI integrations (ShareProfileScreen, UserSearchScreen, WnSearchField), and tests covering UI, navigation, and barcode handling. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant ShareProfile as ShareProfileScreen
participant Router as Router
participant ScanScreen as ScanNpubScreen
participant API as API (hexFromNpub)
participant Chat as StartChatScreen
User->>ShareProfile: Tap "Scan QR" button
ShareProfile->>Router: pushToScanNpub()
Router->>ScanScreen: Navigate to ScanNpubScreen
User->>ScanScreen: Scans QR (npub)
ScanScreen->>API: hexFromNpub(npub)
API-->>ScanScreen: hex pubkey or error
alt valid npub
ScanScreen->>Router: popAndPushNamed(startChat, pubkey)
Router->>Chat: Navigate with pubkey
else invalid npub
ScanScreen-->>User: Show error (invalidNpub), keep scanner
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
✅ Coverage: 99.35% → 99.36% (+0.01%) |
1 similar comment
✅ Coverage: 99.35% → 99.36% (+0.01%) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@test/screens/scan_npub_screen_test.dart`:
- Line 81: Replace the double-quoted literal used in the widget assertions with
single-quoted strings and escape the apostrophe in the text; update the expect
calls that use find.text("Scan a contact's QR code.") (and the similar
occurrence around line 120) to use single quotes with an escaped apostrophe so
they follow the project's Dart/Flutter style guide.
✅ Coverage: 99.35% → 99.36% (+0.01%) |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@test/screens/scan_npub_screen_test.dart`:
- Around line 91-92: Several testWidgets declarations (e.g., the test that calls
pumpScanNpubScreen) have descriptions that exceed 100 characters; split the
string and the callback onto separate lines and wrap/shorten the description so
each source line is ≤100 chars. Locate the long testWidgets(...) calls in
scan_npub_screen_test.dart, break the description into a shorter string or use
string concatenation, place the opening parenthesis and the async callback on
the next line (e.g., testWidgets('short description', (tester) async { ... }),
or split across two lines) and apply the same wrapping style to the other
offending tests referenced in this file (the tests around the tapping
close/sharing interactions).
- Around line 47-49: The mock API is initialized once via RustLib.initMock(api:
_MockApi()) in setUpAll but never reset, causing StreamController leaks across
tests; keep the shared _MockApi instance and add a setUp() that calls
_api.reset() (or the mock’s reset method) before each test so streams are
cleared, and remove reliance on tearDownAll for this cleanup; locate the
initialization in setUpAll and the mock class _MockApi to implement the reset
call in setUp.
✅ Coverage: 99.36% → 99.37% (+0.01%) |
✅ Coverage: 99.36% → 99.37% (+0.01%) |
83 tasks
This was referenced Feb 5, 2026
11 tasks
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the ability to scan a contact's npub QR code from the Share Profile screen and User Search screen.
Closes #127
Type of Change
Checklist
just precommitto ensure that formatting and linting are correctCHANGELOG.mdfile with your changes (if they affect the user experience)just build-android(only needed if rust dependencies or rust code changes)Summary by CodeRabbit
New Features
Localization
Tests