Skip to content

feat: 策略提案批量審核 (#493)#494

Merged
cct08311github merged 3 commits intomainfrom
feat/issue-493-batch-review
Mar 28, 2026
Merged

feat: 策略提案批量審核 (#493)#494
cct08311github merged 3 commits intomainfrom
feat/issue-493-batch-review

Conversation

@cct08311github
Copy link
Copy Markdown
Owner

Summary

  • API: POST /api/strategy/proposals/batch/{action} — 批量核准/拒絕,最多 50 筆/次,逐筆寫 audit log,partial failure handling
  • API: GET /api/strategy/proposals/batch-approve-all?token= — Telegram URL 按鈕一鍵核准所有 pending
  • Frontend: Strategy 頁新增 checkbox 多選 + 批量操作列(核准/拒絕/取消)+ 確認 dialog
  • Telegram: 通知 ≥2 筆時附「一鍵全部核准 (N)」URL 按鈕

Test plan

  • 12 backend tests (test_batch_decide.py): happy path, validation, partial failure, audit log, URL endpoint
  • Frontend build passes (npm run build)
  • Manual: curl batch-decide → verify succeeded/failed response
  • Manual: Strategy 頁勾選 → 批量核准 → 確認 dialog → status 更新

Closes #493

🤖 Generated with Claude Code

cct0831 added 3 commits March 28, 2026 19:50
- POST /api/strategy/proposals/batch/{action}: batch approve/reject
  up to 50 proposals, individual audit log per proposal
- GET /api/strategy/proposals/batch-approve-all?token=: one-click
  approve all pending (Telegram URL button)
- 12 tests in test_batch_decide.py

Closes #493
- Checkbox column in proposals table (pending rows only)
- Select-all toggle, batch action bar, batch confirmation dialog
- batchDecide() API client + batchAct hook callback
- Selection auto-clears on data refresh

Closes #493
- When ≥2 proposals notified in one batch, sends summary message
  with '一鍵全部核准 (N)' URL button → /proposals/batch-approve-all
- Only 'approve all' offered (no 'reject all' for safety)
- Non-blocking: failure to send summary doesn't affect main flow

Closes #493
@cct08311github cct08311github merged commit 227c9d9 into main Mar 28, 2026
4 of 5 checks passed
@cct08311github cct08311github deleted the feat/issue-493-batch-review branch March 28, 2026 12:16
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.

feat: 策略提案批量審核 (batch approve/reject)

1 participant