Ran oxc (https://oxc.rs/docs/guide/usage/linter.html#vscode-extension) and fixed all the issues that came up, set it up to run as a PR check and added steps to the README.md asking users to use it.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced JavaScript linting using oxlint in development guidelines and CI workflow for improved code quality.
* Added oxlint configuration and dependencies to the project.
* **Bug Fixes**
* Improved error logging in various components and utilities for better debugging.
* Enhanced React list rendering by updating keys to use unique values instead of array indices, reducing rendering issues.
* Replaced browser alerts with toast notifications for a smoother user experience.
* **Refactor**
* Simplified component logic and state management by removing unused code, imports, props, and components across multiple files.
* Updated function and component signatures for clarity and maintainability.
* Improved efficiency of certain operations by switching from arrays to sets for membership checks.
* **Chores**
* Cleaned up and reorganized import statements throughout the codebase.
* Removed deprecated files, components, and middleware to streamline the codebase.
* **Documentation**
* Updated contribution guidelines to include linting requirements for code submissions.
* **Style**
* Minor formatting and readability improvements in JSX and code structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
### TL;DR
Improved the production deployment workflow with better error handling and clearer instructions.
### What changed?
- Renamed `auto-merge-prod.yml` to `deploy-to-prod-command.yml` to better reflect its purpose
- Updated workflow name from "Deploy Production" to "Deploy to Production Command"
- Changed job name to "Merge Staging to Production" for clarity
- Added proper error handling when rebase fails by posting a comment to the PR instead of failing silently
- Added explicit condition for the push step to only run when rebase succeeds
- Updated the sync-production workflow to include clear instructions in the PR body instead of creating a draft PR
- Added guidance in the PR body explaining how to deploy using the `/deploy` command
### How to test?
1. Create a PR from staging to main
2. Comment `/deploy` on the PR to trigger the deployment workflow
3. Verify that the workflow correctly merges staging into main when possible
4. Test the error case by creating a conflict between staging and main, then verify the workflow posts a helpful error comment
### Why make this change?
This change improves the developer experience by providing clearer feedback during the deployment process. The improved error handling helps developers understand when manual intervention is needed, and the updated PR template provides explicit instructions on how to complete the deployment. Renaming the workflow files and jobs also makes their purpose more obvious to team members.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Chores**
- Updated deployment workflow to require a specific comment format and label for production deploys.
- Enhanced error handling during rebase with clearer instructions for manual intervention.
- Automated pull requests for syncing staging to production now include deployment instructions, a production-deploy label, and are no longer created as drafts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Navigation Component and UI Improvements
## Description
This PR adds a reusable Navigation component to improve consistency across pages and updates various UI elements throughout the application. Key changes include:
1. Created a new `Navigation` component that's now used across all full-width pages
2. Updated the Discord invite link to use the vanity URL `discord.gg/0email`
3. Added BlankParticle to the core team members list
4. Added a new GitHub workflow for auto-merging production deployments
5. Fixed styling issues with social icons in dark mode
6. Improved the contributors page layout and display
7. Enhanced scrollbar styling for better user experience
8. Fixed tooltip positioning in the mail list component
## Type of Change
- ✨ New feature (non-breaking change which adds functionality)
- 🎨 UI/UX improvement
- ⚡ Performance improvement
## Areas Affected
- [x] User Interface/Experience
- [x] Development Workflow
## Testing Done
- [x] Manual testing performed
- [x] Cross-browser testing (if UI changes)
- [x] Mobile responsiveness verified (if UI changes)
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
- [x] I have updated the documentation
## Additional Notes
The new Navigation component centralizes the header implementation, making it easier to maintain and ensuring consistency across all pages. The auto-merge workflow will help streamline the deployment process when PRs are approved by MrgSub.
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a unified navigation component across main pages for a consistent and responsive navigation experience.
- Added a "Contributors" link to the footer for easier access to contributor information.
- **UI Improvements**
- Updated contributor list and styling, including new avatars and improved badge text.
- Enhanced tooltip positioning in mail list actions for better usability.
- Improved global scrollbar styling for a more polished look.
- Refined privacy policy formatting for readability.
- **Bug Fixes**
- Updated Discord invite links in relevant locations.
- **Chores**
- Upgraded the autumn-js dependency version.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Added a GitHub workflow to automatically deploy to production when staging PRs are approved by MrgSub.
Created a new GitHub workflow file `.github/workflows/auto-merge-prod.yml` that:
- Triggers when a pull request is approved
- Checks if the PR is from staging to main and was approved by MrgSub
- Automatically rebases main on staging
- Pushes the changes to main if the rebase is successful
1. Create a PR from staging to main
2. Have the GitHub user MrgSub approve the PR
3. Verify that the workflow runs and successfully rebases main on staging
To streamline the deployment process to production by automating the merge from staging to main when approved by the designated reviewer. This reduces manual steps and potential human error during the deployment process.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
- **Chores**
- Introduced a new automated workflow to deploy changes to production when specific pull requests are approved. This streamlines the release process and ensures only approved updates are merged and deployed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Send Lingo.dev PRs to staging
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
* 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>