feat(batch): add failure details to batch operations with expandable result modal

- Backend: return per-item failure details (id, name, reason) for all batch operations
- Frontend: add BatchActionResultModal component to display failures
- Support delete/pause/resume/redeploy/change-tunnel for forwards and tunnels
This commit is contained in:
sagitchu
2026-03-13 10:20:36 +08:00
parent 8b8ebb6092
commit d1e3c59537
11 changed files with 957 additions and 43 deletions
@@ -0,0 +1,11 @@
# 规则/隧道下发失败原因可见性修复计划
- [x] 检查规则与隧道批量重新下发链路,确认失败原因在哪一层被丢失
- [x] 为后端批量下发接口补充失败明细返回
- [x] 为前端规则/隧道批量下发提示补充具体失败原因展示
- [x] 运行针对性验证并更新结论
## 验证结论
- 已通过 `go test ./tests/contract/... -run BatchRedeploy` 验证后端会返回批量下发失败明细。
- 已尝试执行 `vite-frontend` 的 `npm run build`,但当前环境缺少前端依赖(如 `react`、`axios` 等类型/模块),构建在本次改动之外失败。
@@ -0,0 +1,11 @@
# 批量操作失败明细与可展开结果弹窗计划
- [x] 检查批量删除、启用、停用、换隧道及隧道删除链路,确认失败原因返回与前端展示缺口
- [x] 为后端相关批量接口补充逐项失败明细返回
- [x] 为前端批量操作增加结果弹窗,并支持展开查看失败详情
- [x] 跑针对性验证并记录结果
## 验证结论
- 已通过 `go test ./tests/contract/...` 验证后端合同测试全部通过。
- 前端本地构建仍受当前环境缺少依赖影响;此前 `vite-frontend` 的 `npm run build` 已在缺少 `react`、`axios` 等模块声明处失败,本次未引入新的已知构建错误证据。