Make the settings tap sequence deterministic - #111
Merged
Merged
Conversation
The sequence (10 taps bottom right, then 10 bottom left) was hard to trigger for two reasons. The counters never expired. The overlays return false, so the touch also reaches the dashboard underneath and an ordinary tap on a card in either corner increments them. Between attempts the sequence therefore started from an unknown state. And the threshold was an equality check: one tap too many left clicksButtonRight at 11, after which every tap on the left overlay hit the else branch and reset, wedging the gesture until the app restarted. Expire the counters after 2 s without a tap and compare with >=. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
The gesture that opens the settings — 10 taps on the bottom-right overlay, then 10 on the bottom-left — is hard to trigger in practice. Two things make it non-deterministic.
The counters never expire. Both overlays return
falsefrom their touch listener, so the touch also reaches the dashboard underneath. The overlays are 15% × 15% of the screen in the bottom corners, which on a normal dashboard is live content: an ordinary tap on a card in either corner increments the counter. Nothing ever resets it, so each attempt starts from a state that depends on how the display was used before.The threshold is an equality check. One tap too many leaves
clicksButtonRightat 11. Every subsequent tap on the left overlay then takes theelsebranch and resets, so the gesture cannot be completed at all until the app restarts.Change
Expire the counters after 2 s without a tap, and compare with
>=.The timeout is what separates the gesture from ordinary use: taps that belong to the sequence come in quick succession, taps minutes apart do not.
>=means overshooting no longer wedges the gesture.The sequence itself is unchanged — 10 taps per corner, bottom right first — it just has to be entered without long pauses now.
Note
This does not address the root cause, that the overlays sit on top of live dashboard content and count taps meant for it. Fixing that needs a gesture that cannot collide with the dashboard, which is a larger change; the multi-finger swipes
SwipeHelperalready classifies would be one candidate. Happy to follow up if that direction is welcome.Verified on a Wall Display Stargate.
🤖 Generated with Claude Code