e2e for policy UI dropdowns; fix tool-detail badge writing unmatchable patterns#996
Merged
Conversation
An OpenAPI integration with two connected accounts drives the account-grouped tool tree: the per-tool row menu blocks one tool, the category row menu sets require_approval on the group, and the scenario pins the connection-wildcarded patterns both menus surface, indicator precedence (leaf rule over category rule) across both accounts, the Clear affordance, the /policies rows, and the persisted server-side owner/pattern/action ordering.
…n e2e The detail header's PolicyBadgeMenu passed the display id (e.g. google.gmail.users.getProfile) straight to onSetPolicy, but dynamic tools are policy-matched on integration.owner.connection.tool — so a rule authored from the badge never matched anything, and the menu never recognized an existing rule (no checkmark, no Clear). Route the badge through the same toPolicyPattern bridge the tree rows use (static tools keep their verbatim address), thread the static flag from both pages, and show the real stored pattern as the menu header. The policies-ui scenario now drives the badge too: it must show the inherited category rule, author an exact Always-run rule whose pattern actually matches (badge flips to the more specific rule), and Clear must restore inheritance.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 5325a3a | Commit Preview URL Branch Preview URL |
Jun 13 2026, 12:25 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 5325a3a | Jun 13 2026, 12:27 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
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
Adds a browser e2e scenario covering the tool policy UI end to end, and fixes a bug it surfaced in the tool-detail policy badge.
The scenario registers an OpenAPI integration, connects two accounts, and drives all three policy-authoring surfaces in the console:
It then asserts the rules govern both connected accounts, appear as rows on the Policies page, and persist server-side with the exact owner/pattern/action.
The bug it caught
The detail header's policy badge passed the display id (e.g.
google.gmail.users.getProfile) straight toonSetPolicy. Dynamic tools are policy-matched on the fullintegration.owner.connection.tooladdress, so a rule authored from that badge matched nothing — and the menu never recognized its own rule afterward (no checkmark, no Clear).The fix routes the badge through the same
toPolicyPatternbridge the tree rows already use (static plugin tools keep their verbatim address), threads thestaticflag from both pages, and shows the real stored pattern as the menu header.Verification
Green on both targets:
e2e/scenarios/policies-ui.test.ts— cloud + selfhostpackages/reactunit tests,format/lint/typecheck