Skip to content

Prompt user to install BadgeBot from HexDrive EEPROM app when no controlling app is detected#64

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-badgebot-prompt
Draft

Prompt user to install BadgeBot from HexDrive EEPROM app when no controlling app is detected#64
Copilot wants to merge 2 commits intomainfrom
copilot/add-badgebot-prompt

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

When a HexDrive hexpansion is inserted but no controlling app (BadgeBot or otherwise) interrogates it within 5 seconds, the EEPROM app should bring itself to the foreground and prompt the user to install BadgeBot. The prompt should only fire once, persisted via settings.

Changes to hexdrive.py

  • Interrogation detectionget_version() now sets self._interrogated = True. BadgeBot always calls this method first, making it the natural signal that a controlling app is present.

  • Timed prompt triggerbackground_update() accumulates elapsed time. After _PROMPT_DELAY_MS (5 s) with no interrogation and no prior prompt, it emits RequestForegroundPushEvent(self) and writes settings.set("hexdrive.prompted", True) so the prompt fires exactly once across reboots.

  • Foreground screen — New draw() method renders a simple "Install BadgeBot" message. New _handle_gain_focus / _handle_lose_focus handlers register/deregister a ButtonUpEvent listener; any button press dismisses via RequestForegroundPopEvent.

  • State initialised before config guard_interrogated, _time_since_start, _in_foreground, and _prompted are set unconditionally so get_version() and draw() are safe to call regardless of whether config was provided.

# background_update() — core of the new logic
if not self._interrogated and not self._prompted:
    self._time_since_start += delta
    if self._time_since_start > _PROMPT_DELAY_MS:
        self._prompted = True
        settings.set(_PROMPT_SETTING, True)
        eventbus.emit(RequestForegroundPushEvent(self))
Original prompt

This section details on the original issue you should resolve

<issue_title>prompt use of BadgeBot app</issue_title>
<issue_description>if hexpansion with EEPROM app is installed it can time a short delay and then if it has not been interrogated by the BadgeBot (or any other) application, it can raise request to go foreground and show a simple screen to prompt user to install BadgeBot.
Perhaps needs to remember that it has done this and not do it again to avoid being a pain if a HexDrive is left plugged in.</issue_description>

<agent_instructions>this must only edit the app file that goes into hexdrive eeprom.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@lincoltd7 @copilot

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: lincoltd7 <117526452+lincoltd7@users.noreply.github.com>
Copilot AI changed the title [WIP] Add prompt for BadgeBot app installation Prompt user to install BadgeBot from HexDrive EEPROM app when no controlling app is detected Feb 23, 2026
Copilot AI requested a review from lincoltd7 February 23, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prompt use of BadgeBot app

2 participants