Repository navigation
Desktop: approvals answered too late run nothing, one dialog at a time, one grant per folder - #1587
Open
davidmckayv wants to merge 3 commits into
Open
davidmckayv wants to merge 3 commits into
davidmckayv wants to merge 3 commits into
Conversation
…es its Bot A native dialog cannot be closed from outside, so "Allow this command?" stayed on screen after OpenBot stopped waiting for it, still offering Allow once. Pressing it did nothing anyone could see, and until it was dismissed every folder action that Bot asked for failed with "That Bot already has a host operation in progress." Allow on an operation that was cancelled or expired now runs nothing and opens a notice that says the command didn't run (or the file wasn't changed) and to ask the Bot again. When an operation is cancelled, its Bot's slot is freed at once, so the next action asks straight away, and a cancelled operation no longer counts toward the waiting limit.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 14, 2026 03:20
With a stale "Allow this command?" still on screen, the next dialog sat exactly on top of it: two identical dialogs nobody could tell apart. Every dialog now waits for the one before it, the "didn't run" notice included, and one that is no longer wanted by its turn is never shown. Choosing a folder the Bot already had made a second grant beside the first, so Settings listed it twice and the Bot was handed two grants with one name. Choosing it again now makes the existing grant live again, under the id the Bot already knows.
A grant is read-only whichever time it was chosen. The test now checks that after the same folder is chosen again, a file change and a command that can change files still ask the person, even under always allow.
This branch has not been deployed
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.
What broke
OpenBot Desktop asks before a Bot runs a command or changes a file in a folder, with a native "Allow this command?" dialog. When nobody answers within the time OpenBot waits, OpenBot gives up on that action, but a native dialog cannot be closed from outside, so it stayed on screen:
The fix
Tests
a_command_allowed_after_the_server_stopped_waiting_does_not_run_and_the_folder_still_asks: cancel, then a late Allow; nothing runs, the notice fires once, the folder is still held, and the next command asks again.a_dialog_left_on_screen_holds_up_no_bot_and_the_next_dialog_waits_its_turn: with the stale dialog still open, the Bot's next command is taken (not turned away) but not shown; once the stale one is answered and its notice closed, it is shown; one given up on while waiting is never shown.choosing_a_folder_the_bot_already_has_keeps_one_grant_and_makes_it_live_again: the same folder chosen again for the same Bot keeps one grant, live, under the same id; another Bot gets its own.a_late_allow_says_nothing_ran_and_names_the_bot: the notice's words.The behaviour tests fail with the fix taken out and pass with it. Checked live on Windows and Mac before merge.