Neilblaze opened a new pull request, #3469: URL: https://github.com/apache/apisix-dashboard/pull/3469
Please answer these questions before submitting a pull request, **or your PR will get closed**. **Why submit this pull request?** - [x] Bugfix **What changes will this PR take into?** Adds an e2e regression test for #3464, where deleting a single plugin from a plugin config cleared every plugin on submit. The bug lives in the dashboard bundled with APISIX 3.17.0, built from c8d3466d. At that commit, `PluginCardList` kept a MobX `useLocalObservable` store, and its computed `list` captured the `onDelete` handler from the first render. That render happens before `form.reset()` fills in the fetched values, so the captured handler closed over an empty `plugins` object. Deleting any card then rewrote `plugins` from that stale empty snapshot and wiped everything. The other card actions just open the editor drawer and were unaffected, which is why the existing CRUD specs stayed green. Master is not affected. ec0fce26 (#3446) replaced the store with a plain `useMemo`, which removed the stale capture. Since no test pins this scenario, this PR adds one. The spec seeds a plugin config with three plugins through the Admin API, deletes one card in the UI, saves, then checks against the gateway that only that plugin is gone and that a fresh page load agrees. Verified against a real gateway: - the spec passes on master, tested against both `apache/apisix:3.17.0` and `apache/apisix:dev` - the same driver fails on the UI bundled in `apache/apisix:3.17.0`, which reproduces the issue exactly `pnpm lint` and `pnpm test` (136 tests) also pass. For users on 3.17.0, the fix ships once apache/apisix bumps `APISIX_DASHBOARD_COMMIT` past ec0fce26. **Related issues** fix #3464 **Checklist:** - [x] Did you explain what problem does this PR solve? Or what new features have been added? - [x] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? - [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
