Repository navigation
fix(dashboard): allow re-adding a disabled ACP runner key - #1824
Open
fengyue-xve wants to merge 2 commits into
Open
fengyue-xve wants to merge 2 commits into
fengyue-xve wants to merge 2 commits into
Conversation
The create/edit guard rejected any existing runner key with "runnerKeyExists", so a custom runner that had been disabled could never be added again under the same name. Only enabled or builtin keys now collide; saving over a disabled custom entry overwrites it (the create form defaults enabled=true, so the runner comes back enabled). Covered by ACPPanel.test.tsx. Fixes TencentCloud#1815
Author
|
The Windows job is red on the unrelated flaky |
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.
Summary
Fixes #1815. The ACP runner create/edit form rejected any existing runner key with
runnerKeyExists, so once a custom runner had been disabled there was no way to add it back under the same name — and disabled custom runners are exactly the state a user is most likely to re-add. Builtin runners cannot be deleted, so for them the form was a dead end too.The save guard now only treats enabled or builtin keys as collisions:
Target branch
develop(feature / fix — default)Type of change
Test plan
npx tsc -b— cleannpx eslinton both changed files — clean (the two pre-existingreact-hooks/exhaustive-depswarnings inACP/index.tsxare untouched)npx vitest run src/pages/Agent/ACP— 3 passed: newACPPanel.test.tsxcovers re-adding a disabled custom runner (singlePUT, re-enabled) plus both rejection paths (enabled custom / disabled builtin → toast, no request at all)Verified the regression test fails on the unpatched guard: with the old code the "re-adds a disabled custom runner" case times out while
runnerKeyExistsis shown, and passes with the fixFull-suite
npx vitest run(local Windows): 1187 passed; the remaining failures are pre-existing on the develop base and unrelated to this diff (same set documented in fix(dashboard): localize remaining hardcoded Chinese UI strings (browser AI panel, skill recording, PWA guides) #1799):DOMMatrix is not defined(pdfjs in jsdom) when collectingdocxSanitize/skillMarkdown/SkillDrawer,knowledgeBases/publishedExpertsmocks on the base missing the newerbridgeAgentHeadersexport, and one rc-notification close-timer error attributed toChannelsPanel.test.tsxAdded/updated tests
make allpasses locally (the Python harnessmake alldoes not apply to a dashboard-only change; the dashboard checks above were run instead)Checklist
CHANGELOG.md(if user-facing)