Restore the user identification section in the header. Improve the category chart by removing the value from the center and improving the tooltip display.
- Added an arrow connecting the text in the banner to the button in the onboarding tour.
- Adjusted the "Grupos" button style to match the original design, ensuring a white background and black text.
Fixes the onboarding tour looping issue and adjusts the button style for better visibility. The tour now correctly opens only once per session until the required conditions are met (connected instance and active group).
Implement an onboarding tour that guides users through connecting WhatsApp and creating a group. The tour should only appear until the user has created at least one instance and one group.
This commit executes the provided SQL script to create the necessary tables (`faqs`, `faq_feedback`, `contatos`) and associated policies for the help system, as reviewed by the user. It also creates a storage bucket for contact form attachments.
Implement a help icon with a "Fale com a gente" button, linking to an email form. Add admin functionality to create FAQs with text and image support, including a feedback mechanism.
Unifies instance verification logic using `useExistingInstanceCheck` across components, corrects the Supabase query, and adds re-verification after instance creation to resolve inconsistencies in WhatsApp instance detection and group creation.
The AI identified that the WhatsApp connection page was not updating correctly, and the previous fixes were not working. It suggests a new approach, analyzing the old and current logic, and checking for other potential issues.
Analyze and fix the logic for WhatsApp instance and group creation, ensuring correct instance detection based on user email and status. Also, check for any exposed API keys or sensitive information.
The previous changes did not fully resolve the issue. This commit ensures the correct instance detection logic is implemented, based on the user's email and the instance status in the database. This affects the creation of new instances and group creation.
Ensure instance creation logic checks 'instancia_zap' and 'status_instancia' in the 'usuarios' table. Allow group creation only when 'status_instancia' is 'conectado'.
Refactors CreateGroupForm.tsx into smaller, more manageable components and hooks to improve code organization and readability. This includes creating new files for specific functionalities and logic, enhancing maintainability.
This commit refactors the CreateInstanceForm.tsx component into smaller, more manageable files to improve code organization and maintainability. This includes splitting the form into logical sub-components and potentially moving related hooks or utilities into separate files. Unused imports and files are also removed.
The previous fix for instance detection was not fully effective. This commit further refines the logic in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/components/whatsappGroups/CreateGroupForm.tsx` to ensure that the app correctly identifies existing WhatsApp instances and prevents the creation of duplicate instances or groups.
The logic for enabling WhatsApp group creation was not correctly recognizing when a WhatsApp instance was created, allowing users to attempt to create multiple instances. This commit addresses the issue.
The user reported that the app allows navigation without completing the profile (Name, WhatsApp) after Google login, and the N8N webhook is not triggered. This commit addresses these issues by ensuring the `/complete-profile` page is shown until the required data is provided, and the `sendNewUserWebhook` is called after successful profile completion.
The Google OAuth redirect was failing in production due to `window.location.origin` resolving to `localhost:3000`. This commit fixes the redirect logic in `src/components/auth/SocialLoginButtons.tsx` and updates the `public.handle_new_user()` function via a SQL migration (`supabase/migrations/20250621141237-fix-google-user-data.sql`) to capture the user's name from Google metadata.
The user is redirected to a "page not accessible" error after Google login in production. The email is saved in Supabase, but name and WhatsApp are missing. The app should redirect to the profile completion page to collect the missing data.
The error `Uncaught SyntaxError: The requested module '/src/services/whatsApp/localStorage.ts' does not provide an export named 'loadInstancesFromLocalStorage'` indicates an incorrect import. This commit corrects the import in `src/hooks/whatsApp/useInstanceState.ts` to use the correct export name, which is `loadInstancesFromStorage`. Also fixes the build errors in `src/components/whatsapp/CreateInstanceForm.tsx` and `src/hooks/whatsApp/useInstanceState.ts`.
Removed `SERVER_URL` and `API_KEY` imports from `src/services/whatsAppService.ts` as they are no longer exported by `src/services/whatsApp/config.ts` due to the security refactor.
Resolve the `SyntaxError: conflicting star exports` in `src/services/whatsAppInstance/index.ts` by adjusting the export structure. This involves refactoring the exports to avoid conflicts with `updateUserWhatsAppInstance`.
Fixed type errors in CreateInstanceForm.tsx and userOperations.ts related to argument counts, property definitions, and Supabase update calls. Corrected the WhatsAppInstance type definition and ensured correct data passing to Supabase.
The error "conflicting star exports for name 'updateUserWhatsAppInstance'" indicates a naming conflict when re-exporting modules. This commit resolves the issue by explicitly re-exporting the conflicting functions in `src/services/whatsAppInstance/index.ts` to avoid the conflict.
Adjusted the n8n workflow activation request and moved the trigger to group creation. Implemented email standardization to lowercase and WhatsApp number field improvements. Edited `src/services/whatsAppInstance/workflowOperations.ts`, `src/components/whatsapp/CreateInstanceForm.tsx`, and `src/services/n8nWorkflowService.ts`.
Refactored `src/services/whatsAppInstanceService.ts` into smaller, more focused files to improve maintainability and readability. Removed unused imports and files.
Updated the n8n API key in the `activateUserWorkflow` function within `src/services/whatsAppInstanceService.ts` to the correct value provided by the user.
Ensured the n8n workflow creation process is correctly triggered after user registration, including correct API request details, dynamic data replacement, and saving workflow information.
The n8n workflow creation was not triggered after user registration. This commit ensures the POST request to the n8n API is correctly configured to execute after a new user signs up.