Skip to content

Conversation

@evemcgivern
Copy link

Summary

Adds batch selection and approval functionality for managing multiple approval requests at once in both the Web Dashboard and VS Code Extension.

Features

  • Batch Selection Mode: Toggle to enter selection mode with checkboxes on approval cards
  • Select All / Deselect All: Quick selection controls in the header
  • Batch Actions: Approve All, Revise All, Reject All buttons
  • Visual Feedback: Selected count display, processing states, semantic colors
  • Dark Mode Support: Proper hover states for both light and dark themes

Technical Changes

  • Added batch message types and handlers to vscode-api.ts
  • Implemented batch processing methods in SidebarProvider.ts
  • Added selection state management in App.tsx
  • Sticky footer for batch actions in narrow sidebar
  • Complete i18n support for all 11 locales

Files Changed

  • vscode-extension/src/webview/App.tsx - Main UI changes
  • vscode-extension/src/webview/lib/vscode-api.ts - Batch API methods
  • vscode-extension/src/extension/providers/SidebarProvider.ts - Backend handlers
  • vscode-extension/src/webview/locales/*.json - All 11 locale files
  • Web dashboard batch approval files (previous commit)

Test Plan

  • TypeScript compilation passes
  • ESLint passes (both main project and extension)
  • All 136 unit tests pass
  • i18n validation passes for all locales
  • Extension compiles successfully
  • Manual testing of batch selection in VS Code

🤖 Generated with Claude Code

evemcgivern and others added 2 commits December 31, 2025 16:43
Web Dashboard:
- Add batch selection mode with Select/Cancel toggle
- Add checkboxes for multi-select in selection mode
- Add sticky footer with batch Approve/Reject/Revision buttons
- Add undo functionality for batch operations (30s window)
- Disable individual Quick Approve/Reject when multiple selected
- Add useBatchActions tooltip translation (11 languages)

VS Code Extension:
- Add selection mode with header toggle button
- Add checkboxes on approval cards in selection mode
- Add sticky footer with Approve All/Reject All buttons
- Hide individual action buttons in selection mode
- Add batch message types and handlers in SidebarProvider
- Add translations for batch selection UI (en, ja)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add "Revise All" batch action button with amber color
- Add RotateCcw icon import for revision action
- Fix dark mode hover states for batch buttons
- Update button sizes to h-6 px-2 for consistency
- Add batch selection i18n keys to all 11 locales
- Fix lint warnings (curly brace style)
- Add .claude-context to .gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copilot AI review requested due to automatic review settings December 31, 2025 23:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive batch approval functionality to both the Web Dashboard and VS Code Extension, allowing users to select multiple approval requests and process them with a single action. The implementation includes proper i18n support across 11 locales, batch processing with continue-on-error semantics, and an undo feature for the dashboard.

Key Changes:

  • Batch selection UI with checkboxes and "select all" functionality in both interfaces
  • Backend batch endpoints with validation, size limits (100 items), and ID format checking
  • Undo functionality with 30-second window for the dashboard
  • CORS and CSP updates to support Vite dev server for improved development experience

Reviewed changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
vscode-extension/src/webview/App.tsx Adds batch selection mode, handlers for batch approve/reject/revision, and sticky footer UI
vscode-extension/src/webview/lib/vscode-api.ts Adds three new batch message types and corresponding API methods
vscode-extension/src/extension/providers/SidebarProvider.ts Implements batch operation handlers with continue-on-error logic
vscode-extension/src/webview/locales/*.json Adds batch-related i18n strings for all 11 supported locales
src/dashboard_frontend/src/modules/pages/ApprovalsPage.tsx Implements batch selection, confirmation modals, undo feature with toast notifications
src/dashboard_frontend/src/modules/modals/ConfirmationModal.tsx Updates to support async confirmation handlers with loading state
src/dashboard_frontend/src/modules/api/api.tsx Adds batch operation API methods and BatchApprovalResult type
src/dashboard_frontend/src/locales/*.json Adds extensive batch-related i18n strings for all 11 dashboard locales
src/dashboard/multi-server.ts Implements batch approval/rejection endpoints with validation and undo endpoint
src/dashboard/approval-storage.ts Adds revertToPending method for undo operations
src/dashboard_frontend/vite.config.ts Configures Vite proxy for API and WebSocket forwarding
src/core/security-utils.ts Updates CORS and CSP to allow Vite dev server in non-production environments
src/core/__tests__/security-utils.test.ts Updates test expectations for dynamic CORS origins
vscode-extension/src/extension/services/ImplementationLogService.ts Code formatting changes (return statement style)
.gitignore / vscode-extension/.gitignore Adds .claude-context to ignore list
package-lock.json Version bump to 2.1.7

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

evemcgivern and others added 7 commits December 31, 2025 17:08
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix CORS origin validation to be permissive in non-production mode
  (resolves 403 Forbidden errors when running Vite dev server)
- Fix race condition with undoTimeoutId in ApprovalsPage.tsx
- Add useEffect cleanup for memory leak prevention
- Add error notification for undo failures
- Fix vite.config.ts port mismatch (5002 → 5000)
- Add BATCH_SIZE_LIMIT and BATCH_OPERATION_FEEDBACK_DELAY constants
- Add batch size validation to VS Code extension handlers
- Add batch.tooMany i18n translations to all 11 locale files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove redundant successfulUpdates array in multi-server.ts (use results.succeeded)
- Remove debug logging from approval handlers (production cleanup)
- Add comprehensive test coverage for generateAllowedOrigins/Vite dev port
- Refactor SidebarProvider batch methods using DRY helper (executeBatchOperation)
- Add BATCH_SIZE_LIMIT validation to VS Code extension backend
- Fix ConfirmationModal error handling (catch errors, display message, keep modal open)
- Improve VS Code batch handlers with proper backend confirmation tracking
  - Use pendingBatchOperation ref to track in-flight operations
  - Clear state on actual backend notification instead of fixed timeout
  - Add fallback timeout for network failure safety

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@evemcgivern
Copy link
Author

Ready for maintainer review.

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