Commit Graph

6 Commits

Author SHA1 Message Date
Adam
cc0ffd5f79 Staging (#749)
* draft fixes:
- added cc and bcc when saving drafts
- save drafts less aggresively

* some fixes for saving attachments to draft

* fix for empty draft loading

* fix draft list recipient name/address

* also show 'No Recipient' if empty

* remove comments

* switch to mimetext for draft saving to keep formatting consistent

* add message title to draft list

* feat: single api for oauth connections

* fix: add extra error handling

* chore: simplify and fix the dev env

* Ai generate security (#706)

* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* https://github.com/Mail-0/Zero/pull/706#discussion_r2049650081

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* https://github.com/Mail-0/Zero/pull/706#discussion_r2049650112

* https://github.com/Mail-0/Zero/pull/706#discussion_r2049650106

* https://github.com/Mail-0/Zero/pull/706#discussion_r2049650097

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add a new Vietnamese translation file to support Vietnamese language users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings

* Update es.json (#710)

Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>

* Update app manifest and add new icons for PWA (#739)

* feat: allow sending from email aliases added through gmail (#743)

* Refactor IP handling in early-access routes

* Add unauthorized error handling in sign out function

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: grim <75869731+ripgrim@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Chánh Đại <dai@chanhdai.com>
Co-authored-by: Dani B. <danibaldomirm@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Humber Nieto <56887259+humbernieto@users.noreply.github.com>
Co-authored-by: Atharva Deosthale <atharva.deosthale17@gmail.com>
2025-04-22 11:03:55 -07:00
nizzy
c4172c297c Staging (#696)
* add: add dockerfile

* add: docker-compose.yaml

* cleanup

* cleanup

* update dockerfile.

* - switched to react-hotkeys-hook
- refactor hotkeys
- add hotkey recorder

* add: docker-compose.yaml

* feat: add farsi support

* hotkeys

* feat: save hotkeys to indexedDB

* remove console logs from shortcuts

* fix: load all shortcuts by default

* fix: add key for selectAll in en.json

* hotkeys db and api route
- added route for hotkeys
- added table for hotkeys
- indexdb for hotkeys (synced with db)

* fix hotkeys db loading too many times

* remove comments

* fix: remove unused imports

* fix: better handling of indexdb and syncing with postgres db

* remove comments from hotkeys files

* Refactor email creation component imports and structure

---------

Co-authored-by: Muhammad-Owais-Warsi <warsimuhammadowais@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: essinn <ehsan.raj@hotmail.com>
Co-authored-by: Adam <x_1337@outlook.com>
2025-04-17 02:51:53 -04:00
Aj Wazzan
de1ed1ea73 refactor: Rename project from Mail0 to 0.email
- Updated docker-compose container names and database names
- Replaced Mail0 references with 0.email in README, ROADMAP, and various source files
- Updated GitHub repository links and references
- Adjusted environment variables and configuration files
- Corrected branding across UI components and documentation
2025-03-06 14:04:44 -08:00
Rahul Mishra
fbc1e73d65 feat: type safe env (#161) 2025-02-13 11:22:48 -05:00
nizzy
a5a3e2ab04 Multi gmail connection (#148)
* feat: Integrate Google OAuth and SWR for mail threads

* refactor: simplify mail list and navigation UI

* feat: enhance mail parsing and UI with sender details and unread status

* chore: update pnpm lock with new dependencies

* refactor: organize imports in app-sidebar component

* dynamic rendering data

* chore: update .gitignore with IDE-specific exclusions

* refactor(mail): update routing and component structure for mail views

* refactor(mail): remove draft and junk routes; update folder names to proper terms in UI and API

* refactor(mail): clean up imports, adjust API endpoints, and improve mail component structures for better clarity and performance

* automatic search

* YOP!

* KIND OF lint. lmao.

* feat:gmail connection WIP

* feat(mail): add mail count endpoint and dynamic sidebar stats

* feat(mail): add sanitization and dynamic provider support for email rendering

* grim's changes

* feat(mail): implement indexedDB caching for email threads and improve SWR configuration in layout component

* feat(mail): enhance indexedDB operations for email threads caching and update SWR configuration for better data handling

* idk

* fix(mail): adjust email body processing and reverse cached email messages for consistent order

* Fullscreen (#154)

* FULL SCREEN!!! RAH!!!

* Update mail-display.tsx

* auth

* email dispaly

* gmail connection

* env example resend add

* fix: env issues

* refactor: replace nanoid with randomUUID for ID generation in early access and update database schema to unify connection table

* refactor: update API endpoint for email connections and modify driver initialization for async support across mail routes

* feat: enhance Gmail OAuth flow and connection handling

- Update Google OAuth driver with expanded scopes and improved token management
- Modify callback route to handle user info extraction and connection creation more robustly
- Add unique constraint to email in connection table
- Improve error handling and logging in authentication process

* fix: improve error responses and connection handling in Gmail integration

- Enhance error messages when tokens or emails are missing.
- Update handling of Gmail connections in the API and user-related components

* feat: add default connection support and improve connection switching

- Add `defaultConnectionId` to user schema
- Implement PUT endpoint to set default connection for a user
- Update mail API routes to use dynamic provider and connection ID
- Enhance NavUser component with account switching functionality
- Modify hooks and auth logic to support default connection selection

* typo

* feat: integrate thread hook for email data loading in MailDisplay component

- Replace local email data state with useThread hook for improved loading management

* fix: improve mail route authorization with connection validation

- Add explicit check for connectionId in session
- Update database query to filter by both userId and connectionId
- Make connectionId optional in ParsedMessage type to support flexible connection handling

* privacy and tos

* linting

---------

Co-authored-by: Aj Wazzan <x_1337@outlook.com>
Co-authored-by: grim <75869731+vys69@users.noreply.github.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
2025-02-12 21:56:07 -05:00
BlankParticle
0925dcebf2 chore: add docker compose to run services like postgres locally 2025-02-07 22:27:48 +05:30