fix: gate screen deeplinks to debug - #1157
Open
ovitrif wants to merge 17 commits into
Open
Conversation
5 tasks
ovitrif
force-pushed
the
fix/1132-gate-screen-deeplinks-to-debug
branch
from
August 13, 2026 18:23
9c3291d to
d50ff74
Compare
ovitrif
marked this pull request as ready for review
August 14, 2026 04:14
Greptile SummaryThis PR confines
Confidence Score: 5/5The PR appears safe to merge; no actionable correctness or security failures were identified. Screen URI registration, sheet resolution, and replay are consistently disabled in release builds, while debug behavior remains equivalent to the previous implementation and continues to require Dev Mode.
|
| Filename | Overview |
|---|---|
| app/src/debug/java/to/bitkit/ui/utils/ScreenDeepLinkRuntime.kt | Provides the debug-only screen-link registration and sheet-resolution behavior previously available from shared utilities. |
| app/src/release/java/to/bitkit/ui/utils/ScreenDeepLinkRuntime.kt | Disables screen-link registration and sheet resolution for all release variants. |
| app/src/main/java/to/bitkit/ui/utils/ScreenDeepLinks.kt | Delegates build-sensitive behavior to the variant runtime and combines runtime availability with the Dev Mode replay gate. |
| app/src/main/java/to/bitkit/ui/utils/SheetDeepLinks.kt | Delegates sheet IDs and URI resolution to the build-specific runtime. |
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Prevents release builds from queuing screen URIs even when Dev Mode is enabled. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
URI[bitkit://screen URI] --> Activity[MainActivity detaches URI]
Activity --> Gate{Debug runtime and Dev Mode enabled?}
Gate -->|No| Ignore[Ignore URI]
Gate -->|Yes| Queue[Queue pending screen URI]
Queue --> Resolve{Sheet URI?}
Resolve -->|Yes| Sheet[Open allowed sheet route]
Resolve -->|No| Nav[Replay against registered navigation links]
Release[Release runtime] --> Disabled[No links, no sheets, no queue]
Disabled --> Ignore
Reviews (1): Last reviewed commit: "test: drop debug screen deeplink registe..." | Re-trigger Greptile
jvsena42
requested changes
Aug 14, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
ovitrif
force-pushed
the
fix/1132-gate-screen-deeplinks-to-debug
branch
from
August 15, 2026 17:57
53adfc0 to
962da97
Compare
…n-deeplinks-to-debug # Conflicts: # app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1132
This PR confines
bitkit://screen/...deep links to debug builds, so release and store APKs cannot honor them even when Dev Mode is enabled.Description
Screen deep-link registration, sheet lookup, and pending-URI replay now live behind debug/release source sets. Debug builds keep the current developer behavior and still require Dev Mode. Release builds attach no screen URIs to the nav graph, never open a sheet from a screen URI, and never queue one for replay. The activity still strips a
screenURI from the intent as belt-and-suspenders. Otherbitkit:hosts and payment URIs are unchanged.Preview
N/A
QA Notes
Dev mode is on by default on debug builds (Settings ▸ Advanced ▸ Dev Settings). The app must be past onboarding.
Manual Tests
adb shell am start -a android.intent.action.VIEW -d "bitkit://screen/settings" to.bitkit.dev→ Settings opens.bitkit://screen/send→ Send sheet on the recipient picker.bitkit://screen/widgets/price-edit→ Bitcoin Price editor.bitkit://screen/recovery-mnemonicandbitkit://screen/backup/show-mnemonic→ screen unchanged, recovery phrase never shown, logcat carriesUnhandled screen deeplink.bitkit://screen/send/fee-rate→ screen unchanged, no crash.bitkit://screen/settingson a warm start and a cold start: wallet overview stays, Settings does not open, logcat carriesIgnoring screen deeplink, not queued.regression:scan abitcoin:/lightning:/lnurlURI → still decodes through the scanner path.bitkit://screen/settings: ignored, Settings does not open.Automated Checks
ScreenDeepLinksTest.kt,SheetDeepLinksTest.kt, andAppViewModelSendFlowTest.ktstill cover URI patterns, sheet lookup, and Dev Mode acceptance/rejection.journeys/deeplinks/still apply on debug builds.