Repository navigation
Conversation
Replace the direct react-native-vector-icons imports with the shared VectorIcon component to clear the no-restricted-imports warnings.
Persist a slidersAsButtons device setting, off by default, and expose it as a switch in the developer options card of the settings scene.
With the slidersAsButtons developer setting on, SafeSlider renders an EdgeButton labeled Confirm instead of the swipe slider. The button runs the same completion handler, shows a spinner until the caller resets it, re-arms on reset or rejection, and honors the disabled and locked states and texts. It keeps the slider's testID so automation targets the same element. Tools such as BrowserStack cannot perform the swipe.
j0ntz
commented
Nov 5, 2026
j0ntz
left a comment
Contributor
Author
There was a problem hiding this comment.
Self-review at a89080c (low): nothing fixed, 2 candidates rejected.
Rejected in curation (2)
src/components/themed/SafeSlider.tsx:140: button mode ignoresconfirmTextand always says "Confirm". Rejected: the only caller passing it,SendScene2.tsx:4459, sendsstealth_slide_send("Slide to send stealthily"), a swipe instruction that is wrong on a button; the generic label is intended.src/components/themed/SafeSlider.tsx:139:slidersAsButtonsis read at render, and mounted sliders do not update on toggle. Rejected: the value changes only from the Settings switch. No slider can flip mode mid-gesture, and slider scenes open fresh after the toggle (verified on the simulator);disableAnimationsis read the same way.
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.
Description
Asana task
Adds a "Replace Sliders with Buttons" switch to the developer options card in Settings. When it is on, every confirmation slider (send, swap and the other slider-gated actions) renders a tappable Confirm button instead. BrowserStack and similar automation tools cannot perform the swipe gesture. Before this change they could not confirm these actions.
confirmSliderThumbtestID. It shows a spinner until the caller resets it, ignores presses while the action runs, and honors the disabled and locked states and texts.Tested on the iOS simulator. With the option on, a BTC send showed the Confirm button in place of the slider, and tapping it broadcast the transaction to the success modal. New unit tests in
SafeSlider.test.tsxcover the slider and button modes.CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Low Risk
Behavior change is gated behind a developer setting that defaults off; production confirmation UX stays on sliders unless explicitly enabled for testing.
Overview
Adds a developer-only toggle, Replace Sliders with Buttons, that persists on the device via new
slidersAsButtonsdevice settings (default off). When enabled,SafeSliderskips the swipe UI and renders anEdgeButtonlabeled Confirm, reusing the same completion handler, spinner/reset behavior, disabled/locked labels, andconfirmSliderThumbtest ID so BrowserStack-style automation can confirm send/swap actions without swiping.Settings exposes the switch under developer options with
writeSlidersAsButtons; locale strings cover the button label and setting name.SafeSlider.test.tsxcovers slider vs button modes.SettingsScenealso swaps direct vector-icon imports forVectorIcon(snapshot tweak only).Reviewed by Cursor Bugbot for commit a89080c. Bugbot is set up for automated code reviews on this repo. Configure here.