feat(desktop): browser action safety classification (Phase 2E)#7
Merged
gu87 merged 1 commit intoJun 7, 2026
Merged
Conversation
- Add action classification system: - PERMANENTLY_DENIED_ACTIONS: eval, press_key, scroll (no Allow button) - AWAITING_SAFETY_ACTIONS: click, type (Allow visible but executor fails) - EXECUTABLE_ACTIONS: navigate only (user-approved execution) - Add helper functions: getBlockedActionReason, isActionExecutable, isActionPermanentlyBlocked - Add BrowserActionSafetyContext to proposeAction (originUrl, originTitle, targetDescription, targetRef, riskLevel, typeText) - Upgrade approval UI: RiskBadge, AlertTriangle for blocked reasons, type confirmation step, improved action log with actionType tags - Read-only actions (snapshot/vision/get_images/console) auto-resolve - Add Phase 2E contract tests (147 pass) Co-Authored-By: Claude Opus 4.8 <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.
Summary
Adds action safety classification to the Browser Action Gateway, establishing clear boundaries for what the Desktop executor can and cannot do.
What Changed
PERMANENTLY_DENIED_ACTIONS:eval,press_key,scroll— no Allow button, permanently blockedAWAITING_SAFETY_ACTIONS:click,type— Allow button visible but executor returns failedEXECUTABLE_ACTIONS:navigateonly — user-approved executiongetBlockedActionReason(),isActionExecutable(),isActionPermanentlyBlocked()BrowserActionSafetyContextpropagated toproposeAction()(originUrl, originTitle, targetDescription, riskLevel, typeText)snapshot/vision/get_images/consoleauto-resolve as executedSafety Boundary
navigateclick,typeeval,press_key,scrollsnapshot,vision,get_images,consoleValidation
npm run type-check: PASSnpx eslint: PASS (0 errors, 0 warnings)npx vitest run --environment jsdom src/app/browser-runtime/*.test.ts: 147/147 PASSScope
🤖 Generated with Claude Code