Skip to content

feat(admin): bulk edit filtered account selection#1335

Open
LvyuanW wants to merge 14 commits intoWei-Shaw:mainfrom
LvyuanW:lvyuan/dev
Open

feat(admin): bulk edit filtered account selection#1335
LvyuanW wants to merge 14 commits intoWei-Shaw:mainfrom
LvyuanW:lvyuan/dev

Conversation

@LvyuanW
Copy link
Copy Markdown
Contributor

@LvyuanW LvyuanW commented Mar 27, 2026

Summary

  • add a filter-based account selection target for admin bulk edit
  • add a selection preview endpoint so the bulk edit modal can resolve total/platform/type across the full filtered result set
  • update the account list UI to support "select current page -> select all filtered results"

Root Cause

The admin account page only tracked explicit in-memory account_ids from the current page, and the bulk edit API only accepted account_ids. That made it impossible to bulk edit all filtered accounts, and the modal could infer editable fields from an incomplete sample instead of the true target set.

Impact

  • admins can bulk edit all accounts in the current filtered result set without paging through the table
  • filtered-result selection is cleared when filters change, preventing stale bulk targets
  • the same server-side filter parsing is now shared by list, export, preview, and bulk edit paths

Validation

  • env GOCACHE=/tmp/sub2api-go-cache go test ./internal/handler/admin ./internal/server/...
  • pnpm exec vitest run src/components/account/__tests__/BulkEditAccountModal.spec.ts src/components/admin/account/__tests__/AccountBulkActionsBar.spec.ts
  • pnpm exec vue-tsc --noEmit

LvyuanW added 4 commits March 23, 2026 02:30
重构错误详情弹窗和错误日志表格中的用户/账户信息显示逻辑,使其更清晰和完整。主要变更包括:

- 在错误详情弹窗中,优先显示账户信息(针对上游错误),并在适当时显示次要的用户或账户信息
- 在错误日志表格中,优化用户和账户信息的显示优先级,并在主要显示用户信息时添加账户信息作为次要显示
- 新增格式化函数统一处理用户和账户标识的显示逻辑,提高代码复用性
- 扩展上游事件详情网格为三列布局,增加账户信息显示
添加 OpsErrorLogTable 和 OpsErrorDetailModal 组件的单元测试,覆盖用户信息展示逻辑
- 测试表格中请求错误和上游错误的用户与账号名显示优先级
- 测试详情模态框中数据加载和关联上游错误的账号信息展示
@LvyuanW LvyuanW marked this pull request as ready for review March 27, 2026 04:27
@LvyuanW LvyuanW changed the title [codex] feat(admin): bulk edit filtered account selection feat(admin): bulk edit filtered account selection Mar 27, 2026
LvyuanW added 8 commits March 31, 2026 09:50
# Conflicts:
#	frontend/src/views/admin/ops/components/OpsErrorDetailModal.vue
#	frontend/src/views/admin/ops/components/OpsErrorLogTable.vue
# Conflicts:
#	backend/internal/handler/admin/account_data.go
#	backend/internal/handler/admin/account_handler.go
#	frontend/src/views/admin/AccountsView.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant