Clear stale approval prompts after 5-minute timeout#27
Open
Swissola wants to merge 3 commits into
Open
Conversation
sleep=Donald Duck, idle=Bongo Cat, busy=SpongeBob multitasking, attention=Surprised Pikachu (Nouns glasses), celebrate=Peanuts party, dizzy=Powerpuff Girls spiral eyes, heart=heart eyes ghost. Source GIFs in characters/memes-src/, device-ready pack in characters/memes/. Built with prep_character.py at 96x98px, 64 colours per frame. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Track the current peer BD address in onConnect (extended overload). bleRemoveCurrentBond() removes only that peer's LTK from NVS. The "unpair" JSON command now calls this instead of bleClearBonds(), so each host unpairs itself independently. bleClearBonds() is reserved for factory reset only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
If the desktop crashes or goes offline after sending a permission request the promptId is never cleared by the bridge, leaving the approval UI visible forever with no way to dismiss it short of factory reset. Add a 5-minute timeout: if a prompt has been pending without a response for longer than PROMPT_TIMEOUT_MS, clear promptId so the UI returns to normal. 5 minutes is long enough to step away from the desk and come back without losing a legitimate prompt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 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 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.
Summary
PROMPT_TIMEOUT_MS, clearpromptIdso the UI returns to normalMotivation
If the desktop crashes or goes offline after sending a permission request,
promptIdis never cleared by the bridge. The approval UI stays visible indefinitely with no way to dismiss it short of a factory reset. The only escape was power cycling and hoping the bridge came back up quickly enough to send a fresh state.5 minutes gives enough headroom to step away from the desk and come back without losing a legitimate prompt, while still recovering automatically from a hung or crashed bridge.
Behaviour after this change
Test plan
🤖 Generated with Claude Code