fix(desktop): add approval dialog fallback when inline controls are absent - #40071
Closed
konsisumer wants to merge 1 commit into
Closed
fix(desktop): add approval dialog fallback when inline controls are absent#40071konsisumer wants to merge 1 commit into
konsisumer wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing: referenced_issue_closed. all referenced issues closed: [37812] |
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 changed and why
Per the reporter's 2026-06-05 follow-up on #37812, Desktop can still reach a state where a command approval request times out with no notification, dialog, inline prompt, or visible affordance, even after the merged event-routing and grouped-tool fixes in #38578 and #38829. This adds a guarded modal fallback for
approval.request: the existing inline tool-row approval remains the primary UX, but if no inline approval control is mounted for the active session,PromptOverlaysnow renders a command approval dialog with Run once / Allow this session / Reject actions.The inline approval component now registers its active session while mounted, and the prompt store exposes active-session inline visibility so the fallback does not duplicate the normal inline controls. New regression coverage verifies the fallback appears when no inline bar exists, stays hidden while an inline bar is mounted, sends
approval.respond, and tracks inline mount state.How to test
npm run test:ui -- src/components/prompt-overlays.test.tsx src/components/assistant-ui/tool-approval.test.tsx src/components/assistant-ui/tool-approval-group.test.tsx src/store/prompts.test.ts(blocked locally:vitestis not installed in this checkout)npm run type-check --workspace apps/desktop(blocked locally:tscis not installed in this checkout)/opt/homebrew/bin/timeout -k 30 480 sh -c 'pytest tests/ -q -x --timeout=60 "$@"' sh(blocked locally during collection: missing Python dependencyfastapi)What platforms tested on
git diff --checkbecause this sandbox lacks the Desktop Node toolchain and the Python environment is missingfastapi.Fixes #37812