feat(integrations): add S3 configuration view for document analysis section
Summary
Add complete S3 integration support to the Document Analysis section's integration modal. Users can now:
- Create and manage AWS S3 bucket accounts
- Configure indexing mode (full or selective with folder selection)
- Set indexation frequency (daily, weekly, monthly)
- Save S3 credentials securely with backend API integration
Changes Made
-
New Component:
s3-config-view.tsx- Complete S3 configuration interface- Account selection/creation with AWS credentials
- Bucket name, Access Key ID, Secret Access Key, Region fields
- Full integration with S3IndexingCard and S3FrequencyCard
- Error handling and validation
-
Modified Files:
integration-connection-modal.tsx- Added import for S3ConfigView
- Added cases for 's3' and 'amazon-s3' platformIds
- Integrated S3ConfigView with proper callbacks
-
Bug Fix: Replaced native HTML
<select>withCustomSelectcomponent for UI consistency
Test Plan
-
Click on S3 integration card → "Connecter" button -
Verify modal opens with account selection dropdown -
Click "Créer un nouveau compte" and fill in all required fields: - Account name (e.g., "Mon S3 Prod")
- Bucket name (e.g., "my-data-bucket")
- Access Key ID
- Secret Access Key
- AWS region (e.g., "us-east-1")
-
Verify account is created and appears in dropdown -
Verify S3IndexingCard displays with mode selection (full/selective) -
Verify S3FrequencyCard displays with frequency options -
Select "Sélectif" mode and verify folder selector button appears -
Click folder selector and verify FolderSelectionModal opens -
Click "Enregistrer" and verify modal closes -
Verify account was persisted by refreshing and checking account list -
Test error messages when submitting incomplete form -
Test canceling account creation
Technical Details
Backend API Calls
-
POST /integrations/accounts/amazon_s3- Create account -
GET /integrations/folders/amazon_s3/{accountUid}- Load folders
Stores Used
-
useAnirAccountsStore- Account CRUD operations and folder loading
Components Reused from Wizard
-
S3GuideCard- Configuration guide -
S3IndexingCard- Indexing mode selection -
S3FrequencyCard- Frequency and day selection