Skip to main content

App Blocker Screen

The app blocker screen (choose.tsx) allows the user to select which apps and websites should be blocked during a commitment window.

Three-Tab Interface

The screen presents three tabs:

Native Bridge Integration

The app list is fetched via the AppListerModule Kotlin native module, which uses Android’s PackageManager to enumerate all installed packages at high speed via JSI:

State Management

Selected apps and websites are written to the draft store via setBlocklist() or setSlotBlocklist():
If both arrays become empty, the digital commitment condition is automatically removed from the draft.

Preset Integration

Users can select a saved blocklist preset from usePresetStore for one-tap configuration. The preset ID is stored alongside the blocklist data for toggle resolution in the UI.