Commit Graph

54 Commits

Author SHA1 Message Date
Aj Wazzan
62576c0054 refactor: update environment variable access and clean up sidebar component
- Changed access of NEXT_PUBLIC_APP_URL from global variable to env object.
- Removed unused GoldenTicketModal component from AppSidebar.
- Enhanced AiChatPrompt documentation for clarity on using buildGmailSearchQuery.
- Updated Gmail search query tool description and schema for better understanding.
2025-05-15 17:54:12 -07:00
advitxsingh
1777313a85 fix to bin counter, previously only counted unread in bin, now does for all 2025-05-15 17:08:37 +05:30
Aj Wazzan
ccfa47e677 fix: update getCurrentDateContext to include time and integrate current date in AI chat prompt 2025-05-14 17:53:03 -07:00
Aj Wazzan
85bc2a0649 feat: add Gmail search query builder tool and enhance chat functionality with new system prompt 2025-05-14 17:50:41 -07:00
Aj Wazzan
00c9a00e59 refactor: update stale time in useThreads hook to 1 minute and simplify getMailManager function by removing unnecessary instance variable 2025-05-14 16:10:36 -07:00
Aj Wazzan
b6b34cb1aa refactor: implement Tools enum for consistent tool management and enhance AI chat functionality with new tool integrations 2025-05-14 00:09:48 -07:00
Aj Wazzan
d0037f6f50 refactor: enhance AI chat functionality by adding error handling, optimizing tool execution, and improving email composition logic 2025-05-13 22:19:17 -07:00
BlankParticle
7736d0f0f8 feat: access hono context from anywhere 2025-05-13 16:22:47 +05:30
Dak Washbrook
6936dd008d Refactor connection error handling and improve redirect logic
Removed redundant checks for connection tokens and streamlined error handling in server utilities. Enhanced redirect logic in the query provider to avoid unnecessary navigation when already on the target path.
2025-05-12 16:01:17 -07:00
Dak Washbrook
b7c089dc17 Merge branch 'staging' into dakdevs/staging/broken-connections 2025-05-12 10:44:13 -07:00
Dak Washbrook
37ad90cef7 Remove redundant error message from unauthorized exception
The error message was unnecessary as the 'UNAUTHORIZED' code is sufficient to convey the issue. This simplifies the error handling and avoids potential redundancy or confusion in the system behavior.
2025-05-11 23:50:11 -07:00
Dak Washbrook
787451d147 Remove redundant X-Zero-Redirect header setting.
The X-Zero-Redirect header logic was unnecessary and has been removed to streamline error handling. Error messages and redirection logic are now handled solely through TRPCError.
2025-05-11 23:48:44 -07:00
BlankParticle
0e2fede25e chore: add server side redirects 2025-05-12 12:00:03 +05:30
Dak Washbrook
cd65023230 Enable X-Zero-Redirect header support in server responses.
Added `X-Zero-Redirect` to both allowed and exposed headers in CORS configuration to ensure it can be utilized by the client. Removed an unnecessary TRPC error throw related to connection authorization for cleaner response handling.
2025-05-11 23:11:03 -07:00
Dak Washbrook
239c23d37f Handle disconnection redirects with server-set headers
Introduced the 'X-Zero-Redirect' header to streamline disconnection handling. Removed client-side redirection logic tied to "Invalid tokens" and updated the fetch interceptor to handle redirects based on the new header. This ensures a cleaner and more centralized redirection flow.
2025-05-11 22:56:37 -07:00
Dak Washbrook
6b9ec34289 Update dependencies for Drizzle and Radix libraries
Upgraded "drizzle-kit" to 0.31.1 and adjusted "drizzle-orm" versioning for consistency. Additionally, updated Radix dependencies to their latest versions to ensure compatibility and improvements.
2025-05-11 22:45:22 -07:00
Dak Washbrook
3a00821cfc Update Drizzle Kit and handle invalid tokens gracefully
Upgraded `drizzle-kit` to version 0.31.1 for improved functionality. Updated the schema to refine token fields and added logic to handle invalid tokens by nullifying them and redirecting users to reconnect. Enhanced connections API to identify and return disconnected connections for better user experience.
2025-05-11 22:35:30 -07:00
BlankParticle
b62923bf88 fix: missing execution ctx 2025-05-12 10:51:24 +05:30
Aj Wazzan
69bd73e705 feat: add email subject generation functionality in EmailComposer and TRPC 2025-05-11 20:23:02 -07:00
Aj Wazzan
6033deee2c fix: update AiSummary to correctly access summary data structure 2025-05-11 15:09:22 -07:00
Aj Wazzan
e3f70d18fd refactor: simplify thread summary retrieval in brainRouter by using zero.getSummary 2025-05-11 15:04:05 -07:00
Aj Wazzan
d0e5d4fa1b feat: enhance NotificationProvider to handle message types and invalidate queries based on thread ID 2025-05-11 14:46:55 -07:00
needle
4526f253a6 fix(thread): attachment rendering 2025-05-11 23:41:04 +03:00
BlankParticle
1e1a0024a7 fix: use different cookie based on NODE_ENV 2025-05-12 00:08:11 +05:30
Adam
63f661940a Merge pull request #933 from Mail-0/fix/local-dev-server
fix: local dev mode for zero backend
2025-05-11 11:17:39 -07:00
Aj Wazzan
ffc5911e13 feat: add party-related components and integrate party functionality in MailLayout, update package dependencies, and configure DurableMailbox for session management 2025-05-10 23:55:23 -07:00
BlankParticle
b9862fbd58 fix: local dev for zero backend 2025-05-11 10:55:14 +05:30
Aj Wazzan
168d8ace51 feat: integrate TagInput component for autolabeling settings in MailLayout, add getLabels and updateLabels procedures in brain router, and update dependencies in package.json 2025-05-10 17:51:45 -07:00
Aj Wazzan
e894e3c313 refactor: streamline onboarding component, enhance search value handling, and improve draft filtering logic 2025-05-10 16:01:19 -07:00
Aj Wazzan
f80b9cf19b refactor: enhance brain functionality in MailLayout, clean up NavUser component, and improve error handling in server utilities 2025-05-10 14:30:02 -07:00
Aj Wazzan
1f5799eb4d refactor: improve EmailComposer and MailLayout components, enhance brain functionality, and clean up NavUser component 2025-05-10 13:25:20 -07:00
Nizzy
aa97bf573a staging fix 2025-05-10 11:45:59 -05:00
Aj Wazzan
d07e4f0f8e refactor: update connection handling and improve layout in NavMain component 2025-05-09 22:23:36 -07:00
BlankParticle
d66dbc07b5 chore: redirect non api calls to frontend 2025-05-09 22:49:34 +05:30
BlankParticle
f64558f0fa fix: set cookie expiry to actually 7 days 2025-05-09 22:31:21 +05:30
BlankParticle
408ca510c3 chore: add redis storage for better-auth 2025-05-09 22:07:09 +05:30
BlankParticle
74483dd4ae fix: update callbackURL with link social to use correct url 2025-05-09 15:10:54 +05:30
Dak Washbrook
d87b723372 Merge branch 'staging' into dakdevs/staging/grant-error-handling 2025-05-08 23:09:36 -07:00
Dak Washbrook
e1db829363 Remove unnecessary console.log statements in mail routes
Eliminated debug logs ('tr123' and 'tr246') from the mail route handler to clean up the codebase. These statements were not serving any functional purpose and were likely left behind from debugging.
2025-05-08 22:46:26 -07:00
Dak Washbrook
11d3ef644b Refactor error handling and remove unnecessary logs
Removed redundant logging statements to improve code clarity and maintainability. Also added signOut call in deleteActiveConnection to ensure proper cleanup of user sessions.
2025-05-08 22:45:05 -07:00
Aj Wazzan
3423457351 refactor: clean up onboarding component by reordering imports, improving formatting, and ensuring consistent video object structure 2025-05-08 22:36:21 -07:00
Dak Washbrook
d1b22fd673 Handle missing OAuth scopes gracefully with error messaging
Implemented error handling for missing OAuth scopes, displaying user-friendly messages in the login flow. Enhanced TRPC middleware and client logic to trigger logout and redirect users to a dedicated error state. Refactored error indicator components to ensure UI consistency.
2025-05-08 22:34:38 -07:00
Aj Wazzan
3947eef8fa fix: update API endpoint in AIChat component and server for consistency 2025-05-08 22:17:06 -07:00
Aj Wazzan
c2615a0f48 fix: update API endpoint in server and AIChat component for consistency 2025-05-08 22:13:08 -07:00
Aj Wazzan
3df2627272 feat: add connection limit retrieval and update wrangler configuration with new kv_namespaces and DEFAULT_BRAIN_LIMIT 2025-05-08 22:08:44 -07:00
Aj Wazzan
979c590b4e refactor: remove console log from MailPage and streamline sign-out process in NavUser 2025-05-08 21:47:30 -07:00
Aj Wazzan
e822d352e3 feat: add COOKIE_DOMAIN to environment variables and update auth provider scopes 2025-05-08 21:17:26 -07:00
BlankParticle
78e52a86ce fix: cookie domain 2025-05-09 08:54:04 +05:30
BlankParticle
88a64e05b4 fix: update urls 2025-05-09 01:32:11 +05:30
BlankParticle
1546386c63 fix: cors target 2025-05-09 01:20:31 +05:30