- Replace imperative authenticatedFetch with createDocumentMutationAtom
- Use mutation's isPending state instead of local isSubmitting state
- Maintain backward compatibility with existing UI behavior
- Keep all validation, error handling, and toast notifications
- Remove dependency on auth-utils for API calls
- Replaced direct localStorage token access with a centralized `getBearerToken` function across various components and hooks to improve code maintainability and security.
- Updated API calls to use `authenticatedFetch` for consistent authentication handling.
- Enhanced user experience by ensuring proper redirection to login when authentication fails.
- Cleaned up unused imports and improved overall code structure for better readability.
- Renamed "Documents" section to "Sources" in the dashboard layout.
- Updated routing for adding sources and managing documents.
- Refactored the connectors and documents upload pages to redirect to the new sources section.
- Added localization support for the new "Sources" terminology in English and Chinese.